{% extends "base.html" %}

{% block title %}
{% trans %}Forward emails{% endtrans %}
{% endblock %}

{% block subtitle %}
{{ user }}
{% endblock %}

{% block content %}
{% call macros.box() %}
<form class="form" method="post" role="form">
  {{ form.hidden_tag() }}
  {{ macros.form_field(form.forward_enabled,
      onchange="if(this.checked){$('#forward_destination,#forward_keep').removeAttr('disabled')}
                else{$('#forward_destination,#forward_keep').attr('disabled', '')}") }}
  {{ macros.form_field(form.forward_keep,
      **{("enabled" if user.forward_enabled else "disabled"): ""}) }}
  {{ macros.form_field(form.forward_destination,
      **{("enabled" if user.forward_enabled else "disabled"): ""}) }}
  {{ macros.form_field(form.submit) }}
</form>
{% endcall %}
{% endblock %}
