This fixes#2613 by reloading the form widgets with the modified data after `model.filterFields`. **NOTE**: `$this->processExistingItems()` isn't simply just moved to `prepareVars()` because that messes up the adding new repeater item functionality by repeating the content from the fields for the last item in that group that already exists on the repeater.
Adds the ability to specify an `ignoreTimezone: true` option on the config for a datepicker form widget or date column type. This will ignore both October's and the backend user's timezone settings to display the date exactly as it is stored.
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.
Follow up to 2046efb51d.
The previous commit prevented users from visually managing permissions that they themselves didn't have access to, this follow-up commit enforces that limitation serverside to defend against crafted privilege escalation attacks by authenticated users.
Prevents users from granting permissions that they themselves do not have. Fixes#1673, and is a partial solution to #2367. However, this still does not address the issue of being able to assign / manage groups that have permissions that the user doing the management does not themselves have. That will have to be addressed separately as a part of #2367.
Removes unused descriptionFrom property that was probably copy-pasta remnants from the RecordFinder formwidget when nameFrom was implemented in 6aaf4cce43. Also removed it from the docs here: 6164e4a9e7
* Add support for previewMode in Repeater FormWidget
Refs: #2724, 5f91c45f79
* Add support for previewMode in Repeater FormWidget
Refs: #2724, 5f91c45f79
* Add support for previewMode in Repeater FormWidget
Refs: #2724, 5f91c45f79
* Add support for previewMode in Repeater FormWidget
Refs: #2724, 5f91c45f79
This should make Windows PCs look a little nicer, albeit inconsistent with others (Sergoe UI is unique). If it's good enough for GitHub, then it's good enough for October.
All text shadows have been stripped, along with some box shading. They were barely noticeable and should speed up the UI.
The Media Manager now uses a white list approach to blocking files, we have been advised that the blacklist approach is too fragile and we agree.
Asset List and Media Manager now use $.oc.alert when displaying errors
Lots of complicated stuff going on here, all elements are getting wiped out when a record is updated and the control is getting disposed at the same time. We've created a dedicated variable to store the datalocker name as a string, this represents a small memory leak but a necessary one it seems.
Fixes#2798
Removed the expand all, collapse all buttons, they are a bit too bulky so have been replaced with the standard CTRL+click behavior.
Added foundation library to repeater.js
Add "titleFrom" option to specify which input to use for the collapsed title
Styling improvements
Refs #2632 + #2631
The many-to-many relationship types choke pretty hard on this enhancement, so only use it for the simple one-to-many/one-to-one style relations instead.
Fixes#2524
This wraps the contents of a disabled codeeditor field in an `pre` element so that the browser renders it respecting the formatting / whitespace of the contents (code in this widgets case) instead of squishing it all down.
* Translate the Page link popup
* Remove the unnecessary dot
* Update the import/export Hungarian translation
* Update the Froala Hungarian translation
This is useful when a form renders another form inside, specifically the repeater. In these cases the model and data will diverge, and it also provides an opportunity to not apply extension logic to nested form fields.
Fixes#2257
This improves the extensibility of the record finder form widget by passing the current model to the query scope that will be applied to the records being displayed. It allows the use of attributes of the current model in the query scope applied to the records being displayed as options to select.
In my use case, I have a main Survey model with related Field models. Field models can have parents and children for a tree structure, but I only want fields to have parents and children that are:
**a) Not the main record itself**
**and b) Members of / related to the same Survey model**
By passing the current model to my query scope, I can filter out ineligible records like so:
```
/**
* Limit results to only records that are eligible to be parents of the provided model
*
* @param Query $query
* @param Model $model The model to check for eligible parents agains
* @return Query
*/
public function scopeEligibleParents($query, $model) {
return $query->where('id', '!=', $model->id)
->where('parent_id', '!=', $model->id)
->where('survey_id', '=', $model->survey_id);
}
```
@Carbon::parse was still failing, wrapped in do nothing try/catch instead
We don't seem to need to prefix time values anymore, since DateTimeHelper::makeCarbon should handle it
Fixes#2299
Page links handler is now strict definition
Use more explicit naming for config_dashboard config
We have to use the codeeditor for mail templates for now, since froala is not playing nicely with twig
Removed the harsh title on popups
Anything considered an "overlay" now uses a box shading effect
The account menu now uses lighter shading
Introduced highlight states, allowing hover + active to behave independently
Relation controller now supports scope and conditions for the manage mode (list)
Logic has been modified across recordfinder and filter that only allows one constraint in this order (1. conditions, 2. scope, 3. defined constraints (where applicable))
Fixes#1203
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
The datepicker now handles timezones and locale mainly on the client side. When a user selects a date/time, the value is chosen in their timezone preference, the script will then convert the value to the application timezone (UTC) for storage in the database. The reverse is true: when the value is loaded, it is converted from UTC to the user preference. The entire process is seamless. Dates are also formatted in the locale preference.
Example scenario: This fixes the issue when selecting the blog post published date. In some cases, the date could be set to 24th April but the server time is 23rd April, so the post appears unpublished against the user's intent.
There is still some issues around DATE and TIME column types stored in the database. It is best to always use TIMESTAMP/DATETIME to retain the timezone conversions. DATE will reset the time to 00:00 UTC which can cause issues and TIME does not play nicely with Carbon at all. We should still try to add support for these columns in the datepicker, even though they are not recommended.