Commit Graph

290 Commits

Author SHA1 Message Date
alekseybobkov a943708b99 UI updates 2016-02-19 22:12:41 -08: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 3cfc7b6a5d Move widget classes that are exclusive to their own space 2016-01-16 16:02:28 +11:00
Pásztor Gábor 31457bd2ee Cleanup 2016-01-15 10:20:57 +01:00
Samuel Georges 2213c6f28c Fix string comparison function
Flush stray output on view errors
2016-01-02 16:13:30 +11:00
Samuel Georges a186a60c43 Fixes the datepicker saving an empty value when disabled
Refs https://github.com/responsiv/campaign-plugin/issues/4
2015-12-09 08:19:53 +11:00
Samuel Georges 04e61adac3 Add official support for "nolink" columns - Fixes #1599
To make a row non-clickable, use the `clickable` option in the list column definition
2015-12-05 10:05:42 +11:00
Samuel Georges 33d39c8b34 Minor 2015-10-17 10:51:54 +11:00
Samuel Georges f446f8acd4 Merge pull request #1506 from tschallacka/FormFieldCatchForEmptyYaml
Fixed form field parsing to accept no config
2015-10-17 10:23:58 +11:00
Samuel Georges ef22ac934d DRY up code from #1504 2015-10-17 10:16:49 +11:00
tschallacka c4fffbd6f7 Fixed form field parsing to accept no config
If a programmer would define a yaml like

    fields:

        shortcut:

        country:

It would fail with message

    "array_key_exists() expects parameter 2 to be array, null given" on line 275 of ..\modules\backend\classes\FormField.php

The yaml parsing returns a null. This check intercepts that null value being passed to the function and turns it into a proper array.
2015-10-09 16:06:23 +02:00
flynsarmy 82c2787f39 Add support for default values in form widgets 2015-10-09 13:51:33 +10:00
Samuel Georges 1c8d021a35 Adds the ability to remove navigation items
Included tests
Refs #1413
2015-09-12 08:45:58 +10:00
Samuel Georges 2a6b58a3fe Merge pull request #1425 from Flynsarmy/getPublicActions
Add getPublicActions controller method
2015-09-08 12:48:44 +10:00
flynsarmy 98e1d0fe4d Add getPublicActions controller method 2015-09-07 14:17:09 +10:00
Samuel Georges 917cfd437f Make sure a tab is defined always - Refs #1397 2015-08-29 16:45:01 +10:00
Jérémy GAULIN 2872e80a14 Merge branch 'develop' of https://github.com/octobercms/october into fix-extending-plugin 2015-08-03 18:20:20 +02:00
Jérémy GAULIN f22a16d482 Fix NavigationManager error when extending a side menu by adding a new item.
The code and owner were not set in the value array.
2015-08-03 18:07:56 +02:00
Samuel Georges bb4c2da404 Revert change from #1315, fixes original issue, write tests 2015-07-28 18:52:12 +10:00
Samuel Georges 48b4a137fa Allow passing explicit content to hints 2015-07-25 09:34:47 +10:00
Samuel Georges d453f922dc Improve the hint API, add inset mode to loader 2015-07-25 09:23:34 +10:00
Samuel Georges fc490b18e9 Add actionUrl() helper to backend controller
Used for generating URLs to the current controller
2015-07-23 19:44:54 +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 606892143b Added new security config option cms.enableCsrfProtection 2015-07-04 09:31:28 +10:00
Samuel Georges f9c921a797 Adds getAjaxHandler() API to controllers
Fixes bug where update process fails midway
2015-06-30 08:56:53 +10:00
Samuel Georges c9a9c6ea16 List columns now support specifying a default option used when the value would otherwise be null. 2015-06-27 10:39:07 +10:00
Samuel Georges d9dfa21372 Adds CSRF protection to the backend - Refs #105 2015-06-20 21:17:58 +10:00
Samuel Georges cd1d62d8d7 AJAX requests can only use the POST method 2015-06-20 20:18:58 +10:00
Samuel Georges 37e5b2328f Form text/password/number fields now support maxlength attribute - Fixes #1210 2015-06-20 12:00:37 +10:00
Samuel Georges e71025de09 Tidy up from #1219 2015-06-18 18:46:03 +10:00
flynsarmy 9a9a525180 Remove empty tabs when removing form fields 2015-06-18 14:44:43 +10:00
Samuel Georges 9ed73e0cba Updates for new symbolizePath API, requires latest rain lib code
Backend layouts can now be provided by plugins
2015-05-30 15:54:47 +10:00
Samuel Georges a1291c3716 Restyle Administrator pages 2015-05-21 22:55:08 +10:00
Samuel Georges cceae62812 Apply incremental default order values on side menu items
Refs #1079
2015-05-02 10:47:06 +10:00
Samuel Georges 7c205c7ceb Merge pull request #1079 from dshoreman/sortable-sidenavs
Add support for sorting sideMenu items
2015-05-02 10:28:55 +10:00
Samuel Georges 9173e3bb9a Merge branch 'develop' into media-manager 2015-04-23 18:09:18 +10:00
Dave Shoreman e6342dbd8a Add support for sorting sideMenu items
Up until now, only main menu items have supported the 'order' parameter
to set the sort order. This adds the same support to side menus, which
is especially useful when one plugin extends the side menu of another.

