2790 Commits

Author SHA1 Message Date
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
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
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
1d65e61ffc
Update Dutch translation (#4958) 2020-02-28 17:47:33 +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
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
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
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
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
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
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
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
Ayumi
56eab50260 Documented session.http_only (#4743)
Credit to @ayumi-cloud
2019-12-14 11:14:23 -06: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 11be3fede39024f285309f61cbf32ee4d0d5cc28
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 1d91c221b0b32592ec93c9f4824d108fc2a5cc5e
2019-12-13 21:34:59 +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
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
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
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
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
Tobias Kündig
61129b48ec Only put sortOptions to the session if the List query succeeded 2019-11-29 08:26:37 +01: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
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