{% extends "_layouts/cp" %} {% set fullPageForm = true %} {% import "_includes/forms" as forms %} {% block content %} {% if section.type == 'single' %} {{ redirectInput('settings/sections') }} {% else %} {{ redirectInput('settings/sections/'~section.id~'/entrytypes') }} {% endif %} {% if entryType.id %}{% endif %} {% if section.type != 'single' %} {{ forms.textField({ first: true, label: "Name"|t('app'), instructions: "What this entry type will be called in the CP."|t('app'), id: 'name', name: 'name', value: entryType.name, errors: entryType.getErrors('name'), autofocus: true, required: true }) }} {{ forms.textField({ label: "Handle"|t('app'), instructions: "How you’ll refer to this entry type in the templates."|t('app'), id: 'handle', class: 'code', name: 'handle', value: entryType.handle, errors: entryType.getErrors('handle'), required: true }) }}
{% endif %} {{ forms.checkboxField({ first: (section.type == 'single'), label: "Show the Title field"|t('app'), name: 'hasTitleField', toggle: 'titleLabel-container', reverseToggle: 'titleFormat-container', checked: entryType.hasTitleField }) }}
{% include "_includes/fieldlayoutdesigner" with { fieldLayout: entryType.getFieldLayout(), } only %} {% endblock %} {% if not entryType.handle %} {% js "new Craft.HandleGenerator('#name', '#handle');" %} {% endif %}