There is one downside: any existing plugins that use the side menu will
inevitably end up with their menu items appearing out of order, until
the author adds the 'order' parameter to their sideMenu array.
2015-04-22 22:16:06 +01:00
Samuel Georges 1a037bad04 Add the ability to include middleware in CMS / Backend controllers
Add init.php script to plugins
Fixes https://github.com/octobercms/library/issues/106
2015-04-21 20:07:34 +10:00
alekseybobkov c1740c479c Media Manager: implemented insert link, insert image, and crop and insert features. Minor fixes in October core and third-party JS plugins. 2015-04-11 18:55:02 -07:00
Samuel Georges 7e9e5adfb5 Merge pull request #1032 from keiosweb/fix_hhvm_relation_formfield_issue
fixes HHVM relation formfield
2015-04-01 19:02:08 +11: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
Łukasz Biały e19759c9f9 fixes HHVM relation formfield (belongsToMany in particular) issue in which no data is pulled from relation 2015-03-27 23:03:38 +01:00
Samuel Georges a743d78658 List Column of type switch now has text-center CSS
List Column now have getName and getId accessors
2015-03-25 19:35:00 +11:00
Samuel Georges 0916c7a650 Fixes #1008 - typo in code 2015-03-18 05:41:39 +11:00
Samuel Georges 77d3ab8b67 Finish basic theme utilities: properties, import/export, duplicate, delete 2015-03-16 19:00:39 +11:00
Samuel Georges 9b8e1ce3c1 Improve theme list to allow editing properties 2015-03-14 18:09:54 +11:00
Samuel Georges e479ccbda6 Tab options can now specify 'defaultTab' 2015-03-14 17:06:03 +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 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 8c41bc181e Model can now resolve this for us 2015-03-07 12:28:50 +11:00
Samuel Georges 8ca1f8b7a3 Discovered an undoc feature "data-input-preset-prefix-input"... added to API as "prefixInput" 2015-03-07 11:14:03 +11:00
Samuel Georges 69542c311c Form field "preset" options can be a string that just specifies the other field, defaults to url type 2015-03-07 11:02:16 +11:00
Samuel Georges f8c3eac9c6 Streamline data-input-preset in to FormField API 2015-03-07 10:45:22 +11:00
Samuel Georges 7e3cf98a75 Adds data-trigger-closest-parent to Trigger API
Test code:

<form id="form1">
    <input
        type="text" name="aa" value="aaa"
        data-trigger-action="show"
        data-trigger="input[name=bb]"
        data-trigger-condition="checked"
        data-trigger-closest-parent="form"
     />

    <input type="checkbox" name="bb" />
</form>

<form id="form2">
    <input
        type="text" name="aa" value="aaa"
        data-trigger-action="show"
        data-trigger="input[name=bb]"
        data-trigger-condition="checked"
        data-trigger-closest-parent="form"
     />

    <input type="checkbox" name="bb" />
