5181 Commits

Author SHA1 Message Date
Marc Jauvin
600fbd7cfa
Improve code readability for exists method (#5022) 2020-04-02 08:33:58 -06:00
Marc Jauvin
9aa6b9d9d1
Add more unit tests for the PluginManager (#4838) 2020-04-01 21:47:06 -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
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
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
d3a87dbc02 Remove dev build badge as the text is the same on both 2020-03-31 01:02:46 -06:00
Luke Towers
19ea053515 Updated status badge 2020-03-31 01:01:42 -06:00
Luke Towers
2bc4084dff Fixed composer requirement
Composer does not support commit specific requirements when it comes to fetching the composer.json metadata, which means that this particular fix has to specify a tag instead of a commit hash.
2020-03-31 00:54:56 -06:00
Luke Towers
8979d50593 Lock wikimedia/composer-merge-plugin to version that still supported PHP 7.0-7.2.
Support was removed in d21d197a60 (and later relaxed to 7.2.0 as a minimum requirement in the next commit). This change should be reverted when the L6 upgrade is merged in.
2020-03-31 00:46:50 -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
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
Nick Khaetsky
df0c2d4b95
Change default https redirect from 302 to 301 (#5008)
Changing default redirect from http to https to 301 (permamently moved) from 302 (temporary moved).

Reason: every website in nowadays must be working through https protocol, and 302 status is wrong for this type of redirect.
2020-03-27 12:14:51 -06:00
Ben Thomson
61cadeb623
Switch PHP Parallel Lint provider.
jakub-onderka/php-parallel-lint has been abandoned, and the original author has recommended swithcing to php-parallel-lint/php-parallel-lint.

Fixes #5007.
2020-03-27 14:48:45 +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
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
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
210fe89fcd
Add GitHub Action for comment commands (#4987) 2020-03-17 13:05:12 +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