Commit Graph

151 Commits

Author SHA1 Message Date
Samuel Georges cb86e655dd Fixes disabled relation nulling value
Just like DatePicker, relation and even regular fields should omitted from the data set
The same logic should apply to hidden fields
Fixes #1827
Recompile assets
2016-05-15 06:47:28 +10:00
Samuel Georges 5400ec7d2d Complete taglist form widget 2016-05-10 06:02:35 +10:00
Samuel Georges 5d27682f25 Create new TagList form widget (Experimental)
Update Select2 to latest
2016-05-08 17:43:21 +10:00
Samuel Georges 0504da41f2 Add hasFields methods
formHasOutsideFields, formHasPrimaryTabs + formHasSecondaryTabs
2016-04-23 05:13:08 +10:00
Samuel Georges 808c8f0ca4 Minor tidy and rollback from #1720 2016-02-13 14:41:17 +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 e367febb93 Roll back some stuff from #1704 2016-02-13 13:18:48 +11:00
Alwin Drenth 386f958b6e Code improvements and added proper PhpDoc 2016-02-13 13:08:30 +11:00
Pásztor Gábor 31457bd2ee Cleanup 2016-01-15 10:20:57 +01:00
Samuel Georges af657e9399 Fixes #1042 - remove fillable constraint on models when saving
Form fields are already constrained by their fields.yaml definition (values not defined in the yaml will not be saved) so we don't need to double dip by enforcing fillable too.
2015-10-17 11:41:40 +11:00
Samuel Georges ef22ac934d DRY up code from #1504 2015-10-17 10:16:49 +11:00
Samuel Georges b7505a2cd7 Returning save data now depends on form fields, so they should always be defined 2015-10-05 18:00:01 +11:00
Samuel Georges 3a7e1d6d31 Fixes #1480 - Allow postback key names to use dots 2015-10-05 12:11:25 +11:00
Samuel Georges a636dd1ad8 Form widgets returns data only if it has a field definition 2015-09-26 11:41:02 +10:00
Samuel Georges fc04bd1b4c Added new makeFormWidget() method to WidgetMaker for rendering form widgets individually 2015-08-07 19:06:04 +10:00
Samuel Georges b010732796 These methods should be protected, update client lang 2015-08-04 10:01:17 +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 be05899a52 Outside fields don't use tabs 2015-05-21 22:55:08 +10:00
Samuel Georges c4027b8bc6 Added a defaultFrom option to form fields
Default context of manage and pivot forms is now create and update respectively, instead of the old value relation
2015-03-28 16:14:22 +11:00
Samuel Georges a1ac5edbf7 Various minor fixes and improvements 2015-03-18 19:28:14 +11:00
Samuel Georges c6bfd5d01c Move this logic to no longer depend on AR model 2015-03-10 09:34:59 +11:00
Samuel Georges 3ecdf2c74b Fixes #977 - Look to related models for getting dropdown-type options 2015-03-07 13:14:13 +11:00
Samuel Georges 668457b4e6 Updated deprecated references
Str::evalHtmlId -> October\Rain\Html\Helper::nameToId
Str::evalHtmlArray -> October\Rain\Html\Helper::nameToArray
Str::stripHtml -> October\Rain\Html\Helper::strip
Str::limitHtml -> October\Rain\Html\Helper::limit
Str::cleanHtml -> October\Rain\Html\Helper::clean
2015-03-07 12:48:39 +11:00
Samuel Georges 507bfab768 !!! *BREAKING*: Form widget base class no longer takes a model as the 2nd argument, it should be passed as `model` in the configuration instead. 2015-03-06 20:37:05 +11:00
Samuel Georges f869b8cc94 Gives FormWidgets the ability to say: "No labels, please"
ping @keiosweb
2015-03-03 20:24:14 +11:00
Samuel Georges 1ab8858271 Minor touch ups 2015-03-03 18:38:36 +11:00
Samuel Georges f9e287e173 Refactor form widget to use an approach much like ReportContainer 2015-02-28 13:37:06 +11:00
Samuel Georges 85c47c4e01 public -> protected $defaultAlias 2015-02-28 12:43:53 +11:00
Samuel Georges 5784417862 Document widget accepted config
These definitions don't serve a function other than helping developers
2015-02-28 11:50:27 +11:00
Samuel Georges e487f075c4 Fixes issue in CodeParser where it tries to use a class that doesn't exist
Adds context to filterFields() model override
2015-02-26 23:08:38 +11:00
Samuel Georges e6acb54d03 * Build 209 2015-02-25 19:10:42 +11:00
Pásztor Gábor f8cb3900f0 Add validation rules for mail settings. 2015-02-21 19:55:37 +01: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 6a2f64757b *** REMOVED ALL DEPRECATED CODE ** 2015-02-14 14:11:25 +11:00
Samuel Georges 2b32fc4718 Minor touch ups 2015-02-12 08:37:24 +11:00
Samuel Georges 77d0d25f64 Merge pull request #934 from Flynsarmy/removeFormField
Add support for removing form fields
2015-02-12 08:32:03 +11:00
flynsarmy 5805ddec5a Add support for removing form fields 2015-02-07 19:52:34 +10: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 b74b19741b Unify the logic for getting field values from a dataset
Amongst Form Widgets and "the" Form widget
ping @alekseybobkov
2015-01-05 12:54:14 +11:00
Samuel Georges 0be582c42d getSaveData -> getSaveValue 2015-01-05 09:43:39 +11:00
Darek Magusiak 9bda36e441 Model field definitions and default value of '0'
#845
2014-12-22 21:02:46 -05:00
Samuel Georges 25f9b7f63c Default value might be an array 2014-12-16 12:22:58 +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 2533b4ab4d ThemeData now applies default values, Theme object will proxy to ThemeData 2014-12-05 16:45:20 +11:00
Samuel Georges 78c5a6af5d Fixes #761 - Widgets can support proxy fields too 2014-11-27 19:15:15 +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 23f6d75416 Peer review of #679 2014-10-19 10:58:18 +11:00
Stefan Talen 4fa6db3bd5 Fixing minor issue 2014-10-11 12:15:02 +02: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 71f9df8e13 Use HTML to pass unchecked checkboxes/switches. Refs #648 2014-10-11 14:31:09 +11:00
Sam Georges 1dcaa0d1d6 Fixes #677 - use FQN for "instanceof Model" expressions 2014-10-11 12:13:25 +11:00
Sam Georges 4504d5bf4c Improve translation handling 2014-10-11 10:37:48 +11:00
Stefan Talen b64a744498 Updating modules/backend/widgets 2014-10-11 00:39:34 +02:00
Sam Georges cc8d833ea8 Minor 2014-09-18 08:22:22 +10:00
Sam Georges bbfc665e88 Minor 2014-09-17 17:18:44 +10:00
Sam Georges a5f17edc45 Handle fields that differ by fieldName and valueFrom 2014-09-17 17:10:13 +10:00
Sam Georges 4f00fbdbc6 Minor. keyField -> keyFrom 2014-09-17 16:47:55 +10:00
Sam Georges 4763c9598a Add valueFrom to form field, rename field->columnName to field->fieldName 2014-09-17 14:43:24 +10:00
Sam Georges 109df00340 nameColumn -> nameFrom
descriptionColumn -> descriptionFrom
2014-09-17 13:39:37 +10:00
Samuel Georges d8bd36e2f5 Merge pull request #624 from Flynsarmy/balloonOptions
Add dynamic option support to balloon-selector fields
2014-09-13 21:44:54 +10:00
flynsarmy 635cb4f4d3 Add dynamic option support to balloon-selector fields 2014-09-13 21:43:43 +10:00
flynsarmy 60958efeed Set number fields to null if no value entered 2014-09-13 18:29:10 +10:00
flynsarmy 0fd0b29772 Correctly sanitize number fields 2014-09-13 17:17:15 +10:00
Sam Georges 8291dbf4d3 Widgets can now state that they contribute no data when the form is saved
Applied to FileUpload.php
2014-09-06 22:22:59 +10:00
Sam Georges f3c6260c3e Slightly different fix to #580. Closes #580 2014-09-06 22:02:56 +10:00
Sam Georges 0243f47651 Fixes empty reference when using Form widget outside FormController 2014-08-30 09:49:48 +10:00
Sam Georges 4e4df36dad Tidy up code 2014-08-23 21:46:03 +10:00
Sam Georges f99bd0e427 Tidy up the Form widget object, allFields and formWidgets no longer public 2014-08-03 10:25:19 +10:00
Sam Georges 56d0c3351b private -> protected 2014-08-01 14:54:16 +10:00
Sam Georges 6388ecef52 private -> protected 2014-08-01 13:58:59 +10:00
Sam Georges 4fa00f1c7b Fixes an issue where unfilled relations are not populated in forms 2014-07-28 17:01:54 +10:00
Sam Georges 62df6948b0 Required fields are now automatic from model validation
Make required asterisk more obvious
2014-07-12 16:56:26 +10:00
Sam Georges f4a9286c45 Improve form widget 2014-07-09 19:36:49 +10:00
Sam Georges d912b73aab Clean up event parameters to dev standards 2014-07-04 19:14:14 +10:00
Sam Georges 2f3d42a3f9 Improvements to mailer classes 2014-07-04 19:14:13 +10:00
Sam Georges b09b6d6863 Improved naming onReload -> onRefresh
Improved Record finder
2014-07-03 18:37:51 +10:00
Sam Georges 766d012187 Refactor Form widget logic and partials, better naming and container usage. 2014-06-30 13:23:08 +10:00
Sam Georges e1778f62a4 Minor 2014-06-29 14:00:20 +10:00
Sam Georges 4a9fe06d50 Form fields can now define "depends" to refresh individual fields when they are changed
Form field options can now be deferred using a closure
2014-06-29 13:36:25 +10:00
Sam Georges 60de683cb8 Add new form field type called "number" 2014-06-20 17:41:51 +10:00
Sam Georges 294961cf8a Refactor how the Form widget manages fields.
Widgets no longer need to pass configuration through "options".
2014-06-19 21:43:00 +10:00
Sam Georges df25c5d9f7 Fixes #308 2014-06-16 22:22:31 +10:00
Sam Georges 91a6918c02 Consider extensible classes (->methodExists()) when looking for dropdown options 2014-06-16 18:00:41 +10:00
Sam Georges 8b9eb52afd Fixes #255 - Adds a code editor settings page
Email layouts now work
Form fields now support context in their names
2014-06-10 19:30:06 +10:00
Sam Georges 99408b6b2a Clean 2014-06-08 18:08:54 +10:00
Sam Georges c044e63a07 Bug 2014-06-08 18:07:56 +10:00
Sam Georges 8359baa719 Fixes issue where default value on form fields is not set 2014-06-08 10:58:39 +10:00
Sam Georges 88b138e0d7 Allows empty dropdown arrays 2014-06-01 10:35:14 +10:00
Sam Georges f525b7663b Fix logic flaws 2014-06-01 10:23:59 +10:00
Sam Georges c1e2e81d65 Fix drop down empty arrays being treated as nothing, add advanced callable array to get options from model 2014-06-01 10:15:33 +10:00
Sam Georges 6d190c3ef5 Fixes #238 - Missing else 2014-06-01 09:14:55 +10:00
Sam Georges 3f767774c4 Add a new global method getDropdownOptions() for specifying dropdown values
Dropdown overrides now supply the key value and form field name where appropriate.
2014-05-31 10:40:11 +10:00
Sam Georges 9e2a76d821 Add core build tag to core assets 2014-05-24 16:57:38 +10:00
Sam Georges ab2ea0a240 Minor inaccuracy 2014-05-21 21:26:28 +10:00
Sam Georges 5091fd08c6 Adds support for objects (relations) when reading form data 2014-05-18 16:09:54 +10:00
Sam Georges bdff075058 Improve event emitter trait 2014-05-15 17:23:46 +10:00
Sam Georges 4b0eed62a6 Fixes form widget saveData bug
Where nested checkboxes values get set at root level
2014-05-15 09:05:04 +10:00