feat(quick-261022-k9k): admin save shortcuts and Create and new on record forms
- app/hotkeys.ts: dependency-free data-hotkey core (Ctrl/Cmd+S, Ctrl/Cmd+Enter, Ctrl/Cmd+Shift+S, Esc, / and ?), innermost-modal root, capture-phase modifier listener, platform labels and the help-dialog state - Button hotkey prop (data-hotkey, aria-keyshortcuts); shortcuts installed by AppShell - FormView: save keys and tooltips, Create and new on create forms via remountView - phrasebook: form.create_and_new and the shortcuts group (en, pl)
This commit is contained in:
@@ -27,6 +27,8 @@ update:
|
||||
|
||||
`modelClass` must equal the controller's `pact.AdminController.ModelName`. The `~/plugins/<vendor>/<plugin>/` prefix points into the plugin's own embedded tree.
|
||||
|
||||
On a create form Save follows `redirect` and Save and close follows `redirectClose`; on an update form Save stays on the record. The create form also has Create and new, which saves the record and opens an empty create form of the same controller, ignoring both redirects. The buttons answer Ctrl+S (Cmd+S on macOS), Ctrl+Enter and, on the create form, Ctrl+Shift+S.
|
||||
|
||||
An optional `recordActions` key lists the record actions the form offers, by the names the controller registers through `pact.HasAdminRecordActions`. It needs a `preview` block, because record actions are offered on the [preview screen](#preview-screen). The show response of a record then carries `meta.actions`: the declared actions the administrator may run and that apply to the record in its current state. See [Record actions](admin-controllers.md#record-actions).
|
||||
|
||||
## fields.yaml
|
||||
|
||||
Reference in New Issue
Block a user