Commit Graph

331 Commits

Author SHA1 Message Date
Luke Towers b39eb03336 Defaulted the main menu counter to sum it's side menu counters 2019-02-21 11:55:43 -06:00
Luke Towers d6f8cc179d Support abort(404) in the backend module 2019-02-21 10:44:58 -06:00
Luke Towers bbf398133e Fix issues with AJAX handlers on dashboard widgets. Replaces #4132 2019-02-13 15:05:18 -06:00
Luke Towers cb87802080 Added support for counter and counterLabel to main menu.
Refs: #16, Refs: 7bcec1bd99, Replaces: #4061
2019-02-13 14:54:13 -06:00
Luke Towers 1fc8dc6fd4 Added ability to require permissions use ReportWidgets 2019-02-11 16:02:30 -06:00
Luke Towers 78e68ed632 Support nested jsonable values in List columns, refs: #2990, #2995, #3088, 2019-02-01 15:11:57 -06:00
Tobias Kündig 67ee2229a5 Added manual deleted_at checks (#4051)
Fixes #4046 

It is possible that the user model gets fetched using the SoftDelete
trait before the relevant migrations were applied during an update.
To fix this edge case the user model is always fetched using the
withTrashed scope and the deleted_at check is done manually afterwards.

@see https://github.com/octobercms/october/issues/3999
2019-01-18 14:42:25 -06:00
Luke Towers d6e680799f Reduce reliance on CMS module from Backend module
added backend 404 view, fixed return to backend URL in the access denied view on backend only instances
2019-01-15 11:46:48 -06:00
Luke Towers 6c0a77c064 Fix broken tests 2019-01-10 20:49:15 -06:00
Luke Towers 1c0fd1b419 Yet another change to perfect the getParentForm() method 2019-01-10 18:59:29 -06:00
Luke Towers 39987677f0 Peer review of 1b3263d4c7 2019-01-10 17:57:32 -06:00
Luke Towers 1b3263d4c7 Pass the containing Form widget to the FormFields that it generates.
This enables complex FormWidgets that need to know what Form widget they belong to to access that information with $this->formField->form; This also enables a fix for: https://github.com/rainlab/location-plugin/issues/48
2019-01-10 10:22:59 -06:00
Luke Towers 064daa2d2e Compiled assets, minor docblock update 2019-01-03 16:26:30 -06:00
fansaien 2dcd84c4f2 Fix the input trigger API where a form element doesn't exist (#4033)
There are no `form` elements in the preview context of a form, so this adds an alternative selector to use when no common `form` elements are found for the Input Trigger API to use. Credit to @fansaien
2019-01-03 16:24:43 -06:00
Denis Denisov 2b16bad0fe Ignore controllers of disabled plugins (#3923)
Fixes #3905. Credit to @w20k
2018-11-15 13:51:11 -06:00
Luke Towers e726165554
Add Tab icons functionality (#3901)
Credit to @ayumihamsaki for the original proposal, @Teranode for the initial work. Related #3888, #3856.
2018-10-30 20:06:33 -06:00
Luke Towers 2c82b05062 Added backend.ajax.beforeRunHandler event 2018-10-14 10:32:47 -06:00
Alexander Shapoval 9da0af4533 Add ability to specify one CSS class to apply to all tab panels (#3761)
Credit to @ebashu-on-holidays
2018-09-16 10:51:00 -06:00
Szabó Gergő 69988837d5 Fixed readonly on switch and checkbox field types (#3750)
Credit to @gergo85
2018-09-03 14:36:22 -06:00
Nathan van der Werf 0f0d108da0
Remove unused imports 2018-08-24 19:51:59 +02:00
Nathan van der Werf 8b6f11e6ac Extract child instructions 2018-08-15 19:25:42 +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 a3d7a028b4 Replace is_null with "=== null" comparison 2018-08-15 18:54:46 +02:00
Nathan van der Werf 123145fd54 Remove unnecessary parentheses 2018-08-15 18:49:52 +02:00
Nathan van der Werf 3a918ad200 Remove "null" assignments 2018-08-15 18:33:24 +02:00
Samuel Georges fb2aa1730c Fixes security issue
Refs #3604
2018-06-22 22:57:38 +10:00
Luke Towers 08d8b33fc6 Whitespace 2018-04-19 10:21:25 -06:00
Tobias Kündig 2b22b26676 Added align property to list columns definition (#3509)
Documented in https://github.com/octobercms/docs/pull/289; credit to @tobias-kuendig
2018-04-17 23:34:08 -06:00
Luke Towers 8df92f4ba1 Merge branch 'develop' of https://github.com/octobercms/october into develop 2018-04-05 22:10:59 -06:00
Luke Towers 5cbadd447a Fix typo in 97e156d43d 2018-04-05 22:10:43 -06:00
Samuel Georges 2164c07616 Preserve multi field types with trigger use
Refs #3195
Refs #2861
Refs https://github.com/daftspunk/oc-test-plugin/pull/41
2018-04-06 10:58:56 +10:00
Samuel Georges 97e156d43d Tidy up logic from #3465, move helper functions out 2018-04-04 14:35:29 +10:00
MartynasJanu 13dadaa667 Set trigger targets arbitrary levels above current form context (#3465)
Fixes #3260. Enables setting the target field for the trigger API to a form context an arbitrary number of levels above the current field by prepending the field name with `^` for each level to go up. For instance, if you had a field [allow_pictures] in the base form and a [records] repeater with [image] fields, and you set the target field for the trigger on [image] to [^allow_pictures] then it would work properly instead of looking for an [allow_pictures] field on the [records] field. Credit to @MartynasJanu. Documented in edc78b584b
2018-03-21 23:25:18 -06:00
Luke Towers 15314bbe94 Updating base widget inline documentation 2017-11-22 14:10:04 -06:00
Samuel Georges e6de2a5521 Fixes exception on empty token 2017-11-02 19:53:20 +11:00
Luke Towers c7a3354dfd
Move backend.page.beforeDisplay after auth check
Fixes #3215. Related: 47cd204686 (diff-6cdbb280344f40eebe758cf8e8e5f7d9)
2017-10-31 08:45:11 -06:00
Luke Towers aee81081df Hide Settings menu when no sub pages to display (#3172)
Remove the Settings main menu item if there are no submenus to display. Fixes https://github.com/octobercms/october/issues/2175
2017-10-18 11:22:33 -06:00
Luke Towers 4203e65549 Deprecated Cms\Controllers\Media in favour of the backend one. Fixed other references to moved pieces of the Media Manager. Finally a proper fix for https://github.com/octobercms/october/pull/2604 2017-10-08 23:12:04 -06:00
Samuel Georges cd76f2e04f Field definition should override magic 2017-09-13 14:29:42 +10:00
Oleg Samorai 2cc492f7dc Enable displaying jsonable properties in backend lists (#2995) 2017-07-29 14:24:54 -06:00
Samuel Georges 96d0535d09 Add generic onAjax handler that does nothing 2017-07-29 22:55:58 +10:00
Samuel Georges 4fd1ca824f Introduce concept of system roles
These are roles defined by a special API code, once a system role code is detected, the role becomes locked and its permissions are sourced from the AuthManager. All permissions are granted to system roles by default, unless otherwise specified. This should make it easier to create client accounts as "Publishers", hiding developer tools like the CMS and Builder plugins by default.
2017-07-13 19:29:50 +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
Samuel Georges c0aa03a400 Create an error making trait
Widgets can throw fatal errors too
2017-06-11 22:38:03 +10:00
Samuel Georges f020479b91 Move session logic to SessionMaker
This allows controller behaviors to access session utils
2017-06-10 04:58:29 +10:00
Samuel Georges edcd899a79 Base getLoadValue to look at form field first
Fixes https://github.com/octobercms/october/pull/2663
Adding to build 420+ because this might cause some issues, although it shouldn't. Hoping we don't ever have to roll this back because it fixes another inconsistency when using the model `filterFields` method... some will change values via $field->value (field accessor) and others will change via $this->value ($model accessor). This now puts the field accessor at a consistent priority (first) while retaining the fallback to model.
2017-06-06 20:44:15 +10:00
Samuel Georges 41cc1744f1 Tab panes now support CSS spec
See form docs > paneCssClass
2017-06-05 17:37:13 +10:00
Oscar Arzola 8a40e1cc89 Update Report widget docblock 2017-06-02 23:53:27 -05:00
Oscar Arzola a7d20211ae Fixed Formatting and added docblock 2017-06-02 09:51:13 -05:00
Oscar Arzola 0bd12cf0e6 Added Extensibility to ReportWidgets 2017-05-30 16:49:35 -05:00
Samuel Georges 04f89dc5bb getToken -> token 2017-05-20 13:19:51 +10:00
Samuel Georges 7e76f39e6c Add app.name config
Various other refittings
2017-05-16 18:50:41 +10: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 015b34fe88 Block media manager entirely if user lacks access 2017-04-11 08:40:39 +10:00
Luke Towers d1c9b1a6f1 Support updating existing sidemenus
Fixes #2757, #2777
2017-03-24 09:05:35 -06:00
Samuel Georges 0a981a25f7 API docs progress
Controller -> SystemController for consistency
2017-03-16 17:08:20 +11:00
Samuel Georges 18c6bb63a2 API docs progress 2017-03-15 18:03:26 +11:00
Samuel Georges 462c9cd4e8 Introduce theme logging + log settings
CmsObject changes can now be tracked (disabled by default)
Request logging is now disabled by default (security vector)
2017-02-08 05:44:04 +11:00
Samuel Georges 0d1fc43212 Add isSelected() helper to form field
Fixes an issue where dropdown NULL and 0 are treated as the same
Fixes #2612
2017-02-03 06:35:23 +11:00
Samuel Georges 5b5e23bfb8 Minor touch up from #2604 2017-01-26 11:30:26 +11:00
Samuel Georges 5e729f9978 Merge pull request #2604 from dubcanada/patch-1
If CMS module is loaded (and MediaManager exists) bind it
2017-01-26 11:27:56 +11:00
dubcanada 0a4390b4d9 If CMS module is loaded (and MediaManager exists) bind it
I am using OctoberCMS without the CMS module (removed from modules directory and turned off in cms.php) and I am getting an error in the backend regarding missing `MediaManager` class. I wrapped this in a class_exists to check that MediaManager exists before binding it.

Let me know your thoughts.
2017-01-10 13:45:59 -04:00
Samuel Georges 6af6ebe733 Added config backendForceSecure used to force HTTPS
Refs https://security.googleblog.com/2016/09/moving-towards-more-secure-web.html
2016-12-17 10:16:02 +11:00
Samuel Georges c644f8b66d Fixes issue where nested columns forcibly hide
Eg: "myrelation[attribute]" as a column name would cause the list setup to hide these fields with no ability to bring them back
2016-12-14 19:14:41 +11:00
Samuel Georges 0a2b343047 Simplify system events
This pipes all event calls through a new EventEmitter trait, which substitutes the October Rain event emitter trait. The view event has been moved to this trait also.
Pass some variables by reference to allow multi-extension.
Fixes #2420
2016-12-10 09:02:06 +11:00
Samuel Georges 29040b416c Allow redirect: false on importExportController
Implement getFieldName() method
2016-11-28 07:50:06 +11:00
Samuel Georges 35296c5b26 Adds getFieldName helper to FormWidgetBase
Refs https://github.com/octobercms/docs/pull/207
2016-11-24 08:59:07 +11:00
Samuel Georges 46c473e2f2 Fixes fetching multi tiered pivot relation values
Refs https://github.com/daftspunk/oc-crm-plugin/issues/3
Minor code clean on select.js
2016-11-08 07:02:31 +11:00
Samuel Georges 6173ff177b Typo in variable name 2016-11-02 08:58:07 +11:00
Samuel Georges 0aadcc6675 Merge paths and vars when calling widget handler
When an AJAX handler is called for a widget, the view paths and specified variables should be merged in to the controller. This sets the appropriate context:

1) Look at the widget first
2) Fall back to the controller

Fixes #2432
2016-11-02 08:50:15 +11:00
Samuel Georges bc165078de Removes redundant code
The form widget label and widgetDetails() method was intended for use by the Builder plugin, since it ended up using its own internal registration system, this is not used anywhere so is removed.

Refs https://github.com/octobercms/docs/issues/200
2016-11-01 08:15:03 +11:00
Samuel Georges 0b345ad592 Add 'readOnly' spec to form field
Same as disabled except data is still posted back
2016-09-27 16:50:52 +10:00
soulshockers e10c162667 Fixed calling dynamic methods for dynamically extended widgets. 2016-08-05 18:51:27 +03:00
Samuel Georges 78a4067564 Make logic more explicit
This tightens up the rules of 7baea87068
2016-07-23 15:50:48 +10:00
Samuel Georges 7baea87068 Allow AJAX handlers to pipe objects to Laravel
Treat non scalar, non array, non RedirectResponse, non null as a Laravel compatible response
This brings AJAX handlers in line with page cycles, which do the same thing if the response is not a string. However in AJAX we should treat any scalar as a "result", not just a string. For all else (where not null), let Laravel handle it as a custom response object -- could be a model for serialization, or anything compatible.
Importantly to note when a custom redirect is sent, October's workflow is completely wiped out, so any partial updates, redirects, etc. will not occur. This is a normal and fair expectation.
Fixes #1784
2016-07-23 11:57:15 +10:00
Samuel Georges e970d80443 Align AJAX logic: merge custom response last
This is to allow overriding the standard values
Refs #2209
2016-07-16 13:11:10 +10:00
Luke Towers b73811fefc Moves AJAX handler response handling
Fixes octobercms/october#2208
2016-07-13 09:51:18 -06:00
Samuel Georges bcff1d3ecd Widget classes are now extendable
Fixes #2078
Fixes #1586
2016-06-15 17:10:46 +10:00
Samuel Georges 171b14c6ab Nicer error message when no DB and backend access attempt
This is for flat-file sites that don't use a database. If debug mode is on, it will show an error page with advice to set up the database. If debug mode is off, it will simply show a 404 page. Previously it was a nasty exception/plain error page.
2016-06-05 07:16:11 +10:00
Samuel Georges e9be15cc15 Preferences -> Preference
Rename brandsetting config folder
2016-05-27 07:46:50 +10:00
Samuel Georges cdb35f5070 UserPreferences -> UserPreference
(Models should be singular)
2016-05-27 07:35:32 +10:00
Samuel Georges 6c081d9265 Combine editor preferences and backend preferences
Add backend timezone setting used for converting display dates
2016-04-23 05:31:05 +10:00
Samuel Georges 0504da41f2 Add hasFields methods
formHasOutsideFields, formHasPrimaryTabs + formHasSecondaryTabs
2016-04-23 05:13:08 +10:00
Samuel Georges 87a4de40de Address serialize/unserialize issues
This will require a cache clear for the combiner
Ref https://davidwalsh.name/php-serialize-unserialize-issues
2016-04-16 08:22:31 +10:00
Pásztor Gábor 9f3fcf27ed Update AssetsList 2016-03-30 18:17:18 +02:00
Samuel Georges a035acdc2c Tidy up some logic, restore firstRowTitles setting
Refs #1856
2016-03-26 14:10:05 +11:00
Jérémy Gaulin 2a60e34558 Import options to configure the CSV reader + patch to prevent unfriendly error to be thrown due to bad import source file encoding (on AJAX request) 2016-03-26 12:54:13 +11:00
Samuel Georges 0aef151d9a Add showSearch option to dropdown
This is a highly specific option, so we shouldn't add it to the FormField class itself
2016-03-25 18:21:58 +11:00
Samuel Georges 23f4d40ef2 Merge common functionality in to FormModelWidget 2016-03-25 18:01:58 +11:00
Samuel Georges 1241f584d0 Merge remote-tracking branch 'remotes/origin/stable' into ui 2016-03-01 07:02:07 +11:00
Samuel Georges 21f3ac93c1 Add support for HTML comments
Fixes #1808
2016-02-27 09:46:00 +11:00
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