</form>
2015-03-07 09:47:44 +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 a3f3084924 Implement AjaxException 2015-03-03 18:41:09 +11:00
Samuel Georges 85c47c4e01 public -> protected $defaultAlias 2015-02-28 12:43:53 +11:00
Samuel Georges 932a40a025 Streamline the process of filling a widget with its config options 2015-02-28 12:12:22 +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
Amanda Tresbach d50e9e743f Allow setting 'options' for a scope in filter config 2015-02-22 20:28:05 -03:00
Pásztor Gábor f8cb3900f0 Add validation rules for mail settings. 2015-02-21 19:55:37 +01:00
Samuel Georges c746ba5c2b Disabled property on form fields should work 2015-02-21 17:09:21 +11:00
Samuel Georges 6bf72386ee Can now prune event/request log records, add width definition to list columns 2015-02-21 13:49:32 +11:00
Samuel Georges 536a391754 Add basic trigger implementation to Form Field
Implement trigger on Mail Settings page
2015-02-18 18:12:20 +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 7b52e07b65 Overhaul exceptions, rename triggerapi display -> show 2015-02-16 21:16:43 +11:00
Samuel Georges 6a2f64757b *** REMOVED ALL DEPRECATED CODE ** 2015-02-14 14:11:25 +11:00
Samuel Georges e50a220fae Fixes an issue where unix users get locked out of the backend 2015-02-12 21:02:47 +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
Samuel Georges 439f9a05c2 Merge pull request #941 from Flynsarmy/getAllConfig
Add support for getting all config
2015-02-11 20:53:07 +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 b4c49ca0fd Move backend helper to its own directory 2015-02-11 14:34:37 +11:00
Samuel Georges 9f34db8c56 Merge pull request #936 from Flynsarmy/setConfigRequiredFix
Incorrect requried argument default value
2015-02-10 17:51:50 +11:00
Samuel Georges 610ea932fc Fixes #856 - Implement a linking policy, defaults to relative 2015-02-09 21:52:17 +11:00
flynsarmy a3272956e3 Incorrect requried argument default value 2015-02-09 20:45:53 +10:00
flynsarmy 5805ddec5a Add support for removing form fields 2015-02-07 19:52:34 +10:00
flynsarmy 1d2a1478cc Add support for getting all config 2015-02-07 16:30:55 +10:00
Samuel Georges fbf46519b4 Implement plugins_path() usage 2015-02-07 15:37:07 +11:00
Samuel Georges 03eb949e71 Add illuminate/html package, DB -> Db, HTML -> Html 2015-02-04 20:03:44 +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 ed22cc9186 Migrate bootstrap process 2015-02-04 19:31:41 +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 7c1de4f728 Add export action to ListController behavior 2015-01-27 20:02:20 +11:00
n.kolesnichenko 3013935374 Bug fix. There is no Aliasing to Model class in FormField class. 2015-01-19 10:47:43 +03:00
Samuel Georges e7b0c3ae2c Typo 2015-01-18 15:30:09 +11:00
Samuel Georges 47cd204686 Add event for backend, before running a controller 2015-01-18 15:23:19 +11:00
Samuel Georges 5bbb248ffa Minor 2015-01-18 14:49:09 +11:00
Samuel Georges eb8f4ec1a8 Removed generic permission "Manage settings", these should be more granular to the tool
Fixes #831 - Fixes dashboard redirect, add "Manage mail settings" permission
Fixes bug in Settings permissions, they now work!
2015-01-18 13:16:18 +11:00
Samuel Georges 7e7d77c5e6 Fixes #869 - Constructor doesn't have static. ping @alekseybobkov 2015-01-12 20:08:52 +11:00
Samuel Georges f4487076b7 Remove some legacy code, no need to pipe WidgetMaker thru WidgetManager 2015-01-05 13:12:48 +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 5d2a177646 getModelArrayAttribute -> resolveModelAttribute 2015-01-05 11:18:43 +11:00
Samuel Georges d91d4112a5 getLoadData -> getLoadValue 2015-01-05 09:45:04 +11:00
Samuel Georges 0be582c42d getSaveData -> getSaveValue 2015-01-05 09:43:39 +11:00
Samuel Georges 59c9146b4f Merge pull request #861 from gergo85/master
Cleanup
2015-01-05 09:21:09 +11:00
gergo85 f0005d196b Cleanup
Remove whitespaces.
2015-01-03 12:41:23 +01:00
Samuel Georges 7dd147a62a Create initial DataTable form widget 2015-01-03 11:57:50 +11:00
alekseybobkov 3ac21e3c89 Merge branch 'develop' into table-widget 2014-12-17 22:15:23 -08:00
Samuel Georges d3000ca51a Unify the handling of detailed exception messages 2014-12-16 12:21:55 +11:00
alekseybobkov c6eb544101 Implemented the server-side data access. Added automatic POSTing of client-memory data source data. Updated documentation. Minor fixes in the drop-down cell processor. 2014-12-11 22:12:43 -08:00
alekseybobkov 23892f8733 Added the server-side data source foundation classes. Implemented the server-side client memory data source. Added more configuration options ot the client-side script. Updated documentation. 2014-12-10 22:46:17 -08:00
Samuel Georges ab24c547a2 Move NO_SAVE_DATA to FormField 2014-12-05 16:46:04 +11:00
Samuel Georges 3dbe487698 Various fixes to datepicker and form widget 2014-11-27 19:02:23 +11:00
Sam Georges 4d411c343e Tidy up notes 2014-11-12 07:39:42 +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 7bcec1bd99 Fixes #16 - Adds tooltip to counter in navigation using 'counterLabel' property 2014-11-10 20:33:43 +11:00
Sam Georges 98e100b377 Refs #729 - Fixes CMS permissions, should not show "pages" content by default 2014-11-09 12:35:10 +11:00
Sam Georges 38170d3101 Use popup loading indicator on relationcontroller behavior 2014-11-07 19:38:05 +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
Sam Georges 23f6d75416 Peer review of #679 2014-10-19 10:58:18 +11:00
Stefan Talen 347dff7e75 Merge branch 'develop' of https://github.com/octobercms/october into feature/PSR-2
Conflicts:
	modules/backend/behaviors/RelationController.php
	modules/backend/classes/WidgetManager.php
	modules/cms/classes/CmsCompoundObject.php
	modules/cms/twig/Extension.php
	modules/cms/twig/PlaceholderNode.php
	modules/cms/widgets/TemplateList.php
