Commit Graph

2946 Commits

Author SHA1 Message Date
Patrick Boivin 987dfa4eb7
Add Paragraph Formats to Editor Settings (#4861)
Co-authored-by: Luke Towers <github@luketowers.ca>
Co-authored-by: Ben Thomson <ben@abweb.com.au>
2020-07-16 17:54:21 +08:00
Ben Thomson 4950edc196
Add sensitive field input (#5201)
A field widget that allows for entering of sensitive information that can be revealed at the user's request - ie. API keys, secrets.

When a sensitive field that has been previously populated is loaded again, a placeholder is used instead of the real value, until the user opts to reveal the value. The real value is loaded via AJAX.

Credit to @tomaszstrojny for the original implementation.

Replaces #5062. Fixes #5061, #1850, perhaps #1061.

Co-authored-by: Tomasz Strojny <tomasz@init.biz>
Co-authored-by: Luke Towers <github@luketowers.ca>
2020-07-08 16:26:38 +08:00
Luke Towers dd8ceaa106 Merge branch 'develop' into wip/laravel-6 2020-06-27 20:06:39 -06:00
Luke Towers b2d88d6da9 Fix issue when refreshing an entire form that occurs because the toggleEmptyTabs timer runs after the elements it was based on have all been replaced. 2020-06-24 11:33:44 -06:00
Ben Thomson 47ca69e1f4
Merge remote-tracking branch 'origin/develop' into wip/laravel-6 2020-06-23 11:01:21 +08:00
Giuseppe Montuoro cbbc82ac86
Use the current context when making redirects in FormController onSave handlers (#5132)
Related: d0546599d1
2020-06-20 16:04:57 -06:00
Luke Towers ef36399cf7 Improve error handling for invalid counter properties on backend menu items 2020-06-19 23:54:44 -06:00
Luke Towers dc400a0e20 Fix issue where the throttle feature was no longer logging IP addresses.
Fixes #5128
2020-06-18 11:27:53 -06:00
Luke Towers b384954a29 Improve Froala sanitization of pasted content. 2020-06-18 11:03:48 -06:00
Luke Towers 9c6c6b5a12 Merge branch 'develop' into wip/laravel-6 2020-06-17 03:37:55 -06:00
Luke Towers 0cdda52eb8 Fix bug where a field with `@context` in the name would completely break forms if it also depended on other fields.
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.
2020-06-17 03:05:40 -06:00
Tomasz Strojny 68d0667bd4
Updated Polish translation (#5129) 2020-06-17 16:10:37 +08:00
Romain 'Maz' BILLOIR 81a11f70c4
Fix Froala strip empty tags issue (#5126)
Co-authored-by: Ben Thomson <git@alfreido.com>
2020-06-16 14:59:40 +08:00
Luke Towers 24f87ae10e Also remove custom sorts from relationcontroller lists / pivot manage modes.
Fixes https://github.com/octobercms/october/issues/4335#issuecomment-643706004, refs: 5f8a5454ee
2020-06-14 14:29:21 -06:00
Luke Towers ad69711634 Merge branch 'develop' into wip/laravel-6 2020-06-11 10:38:29 -06:00
Luke Towers 02af8bb254 Improve error handling when uploading a file that exceeds the server's post_max_size 2020-06-05 15:56:15 -06:00
Luke Towers 314b15dd13 Support decompiling mediamanager assets 2020-06-05 15:52:59 -06:00
Luke Towers 434f2cd433 Improve error handling for UploadableWidgets 2020-06-05 15:52:27 -06:00
Luke Towers 547d9bffeb Support nested asset files and files under a symlinked directory when decompiling backend assets 2020-06-05 15:51:12 -06:00
Alexander Guth 9e64e63805
Add filters widget to the pivot view (#5099)
Fixes #5089
2020-06-02 00:53:57 -06:00
Samuell b63a39b106
Add missing import (#5101) 2020-06-01 10:42:15 -06:00
Luke Towers 5c3ba9a28a Fix naming conflict
Reported by @alxy https://github.com/octobercms/october/pull/5088#issuecomment-636448210
2020-05-31 11:23:31 -06:00
Luke Towers 5c7ba9fbe9 Update combined jquery file to 3.4.0, added fix for #5097 2020-05-31 02:32:58 -06:00
Luke Towers 252c9b7f58 Merge branch 'develop' into wip/laravel-6 2020-05-27 12:44:54 -06:00
Marco Grüter b417a4938f
Render the css classes on the filter widget (#5067) 2020-05-26 15:25:06 -06:00
Alwin Drenth 8196b8169e
Improved Dutch translations (#5091) 2020-05-26 09:59:11 -06:00
Luke Towers 71d579b947 Update language string 2020-05-25 18:11:05 -06:00
Luke Towers 9ecfb4867b Add new backend.allow_unsafe_markdown permission 2020-05-25 18:02:20 -06:00
Luke Towers 655c8011b9
Fix client side validation (#5088)
* Add data-request-validate to core save buttons

* Check if client side validation is desired before running it

Fixes #5076.
2020-05-25 12:53:48 -06:00
Luke Towers 908d2f91c4 Merge branch 'develop' into wip/laravel-6 2020-05-21 09:47:38 -06:00
Ben Thomson cf12edb861
Use IE11-compatible code for worker deregistration. (#5079)
Fixes #5078.
2020-05-19 18:59:03 +08:00
Ben Thomson 5c8f567323
Merge remote-tracking branch 'origin/develop' into wip/laravel-6 2020-05-18 08:35:03 +08:00
Flynsarmy b896924dec
Only prepare the filter widget if there are scopes to prepare (#5064)
Fixes #5063. Collaborative effort between @LukeTowers & @Flynsarmy
2020-05-05 00:07:08 -06:00
Luke Towers e78d5fe2bf Merge branch 'develop' into wip/laravel-6
# Conflicts:
#	modules/system/classes/UpdateManager.php
#	modules/system/classes/VersionManager.php
2020-04-29 16:58:58 -06:00
Luke Towers fc8e258c6d set attributes and save instead of creating via mass assignment to play nicer with various features and avoid requiring fillable properties to be set 2020-04-29 16:48:46 -06:00
Marc Jauvin 29740ea1e8
add input tag id to css selector so it does not get overriden by a more generic css rule (#5057)
Improves on fix to #5054
2020-04-29 15:50:12 -06:00
Luke Towers 35ecf7019d Fix visual bug with remember checkbox on mobile.
Fixes #5054
2020-04-28 09:56:02 -06:00
Tobias Kündig dc72cafcd1
Don't persist failed search terms (#5039)
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
2020-04-27 01:55:40 -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
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 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
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 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
Tobias Kündig 86197f59cb
Add Preset buttons for editor toolbar settings (#4700)
Fixes #4187.
2020-04-03 08:47:20 -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
Tobias Kündig 32443135c9
Remove JS layout calculations of the backend navbar by using flexbox (#4811) 2020-04-02 10:47:24 -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
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
Samuell a9b4a5b2c7
Prevent browser caching of list checkboxes (#4949) 2020-03-31 02:31:16 -06:00
Luke Towers d3596310c6 z-index fixes for richeditor toolbar.
Fixes #4868. Related to d7b0e55ceb.
2020-03-31 01:35:21 -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
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
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
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
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 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