Files
summercms/admin/tests/fixtures/deferred.form-schema.json
Jakub Zych 69a37456f6 feat(12.2-04): edit related records in modals and defer relation work on new records
- RelationManager renders create/link/delete/unlink in declared order with
  one primary, opens the child modal (update or view form) or the pivot
  modal on row click, and deletes selected children behind a busy confirm
- RelationChildModal creates and edits children with its own session key
  (X-Child-Session-Key) so uploads and dates work inside it
- RelationPivotModal edits link details; the picker links one record with
  its pivot values when the relation has a pivot form
- deferrable managers render on the create screen with owner id 0, the
  form's X-Session-Key and the pending note, and mark the form dirty
- the registry resolves RelationManager lazily (child forms close an
  import cycle); DataTable gains openable rows and a trailing cell
- relation lang keys in en and pl; rebuilt boardwalk dist
2026-10-02 19:56:10 +02:00

90 lines
1.8 KiB
JSON

{
"data": {
"name": "Gadget",
"fields": [
{
"name": "name",
"label": "Name",
"type": "text",
"required": true
},
{
"name": "starts_at",
"label": "Starts at",
"type": "datepicker",
"mode": "datetime"
},
{
"name": "released_on",
"label": "Released on",
"type": "datepicker",
"mode": "date",
"minDate": "2026-01-01",
"displayFormat": "D MMMM YYYY"
},
{
"name": "photos",
"label": "Photos",
"type": "fileupload",
"mode": "image",
"multiple": true,
"maxFiles": 3,
"fileTypes": [
"jpg",
"png"
],
"maxFilesize": 2,
"thumbOptions": {
"mode": "crop"
},
"useCaption": true
},
{
"name": "parts",
"label": "Parts",
"type": "relation-manager",
"relation": "parts",
"deferrable": true
}
],
"messages": {
"create": {
"other": "New gadget"
},
"update": {
"other": "Editing gadget"
},
"saved": {
"other": "Gadget „:name” saved"
},
"deleteConfirm": {
"other": "Delete this gadget?"
},
"deleted": {
"other": "Gadget deleted"
}
},
"meta": {
"locale": "en"
},
"assets": {
"scripts": [],
"styles": []
},
"redirects": {
"create": {
"redirect": "acme/demo/gadgets/update/:id",
"redirectClose": "acme/demo/gadgets"
},
"update": {
"redirect": "acme/demo/gadgets",
"redirectClose": "acme/demo/gadgets"
},
"default": "acme/demo/gadgets"
}
},
"meta": {
"locale": "en"
}
}