{% extends "Emailing/public/base_iframe.html" %}
{% load i18n %}

{% block extra_head %}
<style>
  ul.errorlist {
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 0.7em;
    color: red;
    background: #eee;
    font-family: sans-serif;
    position: absolute;
    top: 20px;
    left: 20px;
  }
</style>
<script>
  $(function() {
    $("input[name=email]").keyup(function(event){
        if(event.keyCode == 13){
            $(this).closest('form').submit();
        }
    }).click(function() {
      $("ul.errorlist").hide();
    });
    $("ul.errorlist").click(function() {
      $(this).hide();
    });
  })
</script>
{% block customize_head %}
{% endblock %}
{% endblock %}
  
{% block content %}
  {{ block.super }}
  <form class="form" method="post" action="{{ action_url }}">{% csrf_token %}
    {% block customize_form %}
      {{form.as_p}}
    {% endblock %}
    {% block submit_button %}
    <input style="display: none;" type="submit" value="{% trans "Ok" %}">
    {% endblock %}
  </form>
{% endblock %}