{% extends "base.html" %} {% from "macros/forms.html" import render_extra_fields %} {% block content %}

{% trans %}Settings{% endtrans %}

{% include "components/errors.html" %} {% with form = Forms.self.SettingsForm(language=language, country=country) %}
{{ form.name.label(class="form-label") }} {{ form.name(class="form-control", value=name) }}
{{ form.email.label(class="form-label") }} {{ form.email(class="form-control", value=email) }}
{{ form.language.label(class="form-label") }} {{ form.language(class="form-select", value=language) }}

{{ form.confirm.label(class="form-label") }} {{ form.confirm(class="form-control") }}
{{ form.password.label(class="form-label") }} {{ form.password(class="form-control") }}

{{ form.affiliation.label(class="form-label") }} {{ form.affiliation(class="form-control", value=affiliation or "") }}
{{ form.website.label(class="form-label") }} {{ form.website(class="form-control", value=website or "") }}
{{ form.country.label(class="form-label") }} {{ form.country(class="form-select", value=country) }}

{{ render_extra_fields(form.extra) }}
{{ form.submit(class="btn btn-primary float-end px-4") }}
{% endwith %}
{% with form = Forms.self.TokensForm() %}
{{ form.expiration.label(class="form-label") }} {{ form.expiration(class="form-control") }}
{{ form.description.label(class="form-label") }} {{ form.description(class="form-control", rows="3") }}
{{ form.submit(class="btn btn-block btn-primary float-end px-4") }}
{% endwith %} {% if tokens %}

{% trans %}Active Tokens{% endtrans %}

{# This has to be wrapping the table modal, because div with modal will get pushed out of the table and alpine ref will not work #}
{% for token in tokens %} {% endfor %}
{% trans %}Created{% endtrans %} {% trans %}Expiration{% endtrans %} {% trans %}Description{% endtrans %} {% trans %}Delete{% endtrans %}
{{ token.description | default('', true) }}
{% endif %}
{% endblock %} {% block scripts %} {{ Assets.js("assets/js/settings.js") }} {% endblock %}