{% extends "base.html" %}

{% load i18n %}

{% block page_title %}Find your polling station{% endblock page_title %}

{% block content %}

{% block extra_content %}{% endblock extra_content %}
<div class="row">
  <div class="columns large-centered columns large-6 card">
    {% if not is_whitelabel and not form.errors %}
    <header>
      <h2>{% trans "Find your polling station" %}</h2>
    </header>
    {% endif %}

    {% if form.errors %}
      {% blocktrans %}
      <h2>Sorry, we can't find {{ postcode }}</h2>
      <p>This doesn't appear to be a valid postcode.</p>
      {% endblocktrans %}
    {% endif %}

    <form method=post class="form form-inline">
      {% csrf_token %}
      <label class="card_header">{% trans "Enter your postcode" %}
        <input id="id_postcode" name="postcode" type="text" aria-describedby="postcode_help_text" autofocus >
      </label>
      <button type="submit" class="button" id="submit-postcode">{% trans "Find your polling station" %}</button>
    </form>
  </div>
</div>

{% endblock content %}

{% extends "base.html" %}
{% load dc_forms %}

{% load i18n %}

{% block page_title %}Find your polling station{% endblock page_title %}

{% block content %}

{% block extra_content %}{% endblock extra_content %}
<div class="row">
  <div class="columns large-centered columns large-6 card">
    {% if not is_whitelabel and not form.errors %}
    <header>
      <h2>{% trans "Find your polling station" %}</h2>
    </header>
    {% endif %}

    {% if form.errors %}
      {% blocktrans %}
      <h2>Sorry, we can't find {{ postcode }}</h2>
      <p>This doesn't appear to be a valid postcode.</p>
      {% endblocktrans %}
    {% endif %}

    <form method=post class="form form-inline">
      {% csrf_token %}
      {{ form|dc_form }}
      <button type="submit" class="button" id="submit-postcode">{% trans "Find your polling station" %}</button>
    </form>
  </div>
</div>

{% endblock content %}

Use DC forms tag for postcode form
Use DC forms tag for postcode form
