{% extends "core/base.jinja" %} {% from 'core/macros.jinja' import select_all_checkbox %} {% block title %} {% trans %}Mailing lists{% endtrans %} {% endblock %} {% block content %} {% trans %}Remember : mailing lists need to be moderated, if your new created list is not shown wait until moderation takes action{% endtrans %} {% if mailings_not_moderated %}

{% trans %}Mailing lists waiting for moderation{% endtrans %}

{% endif %} {% if mailings_moderated %} {% for mailing in mailings_moderated %}

{% trans %}Mailing{% endtrans %} {{ mailing.email_full }} {%- if user.is_owner(mailing) -%} - {% trans %}Delete{% endtrans %} {%- endif -%}

{% set form_mailing_removal = form["removal_" + mailing.id|string] %} {% if form_mailing_removal.field.choices %} {% set ms = dict(mailing.subscriptions.all() | groupby('id')) %}

{{ select_all_checkbox(form_mailing_removal.auto_id) }}

{% csrf_token %} {% for widget in form_mailing_removal.subwidgets %} {% set user = ms[widget.data.value.value][0] %} {% endfor %}
{% trans %}User{% endtrans %} {% trans %}Email{% endtrans %} {% trans %}Delete{% endtrans %}
{{ user.get_username }} {{ user.get_email }} {{ widget.tag() }}
{{ form_mailing_removal.errors }}

{% else %}

{% trans %}There is no subscriber for this mailing list{% endtrans %}

{% endif %} {% endfor %} {% else %}

{% trans %}No mailing list existing for this club{% endtrans %}

{% endif %}

{{ form.non_field_errors() }}

{% if mailings_moderated %}

{% trans %}New member{% endtrans %}

{% csrf_token %}

{{ form.subscription_mailing.errors }} {{ form.subscription_mailing }}

{{ form.subscription_users.errors }} {{ form.subscription_users }} {{ form.subscription_users.help_text }}

{{ form.subscription_email.errors }} {{ form.subscription_email }}

{% endif %}

{% trans %}New mailing{% endtrans %}

{% csrf_token %}

{{ form.mailing_email.errors }} {{ form.mailing_email }}

{% endblock %}