{% extends "_layouts/cp" %} {% import "_includes/forms" as forms %} {% set crumbs = [ { label: "Settings"|t, url: url('settings') }, { label: "Globals"|t, url: url('settings/globals') } ] %} {% if globalSet is not defined and globalSetId is defined %} {% set globalSet = craft.globals.getSetById(globalSetId) %} {% if not globalSet %}{% exit 404 %}{% endif %} {% endif %} {% set isNewGlobalSet = (globalSet is not defined or not globalSet.id) %} {% if isNewGlobalSet %} {% set title = "Create a new global set"|t %} {% else %} {% set title = globalSet.name %} {% endif %} {% set tabs = { settings: { label: "Settings"|t, url: '#set-settings' }, fieldlayout: { label: "Field Layout"|t, url: '#set-fieldlayout' } } %} {% set content %}
{% if not isNewGlobalSet %}{% endif %}
{{ forms.textField({ first: true, label: "Name"|t, instructions: "What this global set will be called in the CP."|t, id: 'name', name: 'name', value: (globalSet is defined ? globalSet.name : null), errors: (globalSet is defined ? globalSet.getErrors('name') : null), autofocus: true, required: true, translatable: true }) }} {{ forms.textField({ label: "Handle"|t, instructions: "How you’ll refer to this global set in the templates."|t, id: 'handle', class: 'code', name: 'handle', value: (globalSet is defined ? globalSet.handle : null), errors: (globalSet is defined ? globalSet.getErrors('handle') : null), required: true }) }}

{% endset %}