- pluginAssets loads controller scripts and stylesheets from {base}/assets/ only, once per URL
- WidgetField mounts the custom element with attributes only and posts summer-action through the typed client
- Only declared fill keys returned by the server are patched; the form turns dirty and nothing saves
- widget is a registered valueless type rendered on create and update, labelled as a group
- backend::lang.extension strings in en and pl; embedded dist rebuilt
69 lines
1.4 KiB
JSON
69 lines
1.4 KiB
JSON
{
|
|
"data": {
|
|
"name": "Widget",
|
|
"fields": [
|
|
{
|
|
"name": "name",
|
|
"label": "Name",
|
|
"type": "text",
|
|
"span": "left",
|
|
"required": true
|
|
},
|
|
{
|
|
"name": "color",
|
|
"label": "Colour",
|
|
"type": "text",
|
|
"span": "right"
|
|
},
|
|
{
|
|
"name": "lookup",
|
|
"label": "Catalogue",
|
|
"type": "widget",
|
|
"comment": "Fills in the name. Save to keep it.",
|
|
"widget": "acme-demo-lookup",
|
|
"action": "lookup",
|
|
"actionLabel": "Look up",
|
|
"fill": ["name"]
|
|
}
|
|
],
|
|
"messages": {
|
|
"create": {
|
|
"other": "New widget"
|
|
},
|
|
"update": {
|
|
"other": "Editing widget"
|
|
},
|
|
"saved": {
|
|
"other": "Widget „:name” saved"
|
|
},
|
|
"deleteConfirm": {
|
|
"other": "Delete this widget?"
|
|
},
|
|
"deleted": {
|
|
"other": "Widget deleted"
|
|
}
|
|
},
|
|
"meta": {
|
|
"locale": "en"
|
|
},
|
|
"assets": {
|
|
"scripts": ["/admin-test/assets/acme/demo/js/lookup.js?v=abc"],
|
|
"styles": []
|
|
},
|
|
"redirects": {
|
|
"create": {
|
|
"redirect": "acme/demo/widgets/update/:id",
|
|
"redirectClose": "acme/demo/widgets"
|
|
},
|
|
"update": {
|
|
"redirect": "acme/demo/widgets",
|
|
"redirectClose": "acme/demo/widgets"
|
|
},
|
|
"default": "acme/demo/widgets"
|
|
}
|
|
},
|
|
"meta": {
|
|
"locale": "en"
|
|
}
|
|
}
|