{% load i18n %}

<label for="id_province_{{name}}">{% trans 'Province' %}: </label>
<select name="province_{{name}}" id=id_province_{{name}} onchange='load_canton(this, undefined)' {% if required %} required {% endif %} >
	<option value="-1" {% if prov == '' or prov == -1 or prov == '-1' %} selected {% endif %} {{attrs}}> ----------- </option>
{% for val in provinces %}
	<option value="{{val.pk}}" {% if prov == val.pk %} selected {% endif %} {{attrs}}> {{val}} </option>
{% endfor %}
</select>

<input type="hidden" id="id_{{name}}_text" name="{{name}}_text" value="{{value_text}}" />

{{canton_txt|safe}}
{{dist_text|safe}}

{% if dist %}
<input type="hidden" name="err_canton_{{name}}" class="crdist_onerror" value="{{prov}}" initial="{{canton}}" />
<input type="hidden" name="err_district_{{name}}" class="crdist_onerror" value="{{canton}}" 
            initial="{{dist.pk}}" />
{% endif %}
