The bug occurred because if specific fields aren't detected in onRefresh(), the entire Form widget HTML will be returned as the result instead of specific fields. This created a problem because the october.form.js JS is not setup to gracefully handle having the entire root form DOM node completely replaced in the middle of a request being completed. Specifically, this would cause problems when trying to detect empty tabs, and then the problems would cascade from there as there would be an instance of october.form.js attached to the page with broken references to no-longer existing DOM nodes.
This fix solves the immediate issue of `field@context` using the `dependsOn` feature breaking by ensuring that the actual final field name for a given field is used instead of the name used in the configuration of the field. Future work should probably be done to better support an entire form being re-rendered if no fields are detected in onRefresh however.
Allow plugin autoloaders to load, even on restricted pages. This allows (enabled) plugins to load their autoloaders on any pages, allowing includes in migration files to run.
Fixes#5110.
Fixes an issue when using databaseTemplates where if the pathCache had been generated, and then any template was removed from the database manually the pathCache being out of date would cause an exception to be thrown elsewhere.
Very often in our community people asking question:"How do i install theme from marketplace?"
And to answer that question we should say "Just press Install plugins button!"
That's not very intuitive for beginners. This PR adds one button that leads right to themes installation page.
If a column is defined as searchable, that is not actually searchable (like a partial) and a user filters a list using the searchbox, an Exception is thrown.
Unfortunately, this errorenous search term has already been persisted to the session so on subsequent page loads, the user is presented with an Exception with no way to resolve it themselves.
This PR catches any exception that happens during the search and resets any persisted search terms so that the user can continue working after a page load.
The exception itself will still be thrown.
To reproduce the issue this PR solves:
Set a partial column in any list as searchable: true
Submit a search query
Hit F5
Replaces #4965. Rolls back #4895. Fixes#4964. Partially fixes#4819.
The previous attempts to add a stylised "focus" ring, while with the best intentions, did not take into account how "outline" normally works for people using visual aids. Most high contrast software will effect the outline if its available (ie. make it bolder or more prevalant), thus the "outline" property is paramount to maintaining accessibility.
The previous changes also present issues with elements using box-shadows already, and again, on high contrast, box-shadows are no longer rendered.
This change will bring back the outline property for focus, but with an addition to allow a blue highlight for Firefox, would should keep it in "parity" with WebKit.
Refs:
- https://a11yproject.com/posts/never-remove-css-outlines/
- http://www.outlinenone.com
- https://stackoverflow.com/questions/52589391/css-box-shadow-vs-outline
The search input in filters used a local data request to filter options. While this worked fine for most cases, it failed inside modal relations as the relation keys were not being pushed through due to the request not being linked to the relation modal.
This refactors the request to run through the relation modal, emulating the functionality of "data-track-input" to debounce text entry.
Fixes https://github.com/octobercms/october/issues/4775
This fixes#4082 & rainlab/pages-plugin#405. Reverts a previous breaking change from Build 444 (introduced in #3536) by limiting the scope to which it applies.
Cleans up docblocks and makes most helper methods more permissive of incorrectly cased plugin identifiers. Replaces #4838 & #4837. Credit to @mjuavin for the case insensitivity fixes.
This allows the `theme:sync` command to properly sync to specified targets.
Fixes#4887. Replaces #4935. Credit to @bennothommo for the initial implementation.
This PR is an addition to https://github.com/octobercms/october/pull/4193
Re-using the pivotWidget's and manageWidget's models for saving form data fixes https://github.com/rainlab/translate-plugin/issues/209, where translations are not saved for the model when editing it in a relation widget.
I did some manual testing with this change and everything was working as expected: Translations are now properly saved when creating or editing related models with pivot data. Creating related models in `single` mode now works as well.
Credits to @alxy for his previous work on this issue!
Brings mail layouts more in line with the rest of the mail template pieces by loading from the relevant view files when the layout doesn't exist in the database.
Fixes#3595. Replaces #4736. Credit to @SebastiaanKloos for the initial solution.
Also fixes a longstanding issue where dynamically added fields were not considered when refreshing dependant fields.
* add readonly and disabled support to colorpicker
* add support for attributes in colorpicker widget
* Hide default options is disabled and readonly state. Modify styling to be more inline with spectrum disabled state
When uploading file through "CMS"->"Files"->"Add" -> "Upload file(s)", uploaded file doesn't have set file permissions according to "cms.defaultMask.file" from Config.
This patch fixes it so "defaultMask" can be different from umask and file has correctly set its permissions (usefull when required permissions are other than "644") as well as it has files/directories directly created in CMS section.
- Adds quotes around all strings inserted into config files, preventing them from being interpreted as constants.
- Changed all private methods in OctoberEnv.php to protected.
- Updated test to check some config files for expected changes.
This change allows for easy customisation of the relation manager titles and toolbar buttons.
For buttons - define your custom strings directly in the standard `toolbarButtons` syntax...
```
toolbarButtons:
create: acme.blog::lang.subcategory.CreateButtonText
delete: # omit the string to fall back to the default button text
```
...and the old syntax still works...
```
toolbarButtons: create|delete
```
For titles - define different strings for each mode (form, list or pivot)...
```
title:
form: acme.blog::lang.subcategory.FormTitle
list: acme.blog::lang.subcategory.ListTitle
```
This feature provides developer convenience, for example in this situation where I have a relation manager that is used to assign user permissions to a project:
Before

