Files
summercms/admin/tests/fixtures/widgets.form-schema.json
Jakub Zych 8b1cb244de feat(10.1-01): serve controller JS/CSS and run registered toolbar actions
- boardwalk exports ContentType and SetSecurityHeaders
- pact.AdminClientAssets files are read and hashed at boot and served by exact
  key under {prefix}/assets/{vendor}/{plugin}/ with nosniff, CSP, CORP,
  no-cache and an ETag; a miss falls through to the SPA
- list and form schemas carry assets URLs with a ?v= hash
- toolbar.buttons resolves create, delete and registered actions after decode;
  toolbarActions is permission-filtered per admin
- POST .../toolbar/{action} behind requireAjax and action permissions
2026-09-28 23:41:17 +02:00

166 lines
3.4 KiB
JSON

{
"data": {
"name": "Widget",
"fields": [
{
"name": "name",
"label": "Name",
"type": "text",
"span": "left",
"required": true
},
{
"name": "code",
"label": "Code",
"type": "text",
"span": "right",
"comment": "Unique widget code"
},
{
"name": "size",
"label": "Size",
"type": "dropdown",
"span": "left",
"emptyOption": "— none —",
"options": [
{
"value": "s",
"label": "Small"
},
{
"value": "m",
"label": "Medium"
},
{
"value": "l",
"label": "Large"
}
]
},
{
"name": "weight",
"label": "Weight",
"type": "number",
"span": "right"
},
{
"name": "notes",
"label": "Notes",
"type": "textarea",
"span": "full",
"size": "small"
},
{
"name": "color",
"label": "Colour",
"type": "colorpicker",
"span": "left"
},
{
"name": "active",
"label": "Active",
"type": "switch",
"span": "left",
"comment": "Shown in the catalogue"
},
{
"name": "featured",
"label": "Featured",
"type": "checkbox",
"span": "right",
"comment": "Pinned to the top"
},
{
"name": "maker",
"label": "Maker",
"type": "relation",
"span": "left",
"nameFrom": "name",
"emptyOption": "— none —"
},
{
"name": "tags",
"label": "Tags",
"type": "relation",
"span": "right",
"nameFrom": "name",
"multiple": true,
"required": true
},
{
"name": "owner",
"label": "Owner",
"type": "relation",
"span": "left",
"nameFrom": "email",
"emptyOption": "Current user",
"readOnly": true
},
{
"name": "serial",
"label": "Serial",
"type": "text",
"span": "left",
"tab": "Details",
"context": "update"
},
{
"name": "batch",
"label": "Batch",
"type": "text",
"span": "right",
"tab": "Details",
"context": [
"create"
]
},
{
"name": "members",
"type": "relation-manager",
"relation": "members",
"span": "full",
"tab": "Members",
"comment": "People who may edit this widget"
}
],
"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": [],
"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"
}
}