2020-12-05 06:24:27 +01:00
|
|
|
{% extends "users/settings_base.html" %}
|
|
|
|
|
|
|
|
{% block title %}
|
2022-01-08 00:27:00 +01:00
|
|
|
{{ _("Email and Notifications - %(username)s", username=user.username) }}
|
2020-12-05 06:24:27 +01:00
|
|
|
{% endblock %}
|
|
|
|
|
2024-03-05 19:05:13 +01:00
|
|
|
{% block scriptextra %}
|
|
|
|
<script src="/static/js/email_disable_all.js"></script>
|
|
|
|
{% endblock %}
|
|
|
|
|
2020-12-05 06:24:27 +01:00
|
|
|
{% block pane %}
|
|
|
|
<h2 class="mt-0">{{ _("Email and Notifications") }}</h2>
|
|
|
|
|
|
|
|
{% from "macros/forms.html" import render_field, render_submit_field, render_checkbox_field %}
|
|
|
|
<form action="" method="POST" class="form" role="form">
|
|
|
|
{{ form.hidden_tag() }}
|
|
|
|
|
2022-01-08 00:27:00 +01:00
|
|
|
<h3>{{ _("Email Address") }}</h3>
|
2020-12-05 19:39:50 +01:00
|
|
|
|
|
|
|
{{ render_field(form.email, tabindex=100) }}
|
|
|
|
|
|
|
|
<p>
|
2021-01-24 14:25:17 +01:00
|
|
|
{{ _("Your email is needed to recover your account if you forget your password, and to send (configurable) notifications.") }}
|
|
|
|
{{ _("Your email will never be shared with a third-party.") }}
|
2020-12-05 19:39:50 +01:00
|
|
|
</p>
|
|
|
|
|
2021-01-24 14:25:17 +01:00
|
|
|
{% if user.email_verifications.filter_by(is_password_reset=False).count() > 0 %}
|
|
|
|
<p>
|
|
|
|
<i>{{ _("There is at least one verification pending.") }}</i>
|
|
|
|
</p>
|
|
|
|
{% endif %}
|
2020-12-05 19:39:50 +01:00
|
|
|
|
2022-01-08 00:27:00 +01:00
|
|
|
<h3>{{ _("Notification Settings") }}</h3>
|
2020-12-05 19:39:50 +01:00
|
|
|
|
|
|
|
{% if is_new %}
|
|
|
|
<p class="alert alert-info">
|
2020-12-05 22:59:02 +01:00
|
|
|
{{ _("Email notifications are currently turned off. Click 'save' to enable.") }}
|
2020-12-05 19:39:50 +01:00
|
|
|
</p>
|
|
|
|
{% endif %}
|
|
|
|
|
2020-12-05 22:59:02 +01:00
|
|
|
<p>
|
2022-01-08 00:27:00 +01:00
|
|
|
{{ _("Configure whether certain types of notifications are sent immediately, or as part of a daily digest.") }}
|
2024-03-05 19:05:13 +01:00
|
|
|
<button type="button" id="disable-all" class="btn btn-sm btn-secondary d-none ms-5">{{ _("Disable all") }}</button>
|
2020-12-05 22:59:02 +01:00
|
|
|
</p>
|
|
|
|
|
2020-12-05 06:24:27 +01:00
|
|
|
<table class="table">
|
|
|
|
<tr>
|
2022-01-08 00:27:00 +01:00
|
|
|
<th>{{ _("Event") }}</th>
|
|
|
|
<th>{{ _("Description") }}</th>
|
|
|
|
<td>{{ _("Immediately") }}</td>
|
|
|
|
<td>{{ _("In digest") }}</td>
|
2020-12-05 06:24:27 +01:00
|
|
|
</tr>
|
|
|
|
{% for type in types %}
|
|
|
|
<tr>
|
2023-06-18 22:56:19 +02:00
|
|
|
<td>{{ type.get_title() }}</td>
|
2020-12-05 06:24:27 +01:00
|
|
|
<td>{{ type.get_description() }}</td>
|
2020-12-05 22:59:02 +01:00
|
|
|
<td style="text-align: center;">
|
2023-06-18 22:56:19 +02:00
|
|
|
{{ render_checkbox_field(form["pref_" + type.to_name()]) }}
|
2020-12-05 22:59:02 +01:00
|
|
|
</td>
|
|
|
|
<td style="text-align: center;">
|
2023-06-18 22:56:19 +02:00
|
|
|
{{ render_checkbox_field(form["pref_" + type.to_name() + "_digest"]) }}
|
2020-12-05 22:59:02 +01:00
|
|
|
</td>
|
2020-12-05 06:24:27 +01:00
|
|
|
</tr>
|
|
|
|
{% endfor %}
|
|
|
|
</table>
|
|
|
|
|
2020-12-05 19:39:50 +01:00
|
|
|
<p class="mt-5">
|
2024-03-05 19:05:13 +01:00
|
|
|
{{ render_submit_field(form.submit, tabindex=280, class_="btn btn-lg btn-primary") }}
|
2020-12-05 19:39:50 +01:00
|
|
|
</p>
|
2020-12-05 06:24:27 +01:00
|
|
|
</form>
|
|
|
|
{% endblock %}
|