{% from "layout/errorlist.html" import errorlist %}
{% if user.is_authenticated() %}
  {% set title = _("Send an email") %}
{% else %}
  {% set title =  _("Send an email to this address")  %}
{% endif %}
<section id="email-subscribe" class="kbox" title="{{ title }}" data-target="#email-subscribe-link" data-id="email-subscribe-kbox" data-position="none" data-close-on-out-click="true">
  <form action="{{ url('questions.watch', question.id) }}" method="post">
    {{ csrf() }}
    {{ errorlist(watch_form) }}
    {% if not user.is_authenticated() %}
      {{ watch_form.email|safe }}
    {% endif %}
    {{ watch_form.event_type|safe }}
    <input type="submit" class="btn" value="{{ _('Send Updates') }}" />
    <span class="cancel">
      <a class="kbox-cancel" href="{{ question.get_absolute_url() }}">{{ _('Cancel') }}</a>
    </span>
  </form>
</section>
