gcg-website/static/admin/config/collections/forms.js

60 lines
1.2 KiB
JavaScript
Raw Normal View History

2023-12-13 12:36:15 +01:00
import { EditorProps, MarkdownProps } from "../props.js";
2023-05-29 16:22:34 +02:00
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",
2023-06-21 17:58:49 +02:00
folder: "content/forms",
2023-12-13 12:36:15 +01:00
...EditorProps,
2023-05-29 16:22:34 +02:00
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",
required: false,
...MarkdownProps,
},
],
};
export default FormsCollection;