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

{% block appbar %}
  <h2>{% trans "Availability check parameters" %}</h2>
{% endblock %}

{% block content %}
  <form method="post">
    {% csrf_token %}

    {% if availability_status %}
      <div class="{% if availability_status.down %}errornotice{% else %}successnotice{% endif %}">
        {% trans 'Connector Status:' %}
        {% if availability_status.down %}
          {% trans 'Down' %}
          ({% trans 'since:' %} {{availability_status.start_timestamp|date:"SHORT_DATETIME_FORMAT"}})
          <span class="availability-status-message">{{availability_status.message}}</span>
        {% else %}
          {% trans 'Up' %}
        {% endif %}
      </div>
    {% endif %}

    {{ form|with_template }}
    <div class="buttons">
      <button class="submit-button">{% trans 'Save' %}</button>
      <a href="{{ connector.get_absolute_url }}" class="cancel">{% trans 'Cancel' %}</a>
    </div>
  </form>
{% endblock %}
