{% extends 'settings/sections/_layout.twig' %} {% set selectedTab = 'settings' %} {% set fullPageForm = true %} {% set formActions = [ { label: 'Save and continue editing'|t('app'), redirect: 'settings/sections/{id}'|hash, shortcut: true, retainScroll: true, }, ] %} {% import '_includes/forms.twig' as forms %} {% set headlessMode = craft.app.config.general.headlessMode %} {% block submitButton %} {% if section.id %} {{ parent() }} {% else %} {% endif %} {% endblock %} {% block content %} {{ actionInput('sections/save-section') }} {{ redirectInput(section.id ? 'settings/sections' : "settings/sections/{id}/entrytypes") }} {% if section.id %}{{ hiddenInput('sectionId', section.id) }}{% endif %} {{ forms.textField({ first: true, label: "Name"|t('app'), instructions: "What this section will be called in the control panel."|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', name: 'handle', class: 'code', autocorrect: false, autocapitalize: false, 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'), warning: section.id and section.type != 'single' ? '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') }) }}