{% extends "account-base.html" %} {% from "ui.html" import csrf_field, action, when with context %} {% macro password_form(forced=false) -%}
{% if not forced %}

{{ _("Password") }}

{% endif %} {{ csrf_field() }} {% if user.password_hash %}
{% if forced %}

{{ _("The one your administrator gave you.") }}

{% endif %}
{% else %}

{{ _("Your account has no password yet: you sign in with single sign-on.") }}

{% endif %}

{{ _("12 characters minimum.") }}

{% if not forced %}

{{ _("Your other sessions and your personal tokens will be closed.") }}

{% endif %}
{%- endmacro %} {% block forced %}

@{{ user.username }}

{{ _("Choose your password") }}

{{ _("Your account was created with a temporary password. Replace it with your own to access Synaptane.") }}

{{ password_form(forced=true) }}
{{ csrf_field() }}{{ _("Not your account?") }}
{% endblock %} {% block section %} {{ password_form() }} {% if identities or linkable %}

{{ _("Single sign-on identities") }}

{{ _("External accounts you sign in to Synaptane with.") }}

{% for identity, provider in identities %}

{{ provider.name }}

{{ identity.email }}
{% if identity.last_login_at %}{{ _("Last sign-in") }} {{ when(identity.last_login_at) }}{% else %}{{ _("Never used to sign in") }}{% endif %} {{ action("/account/identities/" ~ identity.id ~ "/unlink", _("Unlink"), confirm=_("Unlink this {name} account? You will no longer be able to sign in with it.", name=provider.name), kind="danger") }}
{% endfor %} {% if linkable %} {% endif %}
{% endif %} {% endblock %}