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
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
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
For consistency, entry partial for controller behaviors should be called "container"
Added addViewPath() method to ViewMaker
Remove "fa" from icon docs (not necessary)
Fixes#2439
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
It would appear many plugins incorrectly use type: relation as a list column, when this does nothing. Previously it would fallback to the text type, now that invalid types fail hard, this adds a softer landing by spamming the trace log instead.
Refs #2438
This is a relic from when select2 v3 had no mobile support, we use select2 v4 now that has been tested with mobile/touch devices.
Refs #108
Clean up some white spaces
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);
}
```