{% extends "passerelle/manage.html" %}
{% load i18n gadjo static %}

{% block extrascripts %}
  <script src="{% static "js/slugify.js" %}"></script>
  {{ block.super }}
{% endblock %}

{% block breadcrumb %}
  {{ block.super }}
  {% if object.id %}
    <a href="{{ object.get_absolute_url }}">{{ object.title }}</a>
  {% else %}
    <a href="#">{% trans 'Add Connector' %}</a>
  {% endif %}
{% endblock %}

{% block appbar %}
  <h2>{{ view.model.get_verbose_name }} - {% if object.id %}{{ object.title }}{% else %}{% trans 'New' %}{% endif %}</h2>
{% endblock %}

{% block content %}

  <form method="post" enctype="multipart/form-data">
    <div id="form-content">
      {% csrf_token %}
      {{ form|with_template }}
    </div>
    {% block buttons %}
      <div class="buttons">
        <button class="submit-button">{% trans "Save" %}</button>
        {% if object.id %}
          <a class="cancel" href="{{ object.get_absolute_url }}">{% trans 'Cancel' %}</a>
        {% else %}
          <a class="cancel" href="{% url 'add-connector' %}">{% trans 'Cancel' %}</a>
        {% endif %}
      </div>
    {% endblock %}
  </form>

{% endblock %}
