{% extends "common/generic_modal_form.html" %}

{% load form_tags %}

{% block formbody %}
  {% if form.random_address %}{% render_field form.random_address %}{% endif %}
  {% render_field form.address %}
  {% if form.domain %}{% render_field form.domain hidden=True %}{% endif %}
  {% render_fields_group form "recipients" %}
  {% if not form.instance.pk or form.instance.domain.enabled %}
    {% render_field form.enabled %}
  {% else %}
    {% include "common/generic_field.html" with field=form.enabled label_width="col-sm-4" inline_message=_("Domain is disabled") extra_classes="info" %}
  {% endif %}
  {% render_field form.expire_at %}
  {% render_field form.description %}
{% endblock %}
