{% extends "passerelle/manage/apiuser_list.html" %}
{% load i18n %}
{% load url from future %}

{% block breadcrumb %}
{{ block.super }}
{% if object.id %}
<a href="{{ object.get_absolute_url }}">{{ object.username }}</a>
{% else %}
<a href="{% url 'apiuser-add' %}">{% trans 'Add API User' %}</a>
{% endif %}
{% endblock %}

{% block appbar %}
<h2>{% trans 'API User' %} - {% if object.id %}{{ object.username }}{% else %}{% trans 'New' %}{% endif %}</h2>
{% endblock %}

{% block content %}

 <form method="post" enctype="multipart/form-data">
   <div id="form-content">
     {% csrf_token %}
     {{ form.as_p }}
   </div>
   {% block buttons %}
   <div class="buttons">
     <button class="submit-button">{% trans "Save" %}</button>
     <a class="cancel" href="{% url 'apiuser-list' %}">{% trans 'Cancel' %}</a>
   </div>
   {% endblock %}
 </form>

{% endblock %}
