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
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
Credit to @fansaien.
The keydown event can not capture the Backspace(Delete) and Enter key event.
Moved the binding keydown function into froalaEditor.initialized event to solve this issue. Please review this Froala Editor issue: https://github.com/froala/wysiwyg-editor/issues/1879
The editor.events doesn't support off function. So, can not call off function in the unregisterHandlers()
Credit to @fansaien.
Reference: https://github.com/octobercms/october/pull/3793. This commit added the e() function for translation results.
Because the filter is using the mustache template, and the manual said: All variables are HTML escaped by default. If you want to return unescaped HTML, use the triple mustache: {{{name}}} (https://mustache.github.io/mustache.5.html)
That means the string will be escaped twice. So, I removed the e().
Adds a couple of usability tweaks to the dropdown cell type in the data table widget, to more closely mimic a native dropdown field.
Pressing the up or down arrow keys when the cell is focused but with the dropdown closed will select the previous or next item automatically and set it as the cell value. This does prevent the usual table function of going to the previous or next row when focused on a dropdown cell, but I think it's a worthwhile trade-off. When the dropdown is open, the up and down arrows work the same as previously implemented.
Typing out characters will initiate a search and select the first matching option automatically and set it as the cell value. For example, for the following options:
Apples
Oranges
Bananas
Typing out o and r on the keyboard will automatically select the Oranges option.
Credit to @bennothommo
Credit to @tobias-kuendig. Added $.oc.relationBehavior.changed function. To keep track of changes made using the relation controller this new "changed" function is called every time a record is created, added, removed or deleted. The function triggers the change.oc.formwidget event on the form field that belongs to this relation controller so other form fields are notified about the changes.
Credit to @Farrow. Previously when creating a backend form with RainLab.Builder if you filled in the "Default" property using the i18n (to get, for example, acme.plugin::lang.field.default) then that string would be output exactly on the form (i.e. <input value="acme.plugin::lang.field.default"...>) instead of being replaced with the actual value of that key from the lang file.