{% extends "orga/base.html" %} {% load html_signal %} {% load i18n %} {% load static %} {% 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_buttons=profile_submit %}
{% translate "Login settings" %} {% include "orga/includes/base_form.html" with form=login_form submit_buttons=login_submit %}
{% 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" context "API token version" %} {% translate "Events" %} {% translate "Capabilities" %} {% 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 %}
{% if token.permission_preset == "read" %} {% translate "Read all endpoints" %} {% elif token.permission_preset == "write" %} {% translate "Read and write all endpoints" %} {% else %}
{% translate "Custom" %}
    {% for endpoint, permissions in token.get_endpoint_permissions_display %}
  • {{ endpoint }}: {{ permissions|join:", " }}
  • {% empty %}
  • {% translate "No permissions" %}
  • {% endfor %}
{% 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 do not 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_buttons=token_submit %}
{% endif %} {% html_signal "pretalx.common.signals.profile_bottom_html" sender=request.event user=user orga="true" %} {% endblock content %}