Commit Graph

4780 Commits

Author SHA1 Message Date
Calum 1c621ae4c9
Support git submodules in october:util git pull (#5047) 2020-04-19 19:56:19 -06:00
Aurélien Roy 6097566c52
Allow blob files naming in AJAX request (#5042) 2020-04-18 20:43:47 -06:00
Ben Thomson 28e8758648
Further compat fixes 2020-04-17 11:45:48 +08:00
Ben Thomson 3720af4c02
Make ImportModel compatible with League/CSV v9 2020-04-17 11:37:30 +08:00
Đorđe Jocić d029d6ea24
Added Serbian translation (#5040) 2020-04-14 21:58:47 -06:00
Ben Thomson 965732bd45
Allow sidePanel to be used independent of sideNav
Also, updated compiled assets
2020-04-15 00:16:29 +08:00
4NIK3T baca3c8adf
Allow translations of default column values (#5038)
Currently the default column values cannot be translated. This change will allow us to translate them.
2020-04-12 11:17:45 -06:00
Kallef Alexandre b4c65e9feb
Added plugin:rollback command (#4389) 2020-04-11 09:46:22 -06:00
Mike Robinson d69ade86d1
Validate backend forms client-side (#4804)
Fixes #4799.
2020-04-09 14:24:51 -06:00
Ben Thomson 460aca5b01
Reset outline to default - roll back #4895 (#5035)
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
2020-04-09 11:50:00 -06:00
Luke Towers 6a6331ba15 Merge branch 'develop' into wip/laravel-6 2020-04-08 12:40:02 -06:00
Ashleigh Sims 439ed2cc33
Unsuspend a backend user from user update screen (#5032) 2020-04-07 13:22:41 -06:00
Ben Thomson 9155e7de7e
Properly scope the search query in filter widgets.
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
2020-04-06 15:45:22 +08:00
Ben Thomson b5d5e8c20d
Update dashboard column count in lang strings (now 12 columns) 2020-04-05 22:47:36 +08:00
Blaž Oražem 758d8e01e3
Slovenian language update (#5028) 2020-04-05 22:46:24 +08:00
Luke Towers 9574e2dba9 Merge branch 'develop' into wip/laravel-6 2020-04-04 23:16:56 -06:00
Luke Towers 4b4a9af266 satisfy the code sniffer 2020-04-04 22:26:52 -06:00
Luke Towers 5d4f3dd90a Support ignoreTimezone on `type: date` filter scopes too 2020-04-04 22:16:32 -06:00
Larry Barker 56e2805f15
Add option to ignore timestamps for date range filters (#4966) 2020-04-04 22:12:32 -06:00
Luke Towers c7c94347f2 Compile assets 2020-04-04 22:02:18 -06:00
Rike-cz b445b65150
Add support for linkable form tabs (#4754) 2020-04-04 21:56:48 -06:00
Luke Towers 3ca80f70f1 Merge branch 'develop' into wip/laravel-6 2020-04-04 21:41:36 -06:00
Luke Towers ed2d63dd0e add missing break statements 2020-04-04 21:41:24 -06:00
Luke Towers c2544d40b4 Fixed bug from relation controller customization improvements PR 2020-04-04 21:24:53 -06:00
Luke Towers 4b22d06c60 Merge branch 'develop' into wip/laravel-6 2020-04-04 14:11:05 -06:00
Szabó Gergő b8a6571c1c
Improved Hungarian translation (#5027) 2020-04-04 14:05:01 -06:00
Ben Thomson cc1c1096b0
Remove newline between "throws" and "return" 2020-04-05 01:06:47 +08:00
Dan Harrin 903b5b01ea
Add support for "soft" components (#4539) 2020-04-05 01:02:43 +08:00
Ben Thomson c7ba577fae
Use root namespace for Exception in catch block 2020-04-05 00:55:35 +08:00
Luke Towers 44cc5d371b Merge branch 'develop' into wip/laravel-6 2020-04-04 02:32:16 -06:00
Luke Towers 4f7e2995c7
Simplify Media Library upload logic (#5026)
Based heavily off the work done by @alxy in #4314

May require https://github.com/rainlab/pages-plugin/pull/421 if testing with RainLab.Pages.

Replaces #4314, related: #4311, Credit to @alxy for the initial work.
2020-04-04 02:11:28 -06:00
Luke Towers 459677a168 Code cleanup left over from #4311 2020-04-04 00:44:44 -06:00
Luke Towers 0edde0eb94 Improve opcache config check 2020-04-03 09:08:22 -06:00
Tobias Kündig 86197f59cb
Add Preset buttons for editor toolbar settings (#4700)
Fixes #4187.
2020-04-03 08:47:20 -06:00
Luke Towers 8b9c001b9a Allow disabled plugin's translations to load for display translations on system pages 2020-04-02 22:15:30 -06:00
Luke Towers d9a7942058 Fixed issue where Froala toolbar popups appearing outside of the editor would not display.
Code was left over from when redactor was still the main editor.
2020-04-02 11:38:45 -06:00
LeMaX10 ea42de9181
Use plugin & theme path helpers in the update manager (#4770) 2020-04-02 10:52:23 -06:00
Tobias Kündig 32443135c9
Remove JS layout calculations of the backend navbar by using flexbox (#4811) 2020-04-02 10:47:24 -06:00
Luke Towers ccb2c372bb Only force absolute URLs for media items if cms.linkPolicy = force
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.
2020-04-02 10:18:23 -06:00
yfktn 158fc43f62
Trigger change events when RelationController pivot records are created or updated (#4997)
Fixes #4996. When any pivot value change or add with relationManager, the filterFields will triggered too.
2020-04-02 09:33:41 -06:00
Marc Jauvin b1d41caf03
Improve PluginManager code (#5023) 2020-04-02 09:30:15 -06:00
Marc Jauvin 600fbd7cfa
Improve code readability for exists method (#5022) 2020-04-02 08:33:58 -06:00
Luke Towers 61b4ef6a47 Minor cleanups to the PluginManager.
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.
2020-04-01 21:30:54 -06:00
Luke Towers e4571c3dd4
Add usingSource method to active datasource (#5017)
This allows the `theme:sync` command to properly sync to specified targets.

Fixes #4887. Replaces #4935. Credit to @bennothommo for the initial implementation.
2020-04-01 18:12:50 +08:00
Romain 'Maz' BILLOIR 2b22c0e49a
Allows model scope with join (#4970)
More info in [this forum post](https://octobercms.com/forum/post/displays-a-related-model-with-scope-which-uses-join-doesnt-work-is-that-an-october-issue)
2020-03-31 16:45:19 -06:00
Tobias Kündig 6e25c5a8d0
Fix saving of translations in relation controller by re-using the form widget's model (#4822)
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!
2020-03-31 11:44:13 -06:00
Luke Towers 8c7d50a638 Remove leftover code 2020-03-31 10:09:11 -06:00
Luke Towers 832809841f Switch to using league/csv >= 9.1 2020-03-31 09:57:36 -06:00
Luke Towers ff02e59740 Merge branch 'develop' into wip/laravel-6 2020-03-31 09:54:00 -06:00
Luke Towers 802d8c8e09 Temporary workaround until the L6 upgrade can be merged in to use league/csv >= 9.1 2020-03-31 09:53:35 -06:00
Rike-cz 2fa306b5a7
Add iconv fallback support for mbstring unsupported encodings (#5015) 2020-03-31 09:15:17 -06:00
Luke Towers 79f0a9413b Merge branch 'develop' into wip/laravel-6
# Conflicts:
#	composer.json
2020-03-31 04:36:47 -06:00
Luke Towers cd0b6a791f escape import CSV column names 2020-03-31 04:17:41 -06:00
Luke Towers 6711dae8ef Improve asset file path handling when moving assets 2020-03-31 04:09:18 -06:00
Luke Towers 2b8939cc8b Improve asset file path handling 2020-03-31 03:37:31 -06:00
Samuell a9b4a5b2c7
Prevent browser caching of list checkboxes (#4949) 2020-03-31 02:31:16 -06:00
fansaien 9995dddc75
Load mail layouts from view files if not found in the database (#4904)
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.
2020-03-31 02:27:46 -06:00
Luke Towers d3596310c6 z-index fixes for richeditor toolbar.
Fixes #4868. Related to d7b0e55ceb.
2020-03-31 01:35:21 -06:00
Ayumi 8ceccb07a4
Add an unique identifier to all the filter container popup boxes (#4846)
Fixes #4845.
2020-03-31 01:07:07 -06:00
Luke Towers 243c835c24 Minor performance improvement for PluginManager.
Suggested by @tobias-kuendig in #4337, implemented because normalizeIdentifier() would be called more frequently by merging #4838.
2020-03-31 00:36:33 -06:00
Luke Towers 52cdfda935 Trigger form change events when items are added / removed in a repeater.
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.
2020-03-30 18:07:53 -06:00
Larry Barker 0522f50bf4
Add support for non-numeric menu counter values (#4661)
Documented in https://github.com/octobercms/docs/pull/447
2020-03-30 11:49:03 -06:00
Klaas Poortinga 3a7224c2ec
Improve richeditor support for preview mode and attributes property (#5011) 2020-03-30 11:33:03 -06:00
Klaas Poortinga 141893d6a7
MediaFinder modifications (#5010) 2020-03-30 11:30:59 -06:00
Klaas Poortinga 280ae00b88
Colorpicker improvements (#5002)
* 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
2020-03-29 10:06:02 -06:00
Klaas Poortinga 2ad046f7ae
Markdown formwidget improvements (#5004)
* add readonly and disabled support to markdown editor

* add attributes support to markdown editor
2020-03-29 09:37:03 -06:00
Kmarty 8c0598cc4a
Fix: Not reflecting "defaultMask" when uploading file@CMS (#4698)
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.
2020-03-29 09:27:23 -06:00
Klaas Poortinga 1aa3250c3a
Add support for the attributes property to fileupload formwidget (#5012) 2020-03-29 09:03:31 -06:00
Ben Thomson 98a2fb150f
Merge remote-tracking branch 'origin/develop' into wip/laravel-6 2020-03-29 15:45:31 +08:00
Ben Thomson a92597064b
october:env command fixes
- 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.
2020-03-29 15:42:46 +08:00
Dan Harrin cd86c62b94
Relation Manager Customisation Improvements (#4444)
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
![Screenshot 2019-07-10 at 09 28 22](https://user-images.githubusercontent.com/41773797/60953626-6bc0de80-a2f5-11e9-8001-04e816ad6967.png)
After
![Screenshot 2019-07-10 at 09 32 51](https://user-images.githubusercontent.com/41773797/60953773-b9d5e200-a2f5-11e9-93a9-69238ea696aa.png)

This PR contains no breaking changes.
2020-03-27 12:56:07 -06:00
Web-VPF 3fe1c26e66
Improved Russian translation (#5005) 2020-03-27 12:16:21 -06:00
Ben Thomson ef606c76c5
Merge branch 'develop' into wip/laravel-6 2020-03-27 14:52:15 +08:00
Klaas Poortinga cbfa309c39
Modify password field to support placeholder attribute (#5003) 2020-03-26 13:38:40 -06:00
Fl0Cri bd2a774a58
Add UTF-8 BOM when exporting with useList option (#4873)
Same as #1958 but when using the list controller without an ExportModel (with `useList` in the export options)
2020-03-26 13:17:51 -06:00
Ben Thomson 6dbfdd7e65
Allow quotes to be correctly handled by october:env (#4986)
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.
2020-03-26 23:40:01 +08:00
Klaas Poortinga c79bea7449
Modify codeditor widget to implement html attributes set through form field definition (#5001) 2020-03-25 14:47:39 -06:00
datune f98c71aa14
Replace Illuminate Dumper with Symfony Dumper (#4998)
See https://github.com/laravel/framework/pull/25087
2020-03-24 11:51:27 -06:00
jacobdekeizer 3450921c26
Fix docbocks ListController behaviour. (#4989)
* Fix docbocks ListController behaviour.
2020-03-23 20:12:49 +11:00
Flynsarmy 39980d8346
Add formGetRedirectUrl method. (#4954)
Fixes #4946. Documented in https://github.com/octobercms/docs/pull/432
2020-03-22 00:32:27 -06:00
Luke Towers 12c952b978 Merge branch 'develop' into wip/laravel-6 2020-03-20 16:48:36 -06:00
Larry Barker 09b7e1b2fd
Add adaptive size options (#4992)
Popups can be "adaptive" meaning they fill the width and/or height of the screen. This PR adds this information to the docs to make it better known.
2020-03-19 09:55:18 -06:00
Ben Thomson 8c61985114 Merge branch 'develop' into wip/laravel-6 2020-03-16 17:13:42 +08:00
jacobdekeizer 2a86f7b32f
Fix docblocks and imports in FormController behaviour. (#4972) 2020-03-16 11:47:26 +08:00
Ben Thomson 96c062bb47
Allow dot-notation for specifying external parameters for a component (#4978) 2020-03-13 09:03:18 +08:00
Ben Thomson cca8da2af3
Get correct model when not using ID for "keyFrom" in Record Finder (#4977)
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.
2020-03-13 07:47:01 +08:00
Marc Jauvin 6c391b5e82
Add config for throttling login attempts into Backend (#4974) 2020-03-11 10:57:19 +08:00
Ben Thomson 2f500ab034
Auto-detect correct postback handler for datatable widget. (#4967)
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.
2020-03-05 16:37:16 +08:00
Luke Towers 307a662647
Improve German translation (#4961) 2020-03-04 14:49:54 -06:00
Marten 1fac424f71
Updated getParameter method hints in Router (#4908) 2020-03-04 16:36:09 +08:00
Luke Towers 8eb045f2d1 Minor performance improvement
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.
2020-03-03 10:38:03 -06:00
Samuel Georges aff120fcec Remove return types
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
2020-03-01 18:15:44 +11:00
Klaas Poortinga bf8ab3612e
Modify menu structure to objects (#4929)
* Modify menu structure to objects
2020-03-01 17:10:37 +10:00
Alwin Drenth 56b2864ef5
Change PluginBase::boot return type to void (PhpDocBlock) (#4957) 2020-02-28 17:52:01 +08:00
Alwin Drenth 1d65e61ffc
Update Dutch translation (#4958) 2020-02-28 17:47:33 +08:00
Ben Thomson c6e61206ed Add roles and updated PHP version to module Composer requirements 2020-02-27 17:40:56 +08:00
Samuel Georges 73b551cf04 Switch to October Rain assetic 2020-02-27 20:07:42 +11:00
Samuel Georges 6e607361dc Restore default password setting 2020-02-27 20:07:41 +11:00
Samuel Georges 7b00768f3a Remove local notes support 2020-02-27 20:07:41 +11:00
Ben Thomson a2966da395 Use October provider for Redis service 2020-02-27 16:57:32 +08:00
Ben Thomson 0394494fbe Merge remote-tracking branch 'origin/develop' into wip/laravel-6 2020-02-26 17:40:47 +08:00
Ben Thomson 9911c6b581 Add new validation type lang strings. 2020-02-26 17:10:51 +08:00
Marc Jauvin 7b6053768d
Fix argument name in event handler examples (#4950) 2020-02-19 23:42:51 -06:00
danielbidala c27e4d1148
Display '0' in preview mode for type: number fields (#4944) 2020-02-19 23:26:17 -06:00
Ben Thomson f8634e0757 Immediately load a lazy tab if it is the initial active tab.
Fixes #4879
2020-02-19 10:49:15 +08:00
Luke Towers 7048e2c567 Improve escaping of option values provided to the dropdown field type. 2020-02-16 23:49:01 -06:00
Luke Towers 136fd53109 Improve error handling on invalid model attributes being used for form fields 2020-02-13 16:48:39 -06:00
Samuell a68f3abf1c
Fix pagination reset if search input is filled (#4918)
Fixes #4914.
2020-02-12 07:52:09 -08:00
Rike-cz 495b0f085a Ignore user preferences for lists when setup modal is disabled (#4921) 2020-02-10 14:24:09 +08:00
Samuel Georges dc5431f9c4 Apply z-index change to CSS
Refs #3837
2020-02-09 17:27:18 +11:00
Adrien 7d7a99f688 Update lang.php (#4931)
Corrected dashboard warnings_link from 'Vue' to 'Voir'
2020-02-08 14:08:53 +10:00
Ben Thomson 5e4916148f Revert Laravel Dusk changes (#4919)
The Browser tests will be made into a RainLab plugin. (https://github.com/rainlab/dusk-plugin)
2020-02-07 16:59:39 +08:00
Ayumi 153120fdc7
Improve error message for when safe mode is enabled (#4926) 2020-02-03 12:09:50 -08:00
Ben Thomson ef86ddc482 Merge remote-tracking branch 'origin/develop' into wip/laravel-6 2020-02-03 15:56:33 +08:00
Ben Thomson 65c3a88179
[Laravel 6] Add support for Laravel Dusk tests (#4919) 2020-02-03 12:21:04 +08:00
Ben Thomson 3f982c25c7
Add "styles" for repeater widgets (#4877)
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
2020-02-02 09:12:01 +08:00
Samuell 45dde59b5f
Add missing backend translations for SK language (#4912) 2020-02-02 09:09:43 +08:00
Samuell a593ceffda
Use middle mouse click to open list row in new window (#4917) 2020-01-29 13:31:19 -06:00
Aurélien Roy 5e7ae1bb72 Add disabled state for unchecked checkbox (#4916) 2020-01-28 11:02:20 -06:00
Luke Towers f700e236d1
Merge branch 'develop' into wip/laravel-6 2020-01-27 12:06:45 -06:00
Luke Towers e8dca35c15 Include author name in plugin search results.
Fixes #4907
2020-01-23 13:07:18 -06:00
Luke Towers 2b5d811180 Allow plugins to be loaded on routes starting with /combine but not /combine/.
Fixes #4886.
2020-01-21 12:26:20 -06:00
Ayumi a647b48715 Set a consistent focus ring style on all browsers (#4895)
Fixes #4892. Related: #4819
2020-01-21 12:09:04 -06:00
Ben Thomson c7b85fcd6e
Default to using Bootstrap 3 pagination.
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.
2020-01-21 08:44:10 +08:00
Ben Thomson 12208e526f Adjust User rules to limit lengths of emails and logins 2020-01-20 16:48:09 +08:00
Ben Thomson 4716084f14 Change User rules to use min for character lengths 2020-01-20 16:39:23 +08:00
Ben Thomson 11b7111413 Use old signature for `where` method in CmsObjectCollection.
Refs: https://github.com/octobercms/october/pull/4893#discussion_r368408407
2020-01-20 16:25:50 +08:00
Ben Thomson 9ecad139c4 Comment tweak for CmsObjectCollection::where() 2020-01-20 13:59:29 +08:00
Ben Thomson cf67e83598
Make slug route param optional for CMS module.
This allows the home page to load.
2020-01-19 23:23:27 +08:00
Ben Thomson f9d7c79de5
Link Input alias to October's Input facade 2020-01-19 23:16:50 +08:00
Ben Thomson 56785bcd3c
Fix missing output when UpdateManager is run within the Backend 2020-01-19 23:15:02 +08:00
Ben Thomson 852ed1afb8
Remove deprecated `getNotes` method from UpdateManager 2020-01-19 22:56:24 +08:00
Ben Thomson 8279bc63e4
Seed admin password that passes our current validation rules 2020-01-19 22:27:12 +08:00
Ben Thomson 4302f8d4f5
Change module seeders to only temporary unguard attributes 2020-01-19 22:26:46 +08:00
Ben Thomson 662b1c2e45
Fix incompatible `where` method in CmsObjectCollection
Signature for the `where` method changes in L6, so a wrapper has been put in place.
2020-01-19 16:35:01 +08:00
Ben Thomson 5d3d4ad0b2
Merge branch 'develop' into wip/laravel-5.9 2020-01-18 21:00:40 +08:00
Samuel Georges e3b42b2f10 Make cms.backendForceSecure an explicit setting
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
2020-01-18 18:05:26 +11:00
Scott Bedard 60ffd91064 Fix small typo in number range filter widget (#4891)
When a `max` is defined with no `min`, the filter should read "Negative infinity → max". Right now, it reads "Infinity → max", which is not accurate.
2020-01-17 12:11:38 -06:00
Ayumi 06b1f57755 Expand the character limit of error messages in Event log list (#4830) 2020-01-16 20:37:38 +08:00
Ben Thomson c046466913 Set Dropzone.js uploaders to have no time limit (#4878)
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
2020-01-14 16:47:25 -06:00
Flynsarmy 0bbc12af45 Remove excess spaces from tab title hovers (#4876) 2020-01-14 19:58:54 +08:00
jacobdekeizer 3a28771c2c Fix registerSchedule typehint in PluginBase (#4871) 2020-01-10 11:55:54 +08:00
Samuel Georges d46accfc4f Don't force highlight nothing element
Causes "Uncaught TypeError: Cannot read property 'element' of undefined at DecoratedClass.SelectOnClose._handleSelectOnClose"

Refs #4867
2020-01-07 07:04:25 +11:00
Luke Towers 64d7464ed3
Improve cms.combiner.beforePrepare event docs
Related: #4865
2020-01-06 11:40:20 -06:00
Samuel Georges 8ce9525b44 Take 2
Refs #4867
2020-01-06 22:12:14 +11:00
Samuel Georges ec0918e284 Fixes removal of first item from taglist
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
2020-01-06 21:19:12 +11:00
Samuel Georges 4a1295162c List support for tr.nolink class
The `nolink` CSS class can now be applied to table rows elements (TR) in addition to table data elements (TD) to disable the click event
2020-01-06 19:44:06 +11:00
Samuel Georges 06da92e06d Fixes multi click issue
When the popup is hidden during its loading sequence, the invisible buttons are still clickable and prone to misclicks

Fixes #4729
2020-01-06 18:56:28 +11:00
Szabó Gergő b9a7dab177 Apply custom secondary color to Media (#4863) 2020-01-03 21:17:50 +11:00
Samuel Georges cd4f56c64c Broken link report
Refs https://github.com/octobercms/docs/issues/427
2019-12-30 09:55:38 +11:00
Samuel Georges 321f7eaa1f Catch fatal errors after cycling page action
This is a complex issues where a "model not found" exception is getting thrown during the `pageAction` cycle, then getting suppressed by the fatal error handler:

try {
    // RelationController throws error here
}
catch (Exception $ex) {
    $this->controller->handleError($ex);
}

Fixes #4784
2019-12-29 15:40:28 +11:00
Samuel Georges e19f8b287d Db::getConfig has no second arg
Currently returns null via Arr::get(arr, key, default=null)
2019-12-29 11:46:01 +11:00
Samuel Georges 160ae441ff Shorten default string length
- Introduce varcharmax config item, this default eventually should be increased to 255, when MySQL 5.6 support is dropped
- Config item can be kept to retain legacy support
- Only apply to mysql driver, previously was impacting other drivers
- Source true config values, previously was sourcing hard coded "mysql" connection values
2019-12-29 11:43:27 +11:00
Samuell 90e9b2e2c6 Typo fix in SK translation (#4852)
Credit to @Samuell1
2019-12-27 12:23:15 -06:00
Samuel Georges 4fb897ff12 Fixes bug showing the entered password 2019-12-24 18:10:17 +11:00
Samuel Georges 2b45c3f322 Simplify wording to sound more DOS-era robotic 2019-12-24 17:43:25 +11:00
Ben Thomson a66310bd56
Allow changing of Backend user passwords through CLI. (#4836)
Adds an Artisan command "october:passwd" to change the password of a Backend User through CLI. This command may only be run through CLI - it will not work if called through a web handler.

Refs: #3521, #4835. Docs: 1f3bfc719e
2019-12-23 08:19:15 +08:00
Ayumi 0436165a90 Improve UX for checkboxlists on mobile (#4841)
Credit to @ayumi-cloud.
2019-12-22 13:39:22 -06:00
Samuel Georges 953061797d Remove hard coded widget name for lazy tabs (#4839)
- The widget alias may not always be form, so pass the handler name
- No need to spam non-lazy tabs with useless data tags
2019-12-22 16:39:45 +11:00
Marc Jauvin 3a49b5fa7a allow loading of lazy tabs for secondary tabs as well (#4839) 2019-12-22 15:24:42 +11:00
Samuel Georges adb303a53c Always sort plugins by key, then dependencies
This has been benchmarked and appears to have minimal impact on performance and solves unnecessary randomness and race conditions during the app's registration and boot cycle

Fixes #4826
2019-12-21 20:50:28 +11:00
Samuel Georges 21f8c5f272 Fixes styling issue when quick select is forced
Replaces #4827
2019-12-21 13:46:06 +11:00
Samuel Georges cbc620c3e8 Rollback for Build 462
This change should be revisited since it doesn't account for database-based templates which have no file path. Upon revisit, we might want to consider adding this logic in to the afterFetch() event with detection of file based mode, or even at the lower levels where the file is first extracted from the filesystem. TBA
2019-12-19 17:42:25 +11:00
Luke Towers a51215b9b3
Revert "Added additional robots meta fields to CMS pages (#4685)" (#4832)
This reverts commit 8303e0dbb2. Reverts #4685. Should be implemented as a plugin instead.
2019-12-18 13:51:50 -06:00
Nick Khaetsky 8303e0dbb2 Added additional robots meta fields to CMS pages (#4685)
Credit to @FlusherDock1
2019-12-18 10:16:36 -06:00
Dan Harrin 3fc7f6aa76 Refresh Relation Manager on Unlink and Delete (#4741)
Credit to @DanHarrin. Fixes #3470 and #4718. Replaces #3476.
2019-12-17 23:16:55 +08:00
Ben Thomson a53cc52752
Correctly display HTML entities in event log (#4566)
This changes the event log to use a partial for the log message which double-encodes the data. When using formatted view in the log viewer widget, the HTML entites are allowed by decoding back a step. When in raw view, the HTML entities are kept double-encoded.

Fixes #4558.
2019-12-17 22:43:44 +08:00
Ayumi 56eab50260 Documented session.http_only (#4743)
Credit to @ayumi-cloud
2019-12-14 11:14:23 -06:00
Samuel Georges 7902cfa58a Simplify security check
Logic in ComponentPartial was rolled back and moved to the Controller. Since there are issues with throwing exceptions inside the component partial lookup logic (exceptions are conditionally suppressed), it seems like it would be better to bubble up the security logic to the controller level as a simple base dir security check, which is no longer concerned about any suppression logic. This looks to have logic parity with the previous solution

Refs #4652
2019-12-14 12:37:44 +11:00
Tobias Kündig 80f870c313 Allow partial overrides in subfolders (#4652)
* Allow partial overrides in subfolders + security checker
2019-12-14 12:22:30 +11:00
Samuel Georges 6277f9b44c Event goes off not on 2019-12-13 21:56:39 +11:00
Samuel Georges 0a98afbff8 Remove GPU enablement
It is unsure why this was ever needed, but it appears to fix the overflow issues with the sortable plugin

Refs https://github.com/rainlab/pages-plugin/issues/384
Refs 11be3fede3
2019-12-13 21:44:37 +11:00
Samuel Georges ed2eec6afb Move placeholder upon mouse scroll
This is one step closer to fixing the sorting issues when a scrollbar is present. It still doesn't quite fix the issue, still need to find a way to get the container dimensions to update

Refs https://github.com/rainlab/pages-plugin/issues/384
Refs 1d91c221b0
2019-12-13 21:34:59 +11:00
Samuel Georges 22db1299ae Exception handling
$widget->secondaryTabs['fields'] may not always be present
2019-12-12 22:02:39 +11:00
Ben Thomson c17cb58aa1 More strict checking of addItem request for child repeaters (#4814)
Similarly named repeater fields being used in viewBag variables were being assigned aliases which succeeded the `strpos` check on line 407. This will more clearly look for a child repeater form and index.

Fixes #4808
2019-12-12 21:44:10 +11:00
Samuel Georges 5839b6869a Recompile assets 2019-12-10 20:41:19 +11:00
Philipp Lang d4d1874311 Allow setting customview path for relation list (#4680) 2019-12-10 20:21:56 +11:00
Blaž Oražem 8abed1794f Slovenian language added (#4796)
* Add Slovenian language
2019-12-10 20:17:42 +11:00
Robin Bonnes 9145955978 Adds the ability to override the column header label in import/export. (#4737)
Now we can use the `backend.list.overrideHeaderValue` event also in the import/export.
2019-12-10 20:06:10 +11:00
Samuel Georges 70e57120d0 ApplicationException -> SystemException
This appears to be a typoe. It doesn't make sense to ever log "user errors", only "system errors"

Fixes #4569
2019-12-10 19:59:49 +11:00
Samuel Georges 260e1f503f Rollback d31006ae1a 2019-12-10 03:12:12 +11:00
Marc Jauvin 864816f7f2 Make CMS object code editor read-only in safe mode (#4769)
Adds a dismissable message to the CMS object code editor indicating that the PHP code section of a CMS object cannot be edited when `cms.enableSafeMode` is `true` (or when debugging is disabled if `null`).

Credit to @mjauvin.
2019-12-09 21:05:50 +08:00
Samuel Georges 63729e401b Fixes typo in merge conflict 2019-12-09 20:58:16 +11:00
Tobias Kündig 4704f85096 Added lazy loading for backend form tabs (#4658)
* Added lazy loading for backend form tabs
2019-12-09 20:45:26 +11:00
Samuel Georges 1e449c82b6 Prevents erratic rendering issues
This occurs due to a race condition in the rendering where the scrollbars enable and disable over and over because of a slow height calculation. Giving any height number appears to close the loop by never letting the height resolve to 0

Refs #4632
2019-12-08 10:27:59 +11:00
Samuel Georges b22021db3b Minor continuity change
Let's save this for L6 upgrade. Although PHP 7 partially support this, we should revisit once the PHP version is bumped + better support for it
2019-12-07 11:37:06 +11:00
Tobias Kündig a4359c91e9 Explicitly pass focused item along as it is already known (#4807)
If the DataTable widget is loaded in a Popup, the .focus() call does not
seem to focus the target element correctly, which leads to the problem,
that the updateCellFromFocusedItem method fails to find the focused
item.
This commit passes the target item along since it is already known.
2019-12-07 11:33:06 +11:00
Larry Barker 2b05d01c6c Support additional file name and path characters in media manager (#4564)
* Support additional file name and path characters in media manager

When working with abstract file names that may contain additional characters, such as quotes or ampersands, the media manager would throw an error. This PR adds two additional characters to the character whitelist.

* Add unicode filename to tests
2019-12-05 19:44:04 +11:00
Philipp Fehr 9dc54baddd Fix race condition when clearing recordfinder value (#4802)
Credit to @TheFehr. Fixes #4800.
2019-12-04 10:14:19 -06:00
Luke Towers 5f8a5454ee Narrow the scope of when Lists orderBy conditions are reset.
Credit to @bennothommo & @daftspunk
Replaces: 9f8d8ec9fa. Refs: #4439
2019-12-04 02:36:51 -06:00
empower-josh 4ab464cede Add public methods to access Lists widget's sort direction & column (#4746)
Credit to @empower-josh.
2019-12-04 02:29:24 -06:00
Samuel Georges aa31667952 Make fake-infinity precise to 4 bytes 2019-12-04 18:30:32 +11:00
Samuel Georges ee4078ac44 Tweak chart markup to not depend on an external class
This fixes the rendering of the example markup. The line chart has no styles but just needs to know the display height
2019-12-04 08:25:44 +11:00
Samuel Georges 905e5fbb72 Fix for strict SQL languages (Pgsql)
When the value is null [id >= ''] an error is thrown, not being an integer, while [id >= null] will return nil results, curiously. Here we emulate infinity by using a large-ish number instead of null. In future if this becomes a problem we may need to resort to multiple condition definitions as a more verbose solution, for example:

- For when both are set (conditions: id >= ':min' and id <= ':max')
- For when min is set (conditionsMin: id >= ':min')
- For when max is set (conditionsMax: id >= ':max')
2019-12-02 17:27:43 +11:00
Ben Thomson 9f8d8ec9fa
Force ordering when list widget column is sorted
When ordering is applied externally, ie. by a relation config, the orderBy call in the List widget simply adds an additional field to the ordering clauses, which prevents lists in these scenarios from being re-ordered correctly. This changes the order clause so that the ordering is reset and only the specified column is ordered when the user sorts a column.

Developers can continue to use the `extendQuery` event to do specialised custom ordering if required.

Fixes #4439.
2019-12-02 09:27:25 +08:00
Ben Thomson 1283121069
Trigger "change" event when time picker is changed
This allows dependent fields (ie. dependsOn) to trigger correctly when a time field, or the time part of a datetime field, is changed.

Fixes #4268
2019-11-30 00:09:49 +08:00
Tobias Kündig 61129b48ec Only put sortOptions to the session if the List query succeeded 2019-11-29 08:26:37 +01:00
Luke Towers 7e98e199a4 Revert #4567, fixes #4648.
If including the asset extension is important, this can be done by listening to the `system.assets.beforeAddAsset(&$type, &$path, &$attributes)` event introduced in Build 460.
2019-11-28 10:32:34 -06:00
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
Samuel Georges 566f138eab Fixes touch events in sortable plugin
Refs #4791
Refs #4777
Refs #3755
2019-11-28 21:03:32 +11:00
Ben Thomson e9abdf7783
Parenthesise some double ternary conditions in Asset Combiner.
Improve compatibility with PHP 7.4, where "Unparenthesized `a ? b : c ?: d` is deprecated"

Fixes #4790.
2019-11-28 09:21:03 +08:00
Samuel Georges 18398a8318 Add touch events back to modernizer 2019-11-25 16:59:20 +11:00
Marc Jauvin 992e84e602 Add missing documentation comment blocks for fired events (#4788)
Credit to @mjauvin.
2019-11-24 23:59:00 -06:00
Luke Towers 106756d656 Fixed conflict between JS input trigger plugin & JS filter plugin.
Related: https://github.com/octobercms/october/issues/3202#issuecomment-556042766
2019-11-22 18:39:25 -06:00
Ben Thomson 7e3136564f
Merge branch 'develop' into wip/laravel-5.9 2019-11-21 23:18:25 +08:00
Samuell 5d13788f16 Improved Slovak translation (#4778)
Credit to @Samuell1
2019-11-20 11:09:33 -06:00
Jim Cottrell b5ed0b313a Restore support for Select2 data format in custom select control (#4712)
Credit to @jimcottrell. Refs: #4413
2019-11-19 15:13:08 +08:00
Marek Erben 1b4147212d Improved Czech translations in /modules/system/lang (#4773)
Credit to @maraerben.
2019-11-19 11:49:05 +08: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
Christophe Vuagniaux f0db465f46 Avoid array_intersect error if argv is not defined (#4751)
Credit to @ChVuagniaux. Can be triggered when attempting to run Laravel HTTP tests on OctoberCMS (https://laravel.com/docs/6.x/http-tests)
2019-11-10 10:52:36 -06:00
Luke Towers 615c4cdb04 Change default of cms.backendForceSecure to reflect the config default that's been in place since 2016. 2019-11-07 12:14:32 -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
Luke Towers c9df45a87d Fixed typo 2019-11-06 16:55:16 -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 1df8e72e4a Remove unused import 2019-11-02 19:42:09 +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 959b85f56c Add cms.enableXsrfCookies config value (default true) to configure whether or not the XSRF cookie is automatically sent or if CSRF tokens are solely relied on.
Related: https://github.com/octobercms/october/pull/4701#issuecomment-547773385 & https://github.com/laravel/framework/pull/24726
2019-10-30 08:08:54 -06:00
Luke Towers 457466c5af Fix typehint 2019-10-29 16:33:49 -06:00
Luke Towers eb4648972f Ensure that the XSRF cookie can always be added to the response, no matter the source of the response 2019-10-28 13:33:07 -06:00
Luke Towers 096ccf875d Implement suggestions from @bennothommo 2019-10-28 12:58:07 -06:00
Samuel Georges f542ca8e90 Implement XSRF checking for AJAX handlers
Refs #4699
Refs #4701
2019-10-24 20:19:20 +11:00
Ben Thomson df65861aff Add clear classes for fields (#4706)
Credit to @bennothommo. Added `clear-full`, `clear-left`, and `clear-right` CSS classes that can be used to apply clearfixes to form fields by adding them to the field's `cssClass` property
2019-10-20 15:47:37 -06: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
Valentijn Evers d52c59254a Improved email client support for branded mails (#4663)
Improves compatibility with Outlook mail clients, preventing harsh word breaks. Credit to @vevers.
2019-10-14 15:33:43 +08: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
nameewgeniy af571ed918 Update ru/validation.php (#4687)
Credit to @nameewgeniy
2019-10-11 14:59:42 +03: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