{% extends "user/user-base.html" %} {% block user_media %} {% include "timezone/media-css.html" %} {{ form.media.css }} {% endblock %} {% block js_media %} {% include "timezone/media-js.html" %} {{ form.media.js }} {% endblock %} {% block title_ruler %}{% endblock %} {% block title_row %} {% set tab = 'edit' %} {% set user = request.profile %} {% include "user/user-tabs.html" %} {% endblock %} {% block body %}
{% if form.errors %}
x {{ form.non_field_errors() }} {{ form.about.errors }}
{% endif %} {% csrf_token %}
{{ _('Self-description:') }}
{{ form.about }}
{% if has_math_config %} {% endif %}
{{ form.timezone }}
{{ form.language }}
{{ form.site_theme }}
{{ form.ace_theme }}
{{ form.math_engine }}
{% if form.organizations %}
{{- _('Affiliated organizations:') -}}
{{ form.organizations }}
{% endif %}

{% if form.newsletter %} {% endif %} {% if can_download_data %} {% endif %}
{{ form.newsletter }}
{{ form.test_site }}
{{ _('Change your avatar') }}
{{ _('Change your password') }}
{{ _('Change your email') }}
{{ _('Download your data') }}
{{ _('API token:') }} {% if profile.api_token %} {{ _('Regenerate') }} {{ _('Remove') }}
{{ _('Hidden') }}
{% else %} {{ _('Generate') }}
{% endif %}
{% if profile.is_totp_enabled %}
{{ _('Two-factor authentication is enabled:') }}
{% if require_staff_2fa and request.user.is_staff and not profile.is_webauthn_enabled %} {{ _('Disable') }} {% else %} {{ _('Disable') }} {% endif %} {{ _('Edit') }}
{{ _('Scratch codes:') }} {% if profile.scratch_codes %} {{ _('Regenerate') }}
{{ _('Hidden') }}
{% else %} {{ _('Generate') }} {% endif %}
{% else %} {{ _('Two-factor Authentication is disabled:') }} {{ _('Enable') }} {% endif %}
{% if HAS_WEBAUTHN %}
{{- _('Security keys:') -}}
{% if profile.is_webauthn_enabled %} {% for credential in profile.webauthn_credentials.all() %} {% endfor %} {% endif %}
{{ credential.name }}
{% endif %}

{{ _('User-script:') }}
{{ form.user_script }}
{% endblock %}