{% extends "horizon/common/_modal.html" %}
{% load i18n %}

{% block modal-body %}
  <form>
    {% if openrc_creds %}
      <div class="form-group">
        <label for="openrc-user">{% trans "User Name" %}</label>
        <input type="text" class="form-control" id="openrc-user" readonly value="{{ openrc_creds.user.username }}">
      </div>
      <div class="form-group">
        <label for="openrc-user">{% trans "User ID" %}</label>
        <input type="text" class="form-control" id="openrc-userid" readonly value="{{ openrc_creds.user.id }}">
      </div>
      {% if "user_domain_name" in openrc_creds %}
      <div class="form-group">
        <label for="openrc-domain">{% trans "Domain Name" %}</label>
        <input type="text" class="form-control" id="openrc-domain" readonly value="{{ openrc_creds.user_domain_name }}">
      </div>
      {% endif %}
      <div class="form-group">
        <label for="openrc-project-name">{% trans "Project Name" %}</label>
        <input type="text" class="form-control" id="openrc-project-name" readonly value="{{ openrc_creds.tenant_name }}">
      </div>
      <div class="form-group">
        <label for="openrc-project-id">{% trans "Project ID" %}</label>
        <input type="text" class="form-control" id="openrc-project-id" readonly value="{{ openrc_creds.tenant_id }}">
      </div>
      <div class="form-group">
        <label for="openrc-auth">{% trans "Authentication URL" %}</label>
        <input type="text" id="openrc-auth" class="form-control" readonly value="{{ openrc_creds.auth_url }}">
      </div>
    {% endif %}
  </form>
{% endblock %}

{% block modal-footer %}
  <a href="{% url 'horizon:project:api_access:index' %}" class="btn btn-default cancel">
    {% trans "Close" %}
  </a>
{% endblock %}
