{# The email form for one account (milestone 495): its address, and whether it gets alert emails and the weekly report. Used by the Account page (your own) and an account's page in Settings › Users (an admin's view). `defaults` is {kind: bool}, the account's role defaults. #} {% macro email_choices(user, defaults, action, error=none, with_address=true) -%}
{{ csrf_field() }}

Email

{% if error %}{% endif %} {% if with_address %}
{% if user.auth_source != "local" %}Your sign-in provider set this first; change it if mail doesn't reach it.{% endif %}
{% endif %}
{% for kind, label in (("alerts", "Alert emails"), ("report", "Weekly report")) %} {% set choice = user["notify_" ~ kind] %}
{% endfor %}
Times in these emails are in {{ user.time_zone or "UTC" }}. A role's default is set in Settings › Notifications.
{%- endmacro %}