feat(cabana,pier): add Media Library admin API, mediafinder, Mail Images unification, and MCP tools
This commit is contained in:
@@ -98,6 +98,7 @@ for _, f := range form.Fields {
|
||||
| `widget` | A plugin custom element with a server action; see [Partials and widgets](partials-and-widgets.md). |
|
||||
| `partial` | A server-rendered template; see [Partials and widgets](partials-and-widgets.md). |
|
||||
| `fileupload` | Uploads for an attachOne or attachMany relation; see [File uploads](#file-uploads). |
|
||||
| `mediafinder` | Picks one or more items from the shared [Media Library](../services/media-library.md) (`mode: image\|file`, `multiple: bool`, `folder: <slug>`). |
|
||||
| `datepicker` | A date, date and time, or time of day; see [Date pickers](#date-pickers). |
|
||||
| `permissioneditor` | A list of permissions to allow, deny or leave inherited; see [Permission editor](#permission-editor). |
|
||||
| `password` | A masked input with a show and hide button. It is a form-only field: the value is sent with a save and never returned; see [Form-only fields](#form-only-fields). |
|
||||
@@ -114,11 +115,11 @@ for _, f := range form.Fields {
|
||||
| `mailimage` | A single image chosen from the mail image library (stores a file id or null). Missing library images show `backend::lang.mailimage.missing` in the admin and are a 422 on save. |
|
||||
| `mailpreview` | A valueless live preview control (`mode` required: `template`, `layout`, `partial` or `branding`); never bound or accepted in a save body. Renders the server HTML in a sandboxed iframe and can send a test to the signed-in administrator. |
|
||||
|
||||
The WinterCMS widgets that are not in this list (the media finder and the others) are not provided. A field with one of those types stops the start-up, unless a plugin registers that alias as its own field type: plugins add field types with a custom element and Go code that decides what is stored; see [Plugin field types](field-types.md).
|
||||
The WinterCMS widgets that are not in this list are not provided. A field with one of those types stops the start-up, unless a plugin registers that alias as its own field type: plugins add field types with a custom element and Go code that decides what is stored; see [Plugin field types](field-types.md).
|
||||
|
||||
### Field options
|
||||
|
||||
A field takes `label`, `comment`, `type`, `required`, `default`, `tab`, `span` (`left`, `right`, `full`, `auto`, `row`), `size` (`tiny`, `small`, `large`, `huge`, `giant`), `context`, `attributes` (scalar HTML attributes for the input), `options` and `emptyOption`, plus `nameFrom` and `relation` on relation fields, `preset` on text and mltext fields, `dependsOn` on dropdowns (see [Dependent dropdowns](#dependent-dropdowns)), `currency`, `currencyFrom`, `scale` and `max` on money fields (see [Money](#money)), `mode`, `separator` and `customTags` on taglist fields (see [Taglist](#taglist)), `language` and `mailImages` on `codeeditor` (and `mailImages` on `markdown`), `mode` on `mailpreview`, and `trigger` (see [Triggers](#triggers)). WinterCMS keys outside this set, such as `readOnly` or `disabled`, are refused.
|
||||
A field takes `label`, `comment`, `type`, `required`, `default`, `tab`, `span` (`left`, `right`, `full`, `auto`, `row`), `size` (`tiny`, `small`, `large`, `huge`, `giant`), `context`, `attributes` (scalar HTML attributes for the input), `options` and `emptyOption`, plus `nameFrom` and `relation` on relation fields, `preset` on text and mltext fields, `dependsOn` on dropdowns (see [Dependent dropdowns](#dependent-dropdowns)), `currency`, `currencyFrom`, `scale` and `max` on money fields (see [Money](#money)), `mode`, `separator` and `customTags` on taglist fields (see [Taglist](#taglist)), `mode`, `multiple` and `folder` on `mediafinder` fields, `language` and `mailImages` on `codeeditor` (and `mailImages` on `markdown`), `mode` on `mailpreview`, and `trigger` (see [Triggers](#triggers)). WinterCMS keys outside this set, such as `readOnly` or `disabled`, are refused.
|
||||
|
||||
`context: update` shows a field only on the update form, and `context: create` only on the create form; a list of contexts is also accepted, and `context: preview` shows a field only on the [preview screen](#preview-screen). The context is enforced on the server too: a field that is hidden on a form is never written by that form's save, whatever the request body holds.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user