Ben Thomson
a59d3b83eb
Code quality clean up ( #4449 )
...
Credit to @bennothommo
2019-07-18 08:50:37 -06: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
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
Luke Towers
5853cc54c4
Ensure that FormWidgets are correctly initialized with previewMode even on AJAX requests
2019-01-10 17:39:41 -06: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
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 52d1388e4e
...
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
fbca3bea92
Remove redundant variables
2018-08-15 19:23:12 +02:00
Nathan van der Werf
123145fd54
Remove unnecessary parentheses
2018-08-15 18:49:52 +02: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
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
Luke Towers
b1d0108227
Improved inline docs
2017-12-02 15:43:57 -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
b841f9e066
{@inheritDoc} -> @inheritDoc
2017-03-16 06:26:14 +11:00
Samuel Georges
788f109361
Use transactions when saving form models
...
This is a good idea in general to protect the data integrity. There may be some edge cases where transactions are undesirable, if/when we find one, a configuration option should be created to disable this behavior.
Fixes #2431
2016-10-29 11:28:39 +11:00
Luke Towers
b26eeed03c
Enable refresh on form controller requests (correct branch)
...
This adds support for a redirect to the current page (a refresh) to be returned by the form controller. An example use case is adding `data-request-data="refresh:1"` to the save button on an update form. I'm using it for an update form that disables certain fields (including a relationRender partial) based on values submitted on that page. Refreshing the view after saving allows my disabling rules to take effect.
2016-07-27 09:05:12 -06:00
Samuel Georges
0d451eaa78
Be less strict about formExtendModel returning a model
2016-04-28 05:47:14 +10:00
Samuel Georges
0504da41f2
Add hasFields methods
...
formHasOutsideFields, formHasPrimaryTabs + formHasSecondaryTabs
2016-04-23 05:13:08 +10:00
Samuel Georges
6e7fa7de88
Allow CmsObjects to define their own Twig cache key
2016-03-21 13:42:03 +11:00
Samuel Georges
ce202c7951
create_onSave() forgot to extend model
2016-02-23 14:36:00 +11:00
Joshua Wilson
6f3d7a58f2
Phpdoc cleanup for System\Traits
...
removed in WidgetMaker trait
phpdoc cleanup of backend traits and classes
Minor fix for cases when file is not found
2016-02-13 14:06:50 +11:00
Samuel Georges
cd055ad437
Fixes formExtendModel method so it actually works.
...
The extension must occur after the ::find() method, which will return a fresh object. When it occurs before, any changes to the model are lost. Where this may have prior been used to dynamically return a different model, the formCreateModelObject override method should return this value now.
2016-02-10 19:38:35 +11:00
Samuel Georges
933ea641cc
Adds failed jobs table (from docs)
...
Allow closures to be passed to Form|ListController
Tidy up server detail payload
2015-09-23 05:45:55 +10:00
Samuel Georges
846feb6a33
FileUpload now triggers dependsOn event
...
form.beforeRefresh event now uses dataholder pattern
Improve exception handling in ControllerBehavior
2015-07-18 08:50:31 +10:00
Samuel Georges
f0f1c549c9
Use a non logging exception, constructors return void is implied
2015-07-15 16:56:01 +10:00
Samuel Georges
398177b006
Full pivot support added to RelationController
2015-03-19 20:01:08 +11:00
Samuel Georges
a8389fb1aa
Tooltip now auto initializes
...
initForm can now pass context
Various improvements and bug fixes
2015-03-12 20:50:16 +11:00
Samuel Georges
7145aac457
Prepare for CDN, config rename cms.plugins|themes|uploadsDir -> cms.plugins|themes|uploadsPath
...
Deprecate data-trigger-type on triggerapi
Fixes ref to Util class
2015-02-17 20:58:38 +11:00
Samuel Georges
0a6e14f4d2
Popup control now supports several sizes via `data-size` attribute: giant, huge, large, small, tiny.
...
Fixes various bugs in RC version
2015-02-11 14:36:00 +11:00
Samuel Georges
beb818efa5
Merge branch 'develop' into laravel5
...
Conflicts:
modules/cms/classes/CmsCompoundObject.php
modules/system/ServiceProvider.php
2015-02-04 19:35:55 +11:00
Samuel Georges
167d113c12
depends -> dependsOn
...
Hidden fields now retain their container div (hidden when empty)
2015-01-29 20:32:24 +11:00
Samuel Georges
b1b700368f
Radical reorg of some classes
2015-01-28 11:49:54 +11:00
Samuel Georges
3e5d6452fb
Fixes #373 - FormController can now accept different form fields for create,update,preview
2014-12-06 13:48:33 +11:00
Samuel Georges
c485622f5b
FormController is now responsible for purging data from the set (NO_SAVE_DATA)
2014-12-05 16:48:27 +11:00
Samuel Georges
70eb7eaf51
Adds Theme customization feature
...
Adds reset button to settings pages
authorUrl -> homepage
2014-12-04 16:49:52 +11:00
Samuel Georges
7801750767
Adds a way to get the form model after the action has executed
2014-11-19 17:45:23 +11:00
Sam Georges
f458fb7704
Overhaul Form layouts, adds FormTabs.php class for managing tab properties
2014-11-12 07:33:58 +11:00
Sam Georges
c32ba4cbad
Minor code clean
2014-11-04 17:41:48 +11:00
Sam Georges
c83797231d
Subsequent expressions are on a new line (see developer guide > PSR exceptions)
2014-11-01 12:00:45 +11:00
Stefan Talen
61cf1ad710
Merge branch 'develop' of https://github.com/octobercms/october into feature/PSR-2
...
Conflicts:
modules/backend/behaviors/FormController.php
modules/backend/classes/AuthManager.php
modules/backend/lang/fa/lang.php
modules/backend/widgets/Form.php
modules/cms/classes/CmsCompoundObject.php
modules/cms/classes/ComponentHelpers.php
modules/cms/formwidgets/Components.php
2014-10-11 11:58:20 +02:00
Sam Georges
4504d5bf4c
Improve translation handling
2014-10-11 10:37:48 +11:00
Stefan Talen
b01d3e540f
Updating backend/behaviours
2014-10-10 22:34:57 +02:00
Sam Georges
80e7a8507e
Add static helpers extendListColumns + extendFormFields
2014-10-05 15:57:55 +11:00