{% extends "commerce/_layouts/cp" %}
{% set crumbs = [
{ label: "Store Settings"|t('commerce'), url: url('commerce/store-settings') },
{ label: "States"|t('commerce'), url: url('commerce/store-settings/states') },
] %}
{% set selectedSubnavItem = 'store-settings' %}
{% set fullPageForm = true %}
{% import "_includes/forms" as forms %}
{% block content %}
{{ redirectInput('commerce/store-settings/states') }}
{% if state.id %}{% endif %}
{{ forms.textField({
first: true,
label: "Name"|t('commerce'),
instructions: "What this state will be called in the CP."|t('commerce'),
id: 'name',
name: 'name',
value: state.name,
errors: state.getErrors('name'),
autofocus: true,
required: true,
translatable: true
}) }}
{{ forms.textField({
label: "Abbreviation"|t('commerce'),
id: 'abbreviation',
name: 'abbreviation',
value: state.abbreviation,
errors: state.getErrors('abbreviation'),
required: true,
}) }}
{{ forms.selectField({
label: "Country"|t('commerce'),
id: 'countryId',
name: 'countryId',
value: state.countryId,
errors: state.getErrors('countryId'),
required: true,
options: countries,
class: 'selectize fullwidth',
}) }}
{% endblock %}
{% js %}
$(function() {
$('#countryId').selectize({
dropdownParent: 'body'
});
});
{% endjs %}