2014-10-18 11:07:17 +02:00
Sam Georges fff64a30a7 FormWidget registrations use a "code" not an "alias", it is confusing with defaultAlias property in widgetbase 2014-10-18 10:47:36 +11:00
Stefan Talen 06890d711a Merge branch 'develop' of https://github.com/octobercms/october into feature/PSR-2
Conflicts:
	modules/backend/behaviors/UserPreferencesModel.php
	modules/cms/classes/Controller.php
	modules/system/classes/CombineAssets.php
2014-10-16 18:44:18 +02:00
Sam Georges 9f5646d273 BackendSettings -> BrandSettings
pageTitle is now translated at the end of the line
Fixed unit tests so they pass
SettingsModels are now cached
2014-10-15 19:53:44 +11:00
Stefan Talen dcb292b246 Fixing incorrect brackets 2014-10-12 13:43:50 +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 3836a9b8d7 Refs #679 - Fixed Visibility must be declared on property issues 2014-10-11 12:27:21 +11:00
Stefan Talen 7dc24cfff1 Updating backend/classes 2014-10-10 23:12:50 +02:00
Sam Georges 8d5253930d Form fields can now be marked as hidden 2014-10-08 18:55:09 +11:00
Sam Georges bf47eb94ed Str::getRealClass -> class_basename 2014-09-29 13:12:34 +10:00
Sam Georges b3936330a6 Moved the PathMaker trait functionality to Filesystem class (see October Rain) 2014-09-29 12:32:07 +10:00
Sam Georges fbf5cbbb67 Moved `ViewMaker` trait to live under system, it can be useful for Models too. 2014-09-29 12:19:19 +10:00
Sam Georges 746f425d88 Added new containerAttributes property to form fields 2014-09-25 18:05:35 +10:00
vagrant 848376028f Add test for makeWidget() 2014-09-20 10:33:09 +00:00
Sam Georges 4fac6fea29 Rem debug code 2014-09-20 11:35:25 +10:00
Sam Georges 65573da89b Add the ability to override backend assets and layouts using a Skin 2014-09-20 11:25:57 +10:00
Sam Georges c8f3c640b8 columnName -> fieldName + general improvements to FormWidgetBase 2014-09-17 16:07:06 +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 028339ec02 nameFrom -> valueFrom (lists) 2014-09-17 14:13:07 +10:00
Sam Georges 3b2b858b65 nameColumn -> nameFrom 2014-09-17 13:52:05 +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 810f545ce8 Missing ref 2014-09-06 21:59:40 +10:00
Sam Georges ae9fddc071 Switch to helper 2014-09-06 21:58:45 +10:00
Samuel Georges 2ea1c71931 Merge pull request #578 from Flynsarmy/formwidgetIDs
Fix formwidget IDs for nested fields
2014-09-06 21:57:44 +10:00
Sam Georges 766875fac5 Switch to evalHtmlId helper 2014-09-06 21:57:23 +10:00
Sam Georges a0bfbfc0d6 CMS AJAX handlers now have a way to invoke the page cycle if desired 2014-08-23 17:23:29 +10:00
flynsarmy d0b557cbdf Fix formwidget IDs for nested fields 2014-08-22 15:08:00 +10:00
Sam Georges d52fe388db Fixes #530 - No more joinWith() and groupBy(), align with Laravel to the best of our ability.
Adds new list column type "nameFrom" (take name from X attribute) as an alternative to "select".
2014-08-16 14:08:51 +10:00
Sam Georges 3b41b3e81f Finish up basic Filter implementation 2014-08-13 21:23:19 +10:00
Sam Georges 37291a0c63 Throw ApplicationException when AJAX handler not found 2014-08-13 07:52:47 +10:00
Sam Georges 7d4e535165 Progress to filter widget, added animation less stylesheet 2014-08-13 07:52:46 +10:00
Sam Georges f1849c2ea0 Refs #5 - Progress to Filter widget 2014-08-11 21:46:29 +10:00
Sam Georges 3fe08dfaf4 Minor fix 2014-08-08 22:02:46 +10:00
jofrysutanto cbc1a7688f Camel-casing controller action in backend for friendlier action naming in backend controller 2014-08-04 22:56:49 +10:00
Sam Georges 8a86927944 Make ApplicationException more friendly 2014-08-03 10:34:33 +10:00
Sam Georges 56d0c3351b private -> protected 2014-08-01 14:54:16 +10:00