{% extends "_layouts/cp" %}
{% set fullPageForm = true %}
{% import "_includes/forms" as forms %}
{% block content %}
{{ redirectInput('settings/sections') }}
{% if section.id %}{% endif %}
{{ forms.textField({
first: true,
label: "Name"|t('app'),
instructions: "What this section will be called in the CP."|t('app'),
id: 'name',
name: 'name',
value: section.name,
errors: section.getErrors('name'),
autofocus: true,
required: true,
}) }}
{{ forms.textField({
label: "Handle"|t('app'),
instructions: "How you’ll refer to this section in the templates."|t('app'),
id: 'handle',
class: 'code',
name: 'handle',
value: section.handle,
errors: section.getErrors('handle'),
required: true
}) }}
{{ forms.checkboxField({
label: "Enable versioning for entries in this section?"|t('app'),
id: 'enableVersioning',
name: 'enableVersioning',
checked: section.enableVersioning
}) }}
{{ forms.selectField({
label: "Section Type"|t('app'),
instructions: "What type of section is this?"|t('app') ~ (section.id ? '
'~"Careful—changing this may result in data loss."|t('app')~'' : ''),
id: 'type',
name: 'type',
options: typeOptions,
value: section.type,
toggle: true,
targetPrefix: '.type-',
errors: section.getErrors('type')
}) }}