2793 Commits

Author SHA1 Message Date
Ben Thomson
9b72c2d181
Number range filter improvements (#4789)
- Allow minimum or maximum to be unspecified, meaning you want everything up to maximum, or everything above minimum.
- Allow for zero values to work
- Tweak display of infinite values

Fixes #3982.
2019-11-28 22:23:28 +08:00
Marc Jauvin
992e84e602 Add missing documentation comment blocks for fired events (#4788)
Credit to @mjauvin.
2019-11-24 23:59:00 -06:00
Samuell
5d13788f16 Improved Slovak translation (#4778)
Credit to @Samuell1
2019-11-20 11:09:33 -06:00
Ben Thomson
68c9feb622
Fix copy and paste on alert popups (#4740) 2019-11-16 16:27:37 +08:00
Luke Towers
14387b74b4 Minor cleanup from #4764 2019-11-15 15:40:57 -06:00
Luke Towers
19ce51ba4a Implemented client side refresh of dependent options & server side checking of valid filter values before applying them to the query 2019-11-13 13:55:06 -06:00
Luke Towers
17b8ba75af re-add accidentally removed comment 2019-11-12 17:07:10 -06:00
Luke Towers
6f0e4afbbd cleanup 2019-11-12 17:06:23 -06:00
Luke Towers
70107c6376 Initial WIP on implementing dependsOn support for filter scopes.
Still need to resolve an issue where if the slave filter has values set when the master filter updates, thus triggering a change of the available options to the slave, the original values are still set on the slave but not actually visible in the popup as options because they're no longer valid options. To fix this we'll need the ability to get the browser to refresh the slave filter's selected values (count icon basically since it already forces the options popup to refresh) when its masters update; while at the same rechecking the slave's scope values set on the server to ensure that they're all valid and there aren't values left over from the previous request that are no longer valid but are still being applied to the query.
2019-11-12 17:02:25 -06:00
Luke Towers
85fadbfef3 Check user permission for the mediafinder formwidget.
Fixes #4216. Replaces #4669. Credit to @gergo85.
2019-11-12 12:32:17 -06:00
Tomasz Strojny
8fb9c59ee1 Removed double checking if file is protected in FileUpload widget (#4753)
Credit to @tomaszstrojny. Cleanup from 4f7c5cc1e7.
2019-11-11 12:34:58 -06:00
Luke Towers
07ac19f7b3 cleanup from last commit 2019-11-07 12:03:10 -06:00
Luke Towers
d56dded458 Restore middleware support in backend controllers.
Reverts f73d8e6d49.  While there are other ways to achieve some of the same end results, this code existed in the code base for 8 months without issues and is included in the official docs. This means that there could be devs that are depending on this behavior. Additionally, while this may make the internal logic to the BackendController class more complex, it simplifies the developer experience by bringing the Backend\Classes\Controller base class more in line with the standard Laravel controller class.
2019-11-07 11:59:00 -06:00
Luke Towers
490b1d6b00 minor formatting fix 2019-11-06 16:56:46 -06:00
Ben Thomson
e97057246a
Fix empty Richeditor class lists from breaking widget (#4725) 2019-11-06 17:44:46 +08:00
Samuel Georges
8da798a5cd Remove XSRF cookie
This was a contentious change is generally a bad idea to blanket all requests with a dependant cookie. We will try something else.

Revert enableXsrfCookies setting. Fixes UX issue introduced where the token expires. This should be replaced by a CSRF policy that determines whether this is needed on the front end.
2019-11-04 09:06:05 +11:00
Samuel Georges
c5bd5f0e0a Apply ResponseMaker to backend AJAX and cms.page.display event 2019-11-03 08:02:28 +11:00
Samuel Georges
63f65a3f25 Add XSRF to backend, simplify CMS controller run() method
runInternal has been removed because we do not want to blanket our response logic over every single response, only the happy path. This is because it is impossible to remove. So it is better to take the inverted approach, where if you want the CMS' headers in your custom response, add them yourself. This becomes easy via the new makeResponse() method
2019-11-02 19:14:45 +11:00
Samuel Georges
9d120ad66b Add header and cookie support to ResponseMaker 2019-11-02 18:57:32 +11:00
Samuel Georges
ff8f899fbe Move response common functions to ResponseMaker trait 2019-11-02 18:21:22 +11:00
Samuel Georges
f269901d72
Merge pull request #4732 from octobercms/remove_double_middleware
Remove double middleware
2019-11-02 18:06:50 +11:00
Samuel Georges
92bd8360b9 Fixes issue where behaviors are not booting 2019-11-02 16:30:33 +11:00
Samuel Georges
f73d8e6d49 Removes double middleware layer
For some reason it was decided to allow October controllers to support Laravel middleware, this has been reverted because it is a convoluted solution that doesn't respect the original architecture. There are other ways to handle middleware requirements

The original use case appeared to be to simply allow backend controllers to inject headers. This is something easily solvable whilst keeping the simple and original workflow
2019-11-02 16:16:32 +11:00
Samuel Georges
b1fa45ee3a Combine common CSRF logic to a trait 2019-11-02 15:15:18 +11:00
Samuel Georges
49d68f0671 Cookies are no longer serialized
Based on update to library 09e859a13e we no longer serialize cookies, so the decrypter no longer needs to apply a serialization layer
2019-11-02 14:52:00 +11:00
Luke Towers
fa93781645 Added ability to filter down the permissions presented by the PermissionEditor
You can now specify an array of "availablePermissions" to the PermissionEditor FormWidget that it will use to further down the list of permissions that are up for managment by the current user.
2019-10-15 17:37:59 -06:00
Luke Towers
a69c76116f Added support for mode: switch to the PermissionEditor formwidget 2019-10-15 16:46:02 -06:00
Luke Towers
5862683a7a
Trigger change event on clearing recordfinder
Fixes #3591.
2019-10-13 06:15:19 -06:00
Luke Towers
9ac292d921
Merge pull request #4690 from pkarecki/master
Credit to @pkarecki
2019-10-11 12:46:01 -06:00
Piotr Karecki
06b7031131
Move prompt to lang
Move default prompt text to i18n file.
2019-10-11 20:12:08 +02:00
Szabó Gergő
04f0b176a4 Improved Hungarian translation (#4682)
Credit to @gergo85
2019-10-11 09:48:21 -06:00
36864
78e4c46e59 Improve Portuguese translation (#4689)
Credit to @36864
2019-10-11 09:47:17 -06:00
Samuell
348040a4e4 Add permission support for fields, columns and filter scopes (#4520)
Credit to @Samuell1. Fixes #1837.
2019-10-09 16:41:53 -06:00
Luke Towers
e246427463 Provide system.assets.beforeAddAsset event to modify asset attributes
Fixes octobercms/october#4611 (when combined with a PR to https://github.com/heathdutton/cloudflare)
Related: octobercms/october#4092, octobercms/october#3841, octobercms/october#3839
2019-10-09 11:51:06 -06:00
Luke Towers
fa002ce3dd Minor cleanup 2019-10-09 09:44:24 -06:00
Luke Towers
96e335aebc
Fix #3415, #4672 (#4674)
Handle child FormWidgets making AJAX requests outside of the repeater's form container. Note that this won't pass on the state of the repeater item as it exists on the webpage because that information won't be sent to the server in an AJAX request sent from outside of the repeater's form container unless the FormWidget sending the orphaned request specifically includes that data in their request, in which case the regular handling will kick in and initialize the widget properly. A discussion should be had whether this fix makes sense to be done in the Repeater FormWidget or if we should force FormWidgets to have the responsibility of initializing their parent repeaters if they're going to be making orphaned AJAX requests.

Should fix #3415, #4672.
Related: octoberrain/test-plugin#78
2019-10-09 08:08:21 -06:00
Alwin Drenth
b2dcd3c9fd Update Dutch (NL_nl) translation (#4676)
Credit to @adrenth
2019-10-09 13:08:31 +03:00
Luke Towers
06ba8c712f
Trigger the change.oc.formwidget event on update of records through relationcontroller. (#4673)
Fixes #4625. Credit to @danielbidala for the initial report and proposed fix.
2019-10-08 17:30:02 -06:00
Ben Thomson
970cc4550c
Improve internal docs for DataTable callback handler
- Changes parameters to match their intended data.
- Updates docblock
- Minor code cleanup

Refs: https://github.com/octobercms/october/issues/4664#issuecomment-539028664
2019-10-07 22:19:13 +08:00
Luke Towers
d31006ae1a Return 403 response on CSRF fail instead of silently failing
Also moved backend::lang.page.invalid_token.label to system::lang.page.invalid_token.label. Fixes
2019-10-06 23:21:08 -06:00
Luke Towers
17f3c6f74b Added 'email' field type 2019-10-06 16:15:29 -06:00
Tobias Kündig
4f34ac5f4a Prevent flash of unstyled tabs on page load (#4666)
Credit to @tobias-kuendig.
2019-10-06 14:42:40 +08:00
Harmen Janssen
83d14c8503 Add support for order option on relation FormWidget (#4654)
Credit to @harmenjanssen. Documented in https://github.com/octobercms/docs/pull/406
2019-10-06 00:24:31 -06:00
Ben Thomson
c3d99b2acf
Remove void return types in PreferenceMaker
Maintains PHP 7.0 compatibility. Will likely be re-added once rebased to Laravel 6.

Fixes #4659.
2019-10-03 22:07:37 +08:00
Saifur Rahman Mohsin
f6c789f716 Added getConfig helper method to get config values (#4653)
Credit to @SaifurRahmanMohsin 

Added getConfig to make it easier for developers to fetch the config data from a list column while overriding the list items through extension. This also makes the class more compatible with [FormField](https://github.com/octobercms/october/blob/master/modules/backend/classes/FormField.php) which already has the same helper function.
2019-10-02 16:33:14 -06:00
Samuell
5d6fe72619 Update delete buttons in user controllers (#4640)
Credit to @Samuell1
2019-09-26 14:58:07 -06:00
罗光盛
c19ccb4f60 Update zh-cn backend translations (#4635)
Credit to @everyx.
2019-09-26 12:38:22 +08:00
Tomasz Strojny
815ec1a174 Typo fix for Polish language file (#4634)
Credit to @tomaszstrojny.
2019-09-24 15:42:01 +08:00
Dan Harrin
919835e5de Add method removePermission() for AuthManager (#4522)
Allows programmatic removal of permissions being listed in Permission selection widget.

Credit to @DanHarrin.
2019-09-21 23:42:11 +08:00
Samuel Georges
b37641e94d Lazyload top navigation icons - refs #4562 2019-09-21 13:12:49 +10:00