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

{% block description %}
  {% if object.uses_new_api and not object.consumer_key %}
    <div class="warningnotice">{% trans "Connector is not operational yet, as access needs to be obtained from OVH for the specified account." %}
      <a href="{% url "ovh-request-token" slug=object.slug %}">{% trans "Click here to request access." %}</a>
    </div>
  {% endif %}

  {% if object.uses_new_api and object.consumer_key and not object.credit_left %}
    <div class="pk-error"><p>{% trans "There is no credit left." %}</p></div>
  {% endif %}

  {{ block.super }}

  {% if object.uses_new_api and object.consumer_key %}
    <p>{% trans "Credit left:" %} {{ object.credit_left }}</p>
  {% endif %}
{% endblock %}
