Luke Towers
a1b1018083
Typo fix
2019-06-21 12:08:36 -06:00
Luke Towers
71241ee6d4
Fix error messages in RelationController
...
Fixes #4342
2019-06-12 00:26:55 -06:00
Alexander Guth
4e92686c1a
Add support for filters in the RelationController configuration ( #4241 )
...
Credit to @alxy. Docs: https://github.com/octobercms/docs/pull/368
2019-05-04 09:08:12 +08:00
Luke Towers
9fa7cbf70e
Hide backend controller behavior public methods from controller actions.
...
Fixes #3762 , replaces #3764
2019-04-19 14:01:01 -06:00
Alexander Guth
132336dcb8
Add getters for relation widgets ( #3164 )
...
These are available for the FormController as well, so this is just consistent and useful in some cases. Credit to @alxy
2019-04-19 12:51:51 -06:00
Marc Jauvin
a2cb01b65d
Add $options param to formRenderField ( #4239 )
...
Allow passing options to Form widget's renderField() method. Credit to @mjauvin
2019-04-05 09:06:52 -06:00
Alexander Guth
b3eb95bb62
Make default format options in ImportExportBehaviour configurable ( #4200 )
...
Credit to @alxy.
If the default format mode is selected, there is no chance to configure the format options for delimiter, enclosure, escape and encoding. This considers a new config file item `defaultFormatOptions` and falls back to `null` if it is not specified.
To keep things consistent, the old default values remain untouched.
2019-04-01 13:00:41 -06:00
Samuel Georges
5190c8177b
Avoid terminating the app using exit() or die()
...
Refs #3783
Refs #3746
2019-03-29 07:10:07 +11:00
Alexander Guth
13d710b161
Reuse the model instance from Form widget ( #4193 )
...
Credit to @alxy & @jimcottrell . Refs:
https://github.com/rainlab/translate-plugin/issues/209
https://github.com/rainlab/translate-plugin/issues/242
https://github.com/rainlab/translate-plugin/issues/330
https://github.com/rainlab/translate-plugin/issues/380
https://github.com/jan-vince/smallextensions/issues/11
https://github.com/OFFLINE-GmbH/oc-mall-plugin/issues/128
https://github.com/OFFLINE-GmbH/oc-gdpr-plugin/issues/21
https://github.com/OFFLINE-GmbH/oc-gdpr-plugin/pull/55
df9c8fd365
https://github.com/octobercms/october/pull/3984
2019-03-15 22:32:36 -06:00
fansaien
8a60d3c19a
Fire backend.list.extendRecords event during export useList ( #4148 )
...
Provides an opportunity to modify and / or return the $results collection object before the controller exports it. Credit to @fansaien
2019-02-19 17:14:32 -06:00
Luke Towers
5853cc54c4
Ensure that FormWidgets are correctly initialized with previewMode even on AJAX requests
2019-01-10 17:39:41 -06:00
Ben Thomson
63dfb7fad3
Replace deprecated prepareModel call in ImportExport behavior
2018-12-30 16:35:17 +08:00
Jim Cottrell
34da61805b
Replace URL parameters dynamically without needing a list in advance ( #3361 )
...
Fixes #3358 . Credit to @jimcottrell
2018-12-18 10:03:03 -06:00
Tobias Kündig
7a277b4b9c
Added support for dependsOn
with relationships ( #3539 )
...
Credit to @tobias-kuendig. Added $.oc.relationBehavior.changed function. To keep track of changes made using the relation controller this new "changed" function is called every time a record is created, added, removed or deleted. The function triggers the change.oc.formwidget event on the form field that belongs to this relation controller so other form fields are notified about the changes.
2018-12-03 10:08:00 -06:00
Francesco Passanti
329bb6f202
Fix relation controller lists onClick handling for VARCHAR keys ( #3544 )
...
Credit to @FrancescoPassanti
2018-11-23 00:58:28 -06:00
Nathan van der Werf
6fb6211c56
Escape output to prevent XSS injections ( #3924 )
...
Credit to @nathan-van-der-werf
2018-11-15 15:05:44 -06:00
Kanstantsin
69a26aa8f2
Commit deferred bindings on model created with RelationController ( #3843 )
...
Fixes #3829 . Credit to @iotch. Tested by the fantastic Octodock provided by @petehalverson
2018-10-04 08:35:30 -06:00
Nathan van der Werf
743252c3ff
Merge branch 'develop' into feature/cleanup
...
# Conflicts:
# modules/backend/widgets/Form.php
2018-08-29 19:18:01 +02:00
Samuel Georges
2d77565e6c
Peer review 52d1388e4e7d7165695af889f8dcc861086ad012
...
This uses a simpler approach and leverages improvements to the validation trait
See 574031d3ee
Refs #2489
2018-08-29 12:19:33 +10:00
Luke Towers
52d1388e4e
Automatically use field labels as custom attribute names for a nicer validation message
...
Fixes #2489
2018-08-26 13:39:49 -06:00
Nathan van der Werf
8fd16d4db6
Merge branch 'develop' into feature/cleanup
...
# Conflicts:
# modules/backend/formwidgets/FileUpload.php
2018-08-24 19:52:54 +02:00
Nathan van der Werf
0f0d108da0
Remove unused imports
2018-08-24 19:51:59 +02:00
Luke Towers
4078e6a56f
Provide inline documentation for the FormWidget events:
...
Documented the following:
backend.form.beforeRefresh
backend.form.refreshFields
backend.form.refresh
backend.form.extendFieldsBefore
backend.form.extendFields
model.form.filterFields
2018-08-15 21:00:31 -06:00
Nathan van der Werf
8b6f11e6ac
Extract child instructions
2018-08-15 19:25:42 +02:00
Nathan van der Werf
fbca3bea92
Remove redundant variables
2018-08-15 19:23:12 +02:00
Nathan van der Werf
62c59a4903
Refactor ternary operators to null coalescing operators
2018-08-15 19:15:13 +02:00
Nathan van der Werf
123145fd54
Remove unnecessary parentheses
2018-08-15 18:49:52 +02:00
Nathan van der Werf
02bd38cfb1
Merge if constructs
2018-08-15 18:45:37 +02:00
Nathan van der Werf
3a918ad200
Remove "null" assignments
2018-08-15 18:33:24 +02:00
Steve Mortimer
5936107c07
Reset pagination on filter scope change ( #3632 )
...
Fixes #3610 . Credit to @stevemortimer
2018-07-16 09:43:47 -04:00
danharrin
ce3c923c6f
Translate "Row" in _import_result_form.htm ( #3574 )
...
Fixes #3566 . Credit to @danharrin
2018-05-31 15:14:08 -06:00
Luke Towers
9840ff228f
Support absolute redirects in the formcontroller
...
Supports absolute redirects being used in the FormController behaviour.
If the form_config.yaml specifies
```twig
create:
redirect: https://api.example.com/oauth/authorize
```
Then the behaviour will now properly redirect the user to the URL provided where previously it would redirect to a url along the lines of `october.example.com/backend/https://api.example.com/oauth/authorize `. Relative backend redirect URLs are unchanged.
2018-02-06 14:42:24 -06:00
Samuel Georges
6ff6ab2996
Convert strings to ::class
2018-01-13 14:40:44 +11:00
tim0991
0783126249
Better check for default deletion redirect ( #3324 )
...
Adds a better check for the default redirect option.
2018-01-01 19:39:25 -06:00
Luke Towers
587d0d1993
Typo fix
2017-12-12 10:41:12 -06:00
Luke Towers
d0546599d1
Allow overriding form config in arbitrary contexts
...
This enables arbitrary form contexts to be defined to override the default values when using a form with custom contexts. I.e. `$this->update($id, 'mycustomcontext');` will load the form definition from `mycustomcontext[form]` instead of `update[form]`
2017-12-12 10:39:03 -06:00
Samuel Georges
2036823eee
Removes non functional buttons in pivot mode
...
Refs https://github.com/daftspunk/oc-test-plugin/issues/28
2017-12-06 17:19:37 +11:00
Luke Towers
b1d0108227
Improved inline docs
2017-12-02 15:43:57 -06:00
Luke Towers
8a5d0c3b13
Correct row numbers displayed in the import result form ( #3136 )
...
* Add support for a source index offset
Improves the reporting of errors in the importing process by getting the correct offset for the displayed row where the error took place.
* Add the source index offset to the row number
Refs ce6df84b04
2017-10-15 13:45:35 -06:00
datune
8906b86027
Add return statement to listExtendRecords event ( #3153 )
...
Fixes #2965
2017-10-04 14:05:05 -06:00
Jofry S
2c97c55ea8
Allow simple pagination option on ListControllers
2017-09-05 13:33:51 +10:00
Samuel Georges
1db67af8e8
Merge remote-tracking branch 'remotes/origin/develop' into l55upgrade
...
Conflicts:
modules/system/lang/en/lang.php
2017-07-11 10:48:54 +10:00
Tschallacka
e8e4209909
Fix inflexible relation toolbar ( #2760 )
...
Improves support for models that don't use `id` as their primary key.
2017-07-04 18:56:38 -06:00
Samuel Georges
605c8221a9
getPlainForeignKey -> getForeignKeyName
2017-05-20 20:03:48 +10:00
Samuel Georges
57aa723c23
filterExtendScopes -> listFilterExtendScopes
...
extendFilterScopes -> extendListFilterScopes
Filter still belongs to the "List", this would help resolve conflicts if there were ever a FilterController that would carry rightful claim to "filterExtendScopes"
2017-05-14 14:47:17 +10:00
CSNWEB
fe3e44efeb
Add method to easily extend filter scopes ( #2866 )
...
* Add method to easily extend filter scopes
* Add non static method for filter scope extension
2017-05-13 17:31:09 -06:00
Quezler
cc17b679f1
Code dusting ( #2826 )
...
Code cleaning according to PSR-2 w/ exemptions (mostly dust).
2017-04-24 21:38:19 +10:00
Samuel Georges
330a41f39c
Improve form controller docs
2017-03-23 08:48:26 +11:00
Samuel Georges
0a981a25f7
API docs progress
...
Controller -> SystemController for consistency
2017-03-16 17:08:20 +11:00
Samuel Georges
51ac144049
Moves CMS components to directory where they belong
...
Improve inline docs
2017-03-16 07:00:39 +11:00