{% extends "base.html" %} {% block title %} {% if token %} {{ _("Edit - %(name)s", name=token.name) }} {% else %} {{ _("Create API Token") }} {% endif %} {% endblock %} {% from "macros/forms.html" import render_field, render_submit_field, render_radio_field %} {% block content %} {% if token %}
{% endif %}

{{ self.title() }}

{% if token.client %}

{{ _("This token was created by the application '%(title)s' by %(author)s.", title=token.client.title, author=token.client.owner.username) }} {{ _("Click 'Delete' to revoke access.") }}

{% else %}
{{ _("API Tokens allow scripts to act on your behalf.") }} {{ _("Be careful with what/whom you share tokens with, as you are responsible for your account's actions.") }}
{% if token %}
{{ _("Access Token") }}

{{ _("For security reasons, access tokens will only be shown once. Reset the token if it is lost.") }}

{% if access_token %} {% endif %}
{% endif %} {% endif %}
{{ form.hidden_tag() }} {{ render_field(form.name, placeholder="Human readable", hint=_("Human-readable name to tell tokens apart.")) }} {{ render_field(form.package, hint=_("Recommended: Only allows token to interact with a particular package.")) }} {{ render_submit_field(form.submit) }}
{% endblock %}