After

This PR contains no breaking changes.
This fix will apply quotes around string environment variables which contain either a single, or double, quote as well as any variables with a hash symbol - escaping any double-quotes encountered. When artisan october:env is run, this should correctly transfer all configuration values from the config files to the .env file.
Fixes#4979.
getLoadValue() was previously using the find method for getting the selected model on load when not using the Record Finder in relation mode.
This means it was searching by the primary key, regardless of whether the keyFrom setting on the Record Finder widget was changed. This has the effect of the keyFrom setting being correctly used to determine the value of the record finder field when a model is selected, but the widget being unable to find the model when it refreshes or reloads.
This change instead searches for the field's value in the column specified for the keyFrom setting, allowing us to use a different identifying column for loading the selected record.
This change removes the default postback handler for the datatable
widget (onSave) and instead relies on the closest form's request
handler. While `onSave` was a safe default, it did not take into account
the relation widget using other handlers.
The table widget will use an explicitly specified handler first, then it
will try and use the form's request handler, before using `onSave` as a
fallback, although this should really never occur.
Fixes#4776.
Don't bother retrieving the translated URL at construction time, it will be run through the translator during the validation process so there's no need to always hit the translator on every single Page model being loaded.
These can be added back in post-Laravel 6 era (> PHP 7.2)
Also removed the defaults since they are no longer needed, supplied by the new objects
Refs #4929
Can be one of three values:
- "default": Shows all repeater items expanded on load.
- "collapsed": Shows all repeater items collapsed on load.
- "accordion": Shows only the first repeater item expanded on load. When another item is clicked, all other open items are collapsed.
Implements #4801. Refs: https://github.com/rainlab/builder-plugin/issues/165, #2631
L5.6 introduced Bootstrap 4 validation. While it is likely our pagination is all custom and is using the Storm UI, just to be safe, we'll make sure pagination is using Bootstrap 3 classes in all circumstances to retain current functionality.
This should have no effect on simple pagination, which is overriden with our custom template on the next line.
This no longer hinges on app.debug because it creates confusion for devops engineers. This is based on three independent reports coming from app environments that use a reverse proxy. The engineer will follow the proper security instructions by disabling debug mode, which in turn creates an infinite redirect loop when opening the back-end area, only to leave them scratching their heads
Ultimately it is the web server configuration's job to handle the enforcement of HTTPS, the app no longer enforces it as a strong opinion, but we still keep the setting available as a convenient security check for standard environments that do not use a reverse proxy
The upgrade to the latest Dropzone.js brought in a new `timeout` configuration variable, which defaults to 30s. This removes the time limit and restores original functionality.
Fixes#4869
Tested #4867 but it broke the use of pressing TAB after entering a tag to lock it in. This seems to retain that functionality and yet still fix the issue
Replaces #4867