{% load i18n locale %}
{% get_current_language as LANGUAGE_CODE %}
<div id="contact" class="popup-form" dir="{% locale_dir %}">
  <div id="js-contact">
    <h1>{{ contact_form_title }}</h1>
    {% block contact_preamble %}
    <p>
      {% blocktrans trimmed %}
      Please fill in all the fields.
      {% endblocktrans %}
    </p>
    {% endblock %}
    <form method="post" action="{{ contact_form_url }}">
      {% csrf_token %}
      {{ form.as_p }}
      <p class="buttons">
        <input type="submit" name="send" id="js-contact-submit"
               class="btn btn-primary"
               value="{% trans 'Send Message' %}" />
      </p>
    </form>
  </div>
  <div id="js-sent" class="hide">
    <h1>{% trans "Thanks!" %}</h1>
    <p>
      {% blocktrans trimmed %}
      We have received your message and will try to respond as soon as possible.
      {% endblocktrans %}
    </p>
  </div>
</div>
