Files
summercms/admin/tests/fixtures/roster.form-schema.json
Jakub Zych df5cace852 feat(12.1-02): writable foreign keys, locked relation options, invisible columns
- FieldRelationContract.WritableForeignKey makes a belongsTo field over a
  protected foreign key writable; the protected key list is unchanged
- cabana.RelationLockProvider names related ids an administrator may not add
  or remove: options and labels carry locked, and a create or update that
  changes the locked subset is 403 before any row is written
- columns.yaml invisible keeps a column searchable and out of the rows
- a controller implementing pact.FilterOptions serves a scope filter's
  choices before the model
- SPA: locked chips and options in RelationField, DataTable skips invisible
  columns
- README, docs, OpenAPI document, TS types and dist updated
2026-10-05 10:58:38 +02:00

50 lines
2.4 KiB
JSON

{
"data": {
"name": "Person",
"modelClass": "Person",
"fields": [
{ "name": "name", "type": "text", "label": "Name", "span": "left" },
{ "name": "email", "type": "text", "label": "Email", "span": "right" },
{ "name": "team", "type": "relation", "label": "Team", "nameFrom": "name", "emptyOption": "No team" },
{ "name": "tags", "type": "relation", "label": "Tags", "nameFrom": "name", "multiple": true },
{ "name": "slug", "type": "text", "label": "Slug", "preset": { "field": "name", "type": "slug" } },
{ "name": "password", "type": "password", "label": "Password", "span": "left", "context": ["create", "update"] },
{ "name": "password_confirmation", "type": "password", "label": "Repeat the password", "span": "right", "context": ["create", "update"] },
{ "name": "notify", "type": "checkbox", "label": "Send a welcome message", "default": true, "context": "create" },
{
"name": "permissions",
"type": "permissioneditor",
"label": "Permissions",
"tab": "Permissions",
"context": "update",
"mode": "radio",
"permissionOptions": [
{ "code": "posts.edit", "label": "Edit posts", "tab": "Content", "comment": "Change the text of any post." },
{ "code": "posts.publish", "label": "Publish posts", "tab": "Content" },
{ "code": "reports.export", "label": "Export reports", "tab": "Reports", "locked": true },
{ "code": "misc.beta", "label": "Try beta features" }
]
},
{ "name": "joined_ip", "type": "text", "label": "Joined from IP address", "context": "preview" }
],
"preview": { "headerPartial": "status" },
"messages": {
"create": { "other": "Person" },
"update": { "other": "Edit record" },
"saved": { "other": "Saved" },
"deleteConfirm": { "other": "Delete this record?" },
"deleted": { "other": "Record deleted" },
"preview": { "other": "Person details" },
"edit": { "other": "Edit person" }
},
"redirects": {
"default": "acme/roster/people",
"create": { "redirect": "acme/roster/people/preview/:id", "redirectClose": "acme/roster/people" },
"update": { "redirect": "acme/roster/people", "redirectClose": "acme/roster/people/preview/:id" }
},
"meta": { "locale": "en" },
"assets": { "scripts": [], "styles": [] }
},
"meta": { "locale": "en" }
}