{% macro list_form(form, isnew) %}
{{ form.csrf_token }} {{ form.name.label }} {{ form.name }} {{ form.address.label }} {%- if isnew %} {{ form.address(value="@" + config.IMAP_DEFAULT_USER_DOMAIN) }} {%- else %} {{ form.address }} {%- endif %}
{{ form.avoid_duplicates(role="switch") }} {{ form.avoid_duplicates.label }}
{{ _('Mode Settings') }}
{{ form.mode.label }} {{ form.mode }}
{{ form.only_subscribers_send(role="switch") }} {{ form.only_subscribers_send.label }}
{{ form.from_addr.label }} {{ form.from_addr(placeholder=("John Doe ")) }} {{ (form.from_addr.description) }} {{ form.allowed_senders.label }} {{ form.allowed_senders(placeholder=("user@example.com,another@example.com")) }} {{ (form.allowed_senders.description) }} {{ form.sender_auth.label }} {{ form.sender_auth(placeholder=("password1,password2")) }} {{ (form.sender_auth.description) }}

{{ _('IMAP Settings') }} {{ form.imap_host.label }} {{ form.imap_host(placeholder=config.IMAP_DEFAULT_HOST) }} {{ form.imap_port.label }} {{ form.imap_port(placeholder=config.IMAP_DEFAULT_PORT) }} {{ form.imap_user.label }} {%- if isnew %} {{ form.imap_user(placeholder=_("Leave empty to use list address")) }} {%- else %} {{ form.imap_user }} {%- endif %} {{ form.imap_pass.label }} {%- if isnew %} {{ form.imap_pass(placeholder=_("Leave empty to use configured default")) }} {%- else %} {{ form.imap_pass(placeholder=_("Leave empty to not update password")) }} {%- endif %}

{{ form.submit(value=_('Save List')) }}
{% endmacro %} {% macro subscriber_list_buttons(email) %} {%- if is_email_a_list(email) %}

{{ _('Edit List Settings') }} {{ _('View List Subscribers') }}

{%- endif %} {% endmacro %}