-extends 'smartmin/form.html'
-load smartmin
-load i18n

-block form-span
  span8

-block fields
  .field.formax-vertical
    {% render_field 'country' %}

-block summary
  -if object.country
    -blocktrans with country=object.country
      Responses to location questions must be in <span class='attn'>{{country}}</span>.

  -else
    -trans "Choose a country to enable location support in your flows."

-block post-fields
  -if object.country
    .extra-formax-buttons
      %a.btn{ href: '{% url "locations.adminboundary_alias" %}', style:'width: 120px;'}
        -trans "Edit Aliases"

-block extra-script
  {{block.super}}
  :javascript
    $(document).ready(function() {

      $('#id_country').select2({
        containerCssClass: 'select2-temba-field',
      });
    });
