summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Cresswell <robert.cresswell@outlook.com>2017-01-26 08:33:42 +0000
committerRob Cresswell <robert.cresswell@outlook.com>2017-01-31 08:51:29 +0000
commit1064803a6ef5a7f3059bbed86424a40f05b3a11e (patch)
treeed3c58bcb72ec9a80624b1bfb01206e126a32fad
parentaa444a60b112604984b17b0601378e81f8619a7c (diff)
downloadhorizon-1064803a6ef5a7f3059bbed86424a40f05b3a11e.tar.gz
Improve API Access Credentials template
- Match labels to inputs correctly - Remove some redundant classes - Fix indentation/make template readable Change-Id: Ia98602fe3f602b315e4c16102bb593ae77f9be7b Closes-Bug: 1659499
-rw-r--r--openstack_dashboard/dashboards/project/api_access/templates/api_access/_credentials.html110
1 files changed, 52 insertions, 58 deletions
diff --git a/openstack_dashboard/dashboards/project/api_access/templates/api_access/_credentials.html b/openstack_dashboard/dashboards/project/api_access/templates/api_access/_credentials.html
index 56aa49390..3c6381e18 100644
--- a/openstack_dashboard/dashboards/project/api_access/templates/api_access/_credentials.html
+++ b/openstack_dashboard/dashboards/project/api_access/templates/api_access/_credentials.html
@@ -1,69 +1,63 @@
{% extends "horizon/common/_modal.html" %}
{% load i18n %}
-{% block modal-header %}{% trans "User Credentials" %}{% endblock %}
-
{% block modal-body %}
-<div class="row-fluid view-credentials">
-<form>
- {% if openrc_creds %}
- <div class="left">
- <fieldset>
- <div class="form-group">
- <label class="control-label">{% trans "User Name" %}</label>
- <input type="text" class="form-control" readonly value="{{ openrc_creds.user }}">
- </div>
- {% if "user_domain_name" in openrc_creds %}
- <div class="form-group">
- <label class="control-label">{% trans "Domain Name" %}</label>
- <input type="text" class="form-control" readonly value="{{ openrc_creds.user_domain_name }}">
- </div>
+ <form>
+ {% if openrc_creds %}
+ <div class="left">
+ <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 }}">
+ </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>
+ </div>
{% endif %}
- <div class="form-group">
- <label class="control-label">{% trans "Project Name" %}</label>
- <input type="text" class="form-control" readonly value="{{ openrc_creds.tenant_name }}">
- </div>
- <div class="form-group">
- <label class="control-label">{% trans "Project ID" %}</label>
- <input type="text" class="form-control" readonly value="{{ openrc_creds.tenant_id }}">
- </div>
- <div class="form-group">
- <label class="control-label">{% trans "Authentication URL" %}</label>
- <input type="text" class="form-control" readonly value="{{ openrc_creds.auth_url }}">
- </div>
- </fieldset>
- </div>
- {% endif %}
- {% if ec2_creds %}
- <div class="right">
- <fieldset>
- <div class="form-group">
- <label class="control-label">{% trans "EC2 URL" %}</label><input type="text" class="form-control" readonly value="{{ ec2_creds.ec2_endpoint }}">
- </div>
- <div class="form-group">
- <label class="control-label">{% trans "S3 URL" %}</label><input type="text" class="form-control" readonly value="{{ ec2_creds.s3_endpoint }}">
- </div>
- {% if ec2_creds.ec2_access_key %}
- <div class="form-group">
- <label class="control-label">{% trans "EC2 Access Key" %}</label>
- <input type="text" class="form-control" readonly value="{{ ec2_creds.ec2_access_key }}">
- </div>
- {% endif %}
- {% if ec2_creds.ec2_secret_key %}
- <div class="form-group">
- <label class="control-label">{% trans "EC2 Secret Key" %}</label>
- <div>
- <input type="password" class="form-control" readonly value="{{ ec2_creds.ec2_secret_key }}">
+ {% if ec2_creds %}
+ <div class="right">
+ <div class="form-group">
+ <label for="ec2-url">{% trans "EC2 URL" %}</label>
+ <input type="text" id="ec2-url" class="form-control" readonly value="{{ ec2_creds.ec2_endpoint }}">
+ </div>
+ <div class="form-group">
+ <label for="s3-url">{% trans "S3 URL" %}</label>
+ <input type="text" id="s3-url" class="form-control" readonly value="{{ ec2_creds.s3_endpoint }}">
+ </div>
+ {% if ec2_creds.ec2_access_key %}
+ <div class="form-group">
+ <label for="ec2-access">{% trans "EC2 Access Key" %}</label>
+ <input type="text" id="ec2-access" class="form-control" readonly value="{{ ec2_creds.ec2_access_key }}">
+ </div>
+ {% endif %}
+ {% if ec2_creds.ec2_secret_key %}
+ <div class="form-group">
+ <label for="ec2-secret">{% trans "EC2 Secret Key" %}</label>
+ <input type="password" id="ec2-secret" class="form-control" readonly value="{{ ec2_creds.ec2_secret_key }}">
+ </div>
+ {% endif %}
</div>
- </div>
{% endif %}
- </fieldset>
- </div>
- {% endif %}
-</form>
-</div>
+ </form>
{% endblock %}
{% block modal-footer %}
- <a href="{% url 'horizon:project:api_access:index' %}" class="btn btn-default cancel">{% trans "Close" %}</a>
+ <a href="{% url 'horizon:project:api_access:index' %}" class="btn btn-default cancel">
+ {% trans "Close" %}
+ </a>
{% endblock %}