{% extends shell('app') %} {% block title %}{{ _('My account') }}{% endblock %} {% block breadcrumb %} {% endblock %} {% block content %}

{{ _('My account') }}

{% with messages = get_flashed_messages(with_categories=true) %} {% for category, message in messages %} {% endfor %} {% endwith %} {% if user.is_legacy_unconfirmed %} {# An account carried over from an older site, whose address nobody confirmed. It signs in, and what hands it over waits for the link. #}
{% if user.email %}

{{ _('Your address %(email)s is not confirmed yet. Changing it, connecting other accounts, creating tokens that can write and publishing wait until you follow the link we mailed to it.', email=user.email) }}

{{ confirm_form.hidden_tag() }}
{% else %}

{{ _('Your account has no email address yet. Add one below, then follow the link we mail to it.') }}

{% endif %}
{% endif %}
{{ form.hidden_tag() }}
{{ form.email.label(class="form-label fw-semibold") }} {{ form.email(class="form-control", autocomplete="username") }} {% for error in form.email.errors %}
{{ error }}
{% endfor %} {% if user.has_usable_password %}
{% if confirms_addresses %}{{ _('The address you sign in with. A new one needs your current password, and applies when you follow the link we mail to it.') }}{% else %}{{ _('The address you sign in with. A new one needs your current password.') }}{% endif %}
{% else %}
{% if confirms_addresses %}{{ _('The address you sign in with. A new one needs a recent sign-in, and applies when you follow the link we mail to it.') }}{% else %}{{ _('The address you sign in with. A new one needs a recent sign-in.') }}{% endif %}
{% endif %} {% if user.pending_email %}
{{ _('Waiting for %(email)s to be confirmed. Follow the link we mailed to it.', email=user.pending_email) }}
{% endif %}
{% if user.has_usable_password %}

{{ _('Change your password') }}

{% else %} {# An account a provider opened has no password of its own. It sets one here, after a recent sign-in, and can then disconnect the provider. #}

{{ _('Set a password') }}

{{ _('You sign in through another site, and your account has no password of its own. Set one to sign in with your address too. It needs a recent sign-in.') }}

{% endif %}
{% if 'current_password' in form %}
{{ form.current_password.label(class="form-label fw-semibold") }} {{ form.current_password(class="form-control", autocomplete="current-password") }}
{{ form.current_password.description }}
{% for error in form.current_password.errors %}
{{ error }}
{% endfor %}
{% endif %}
{{ form.new_password.label(class="form-label fw-semibold") }} {{ form.new_password(class="form-control", autocomplete="new-password") }}
{{ form.new_password.description }}
{% for error in form.new_password.errors %}
{{ error }}
{% endfor %}
{{ form.confirm_password.label(class="form-label fw-semibold") }} {{ form.confirm_password(class="form-control", autocomplete="new-password") }} {% for error in form.confirm_password.errors %}
{{ error }}
{% endfor %}
{{ form.submit(class="btn btn-primary") }}

{{ _('Sessions') }}

{{ confirm_form.hidden_tag() }}

{{ _('Signed in on a computer you no longer use, or lost a device? This closes every session of your account except this one, and forgets every "Remember me".') }}

{% endblock %}