{% extends "commerce/_layouts/cp" %} {% do view.registerAssetBundle('craft\\web\\assets\\admintable\\AdminTableAsset') -%} {% do view.registerTranslations('commerce', [ 'Abbreviation', 'Couldn’t reorder states.', 'Country', 'Disabled', 'Enabled', 'Name', 'No states exist yet.', 'Set state status', 'States reordered.', 'Warning, deleting this state will remove it from all addresses and zones, are you sure you want to delete “{name}”?', ]) %} {% set crumbs = [ { label: "Store Settings"|t('commerce'), url: url('commerce/store-settings') }, { label: "Countries"|t('commerce'), url: url('commerce/store-settings/countries') }, ] %} {% set selectedSubnavItem = 'store-settings' %} {% set fullPageForm = true %} {% import "_includes/forms" as forms %} {% block content %} {{ redirectInput('commerce/store-settings/countries') }} {% if country.id %}{% endif %} {{ forms.textField({ first: true, label: "Name"|t('commerce'), instructions: "What this country will be called in the control panel."|t('commerce'), id: 'name', name: 'name', value: country.name, errors: country.getErrors('name'), autofocus: true, required: true }) }} {{ forms.textField({ label: "ISO"|t('commerce'), instructions: "The two-letter ISO country code."|t('commerce'), id: 'iso', name: 'iso', value: country.iso, errors: country.getErrors('iso'), required: true, }) }} {{ forms.checkboxField({ label: "Require a state to be selected when this country is chosen"|t('commerce'), id: 'isStateRequired', name: 'isStateRequired', value: 1, checked: country.isStateRequired, errors: country.getErrors('isStateRequired') }) }} {{ forms.lightswitchField({ label: "Enabled?"|t('commerce'), id: 'enabled', name: 'enabled', value: 1, on: country.enabled, errors: country.getErrors('enabled'), warning: showDisableWarning ? 'You will not be able to update addresses, shipping zones or tax zones related to this country if it is disabled.'|t('commerce') : null, }) }}