Files
sm-faq-plugin/models/faq/fields.yaml
Jakub Zych 1c5491232a feat(17-04): FAQ plugin tracer, admin FAQ with sanitized question repeater
- golem15.faq plugin (Requires golem15.translate), table golem15_faq_faqs with the PHP columns
- FAQ model with jsonable content and the translate Locale relation
- admin controller golem15.faq.faqs: name, slug, locale, active switch, richeditor description, question repeater
- navigation FAQ (order 500), permission golem15.faq.faqs, en and pl phrasebooks
- TestFaqAdminSmoke: answers stored sanitized with a notice under content.1.answer
2026-10-12 17:24:52 +02:00

51 lines
1.5 KiB
YAML

# ===================================
# Form Field Definitions
# ===================================
#
# Adapted from the WinterCMS form: span none with cssClass columns became
# left and right, the locale relation's select became nameFrom, and the
# fields carry comments for the locale and active switches.
fields:
name:
label: golem15.faq::lang.labels.name
type: text
span: left
required: true
slug:
label: golem15.faq::lang.labels.slug
type: text
span: right
required: true
preset: name
locale:
label: golem15.faq::lang.labels.locale
comment: golem15.faq::lang.labels.locale_comment
type: relation
nameFrom: name
span: left
required: true
is_active:
label: golem15.faq::lang.labels.is_active
comment: golem15.faq::lang.labels.is_active_comment
type: switch
span: right
description:
label: golem15.faq::lang.labels.description
type: richeditor
span: full
content:
label: golem15.faq::lang.labels.content
type: repeater
prompt: golem15.faq::lang.labels.add_question
titleFrom: question
form:
fields:
question:
label: golem15.faq::lang.labels.question
type: text
required: true
answer:
label: golem15.faq::lang.labels.answer
type: richeditor