2023-10-18 18:07:09 +08:00
|
|
|
import I18n from "discourse-i18n";
|
2023-03-02 03:07:13 +08:00
|
|
|
|
2023-02-09 03:21:39 +08:00
|
|
|
export const templateFormFields = [
|
|
|
|
{
|
|
|
|
type: "checkbox",
|
|
|
|
structure: `- type: checkbox
|
2023-08-30 05:41:33 +08:00
|
|
|
id: ${I18n.t("admin.form_templates.field_placeholders.id")}
|
2023-02-09 03:21:39 +08:00
|
|
|
attributes:
|
2023-03-02 03:07:13 +08:00
|
|
|
label: "${I18n.t("admin.form_templates.field_placeholders.label")}"
|
|
|
|
validations:
|
|
|
|
# ${I18n.t("admin.form_templates.field_placeholders.validations")}`,
|
2023-02-09 03:21:39 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
type: "input",
|
|
|
|
structure: `- type: input
|
2023-08-30 05:41:33 +08:00
|
|
|
id: ${I18n.t("admin.form_templates.field_placeholders.id")}
|
2023-02-09 03:21:39 +08:00
|
|
|
attributes:
|
2023-03-02 03:07:13 +08:00
|
|
|
label: "${I18n.t("admin.form_templates.field_placeholders.label")}"
|
|
|
|
placeholder: "${I18n.t(
|
|
|
|
"admin.form_templates.field_placeholders.placeholder"
|
|
|
|
)}"
|
|
|
|
validations:
|
|
|
|
# ${I18n.t("admin.form_templates.field_placeholders.validations")}`,
|
2023-02-09 03:21:39 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
type: "textarea",
|
|
|
|
structure: `- type: textarea
|
2023-08-30 05:41:33 +08:00
|
|
|
id: ${I18n.t("admin.form_templates.field_placeholders.id")}
|
2023-02-09 03:21:39 +08:00
|
|
|
attributes:
|
2023-03-02 03:07:13 +08:00
|
|
|
label: "${I18n.t("admin.form_templates.field_placeholders.label")}"
|
|
|
|
placeholder: "${I18n.t(
|
|
|
|
"admin.form_templates.field_placeholders.placeholder"
|
|
|
|
)}"
|
|
|
|
validations:
|
|
|
|
# ${I18n.t("admin.form_templates.field_placeholders.validations")}`,
|
2023-02-09 03:21:39 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
type: "dropdown",
|
|
|
|
structure: `- type: dropdown
|
2023-08-30 05:41:33 +08:00
|
|
|
id: ${I18n.t("admin.form_templates.field_placeholders.id")}
|
2023-02-09 03:21:39 +08:00
|
|
|
choices:
|
2023-03-02 03:07:13 +08:00
|
|
|
- "${I18n.t("admin.form_templates.field_placeholders.choices.first")}"
|
|
|
|
- "${I18n.t("admin.form_templates.field_placeholders.choices.second")}"
|
|
|
|
- "${I18n.t("admin.form_templates.field_placeholders.choices.third")}"
|
2023-02-09 03:21:39 +08:00
|
|
|
attributes:
|
2023-03-02 03:07:13 +08:00
|
|
|
none_label: "${I18n.t(
|
|
|
|
"admin.form_templates.field_placeholders.none_label"
|
|
|
|
)}"
|
|
|
|
label: "${I18n.t("admin.form_templates.field_placeholders.label")}"
|
|
|
|
validations:
|
|
|
|
# ${I18n.t("admin.form_templates.field_placeholders.validations")}`,
|
2023-02-09 03:21:39 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
type: "upload",
|
|
|
|
structure: `- type: upload
|
2023-08-30 05:41:33 +08:00
|
|
|
id: ${I18n.t("admin.form_templates.field_placeholders.id")}
|
2023-02-09 03:21:39 +08:00
|
|
|
attributes:
|
2023-06-29 03:49:05 +08:00
|
|
|
file_types: ".jpg, .png, .gif"
|
2023-03-02 03:07:13 +08:00
|
|
|
allow_multiple: false
|
|
|
|
label: "${I18n.t("admin.form_templates.field_placeholders.label")}"
|
|
|
|
validations:
|
|
|
|
# ${I18n.t("admin.form_templates.field_placeholders.validations")}`,
|
2023-02-09 03:21:39 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
type: "multiselect",
|
2023-03-02 03:07:13 +08:00
|
|
|
structure: `- type: multi-select
|
2023-08-30 05:41:33 +08:00
|
|
|
id: ${I18n.t("admin.form_templates.field_placeholders.id")}
|
2023-02-09 03:21:39 +08:00
|
|
|
choices:
|
2023-03-02 03:07:13 +08:00
|
|
|
- "${I18n.t("admin.form_templates.field_placeholders.choices.first")}"
|
|
|
|
- "${I18n.t("admin.form_templates.field_placeholders.choices.second")}"
|
|
|
|
- "${I18n.t("admin.form_templates.field_placeholders.choices.third")}"
|
2023-02-09 03:21:39 +08:00
|
|
|
attributes:
|
2023-03-02 03:07:13 +08:00
|
|
|
none_label: "${I18n.t(
|
|
|
|
"admin.form_templates.field_placeholders.none_label"
|
|
|
|
)}"
|
|
|
|
label: "${I18n.t("admin.form_templates.field_placeholders.label")}"
|
|
|
|
validations:
|
|
|
|
# ${I18n.t("admin.form_templates.field_placeholders.validations")}`,
|
2023-02-09 03:21:39 +08:00
|
|
|
},
|
|
|
|
];
|