gcg-website/static/admin/config/collections/forms.js
Denys Konovalov f0a4bac2bd
All checks were successful
website-main / prod-build (push) Successful in 11s
website-main / test-build (push) Successful in 5s
revert 65260f63c67562ea2821c31d37a0ac3caa755fd8
revert Static CMS v4 (#250)

Schließt #247

Reviewed-on: #250
2023-12-12 17:13:58 +01:00

66 lines
1.3 KiB
JavaScript

import { MarkdownProps } from "../props.js";
import { DescriptionText, DraftBoolean, Title } from "./widgets.js";
const FormsCollection = {
name: "forms",
label: "Dokumente",
label_singular: "Dokument",
description:
"Hier sind Formulare, Vorlagen und andere Dokumente zu hinterlegen.",
icon: "document",
folder: "content/forms",
create: true,
editor: {
preview: true,
frame: true,
size: "half",
},
filter: {
field: "type",
value: "forms",
},
summary_fields: ["title", "draft"],
fields: [
Title(false),
DraftBoolean,
DescriptionText,
{
name: "files",
label: "Dateien",
label_singular: "Datei",
widget: "list",
required: false,
collapsed: true,
fields: [
{
name: "title",
label: "Bezeichnung",
widget: "string",
required: true,
},
{
name: "link",
label: "Datei",
widget: "file",
required: true,
},
],
},
{
name: "type",
label: "Typ",
widget: "hidden",
default: "forms",
},
{
name: "body",
label: "Inhalt",
widget: "markdown",
required: false,
...MarkdownProps,
},
],
};
export default FormsCollection;