{% extends "orga/base.html" %} {% load copyable %} {% load i18n %} {% load static %} {% load compress %} {% load i18n %} {% load static %} {% load html_signal %} {% block scripts %} {% compress js %} {% endcompress %} {% endblock %} {% block extra_title %}{% translate "User settings" %} :: {% endblock extra_title %} {% block content %}
{% translate "User settings" %} {% include "orga/includes/base_form.html" with form=profile_form submit_name="form" submit_value="profile" %}
{% translate "Login settings" %} {% include "orga/includes/base_form.html" with form=login_form submit_name="form" submit_value="login" %}
{% if user.teams.all.exists %}
{% translate "API Access" %}

{% blocktranslate trimmed with apiurl='href="/api/events/" target="_blank" rel="noopener"' docurl='href="https://docs.pretalx.org/api/" target="_blank" rel="noopener"' %} API tokens can be used to access the pretalx API. To find out more, please have a look at the API documentation. {% endblocktranslate %}

{% if tokens %}
{% translate "Your API tokens" %}
{% for token in tokens %} {% endfor %}
{% translate "Name" %} {% translate "Version" %} {% translate "Events" %} {% translate "Last used" %} {% translate "Created" %} {% translate "Valid until" %}
{{ token.name }} {{ token.version|default:'-' }} {% if not token.is_latest_version and token.is_active %}
{% csrf_token %}
{% endif %}
{{ token.last_used|date:"SHORT_DATETIME_FORMAT"|default:"-" }} {{ token.created|date:"SHORT_DATETIME_FORMAT" }} {{ token.expires|date:"SHORT_DATETIME_FORMAT"|default:"-" }} {% if token.is_active %}
{% csrf_token %}
{% endif %}
{% else %}

{% translate "You don't have any API tokens yet." %}

{% endif %}

{% translate "Create new token" %}

{% csrf_token %} {{ token_form.name.as_field_group }} {{ token_form.events.as_field_group }} {{ token_form.expires.as_field_group }} {{ token_form.permission_preset.as_field_group }}
{% for option in token_form.fields.endpoint_events.choices %} {% endfor %} {% for name, field in token_form.get_endpoint_fields %} {% for option in field.field.choices %} {% endfor %} {% endfor %}
{{ option.1 }}
{{ field.label }}
{% include "orga/includes/submit_row.html" with submit_name="form" submit_value="token" %}
{% endif %} {% html_signal "pretalx.common.signals.profile_bottom_html" sender=request.event user=user orga="true" %} {% endblock content %}