From d46ffd1abc0becaa9467eafd015216a7a4f76a83 Mon Sep 17 00:00:00 2001 From: Daniel Roschka Date: Thu, 2 Apr 2015 08:32:27 +0200 Subject: [PATCH] Clean up of various parts of the templates * Replaced tabs for indentation with proper spaces to have only spaces for indentation * Added the btn-default class to all buttons where it was missing * Added relations between labels and the elements they are labeling using the naming schema Django uses by default (might become handy in the future) * Added additional meta tags required by Bootstrap 3 * Moved the button for adding records in list_zone.html out of the table to get cleaner markup * Swapped out the used version of Bootstrap against the minified one. * Removed the commented out old code from delete_record_initial.html, because that's why we have version control --- binder/templates/base.html | 6 +- .../bcommon/add_cname_record_form.html | 38 +++++------ binder/templates/bcommon/add_record_form.html | 66 +++++++++---------- .../bcommon/delete_record_initial.html | 51 ++------------ binder/templates/bcommon/list_zone.html | 22 +++---- 5 files changed, 69 insertions(+), 114 deletions(-) diff --git a/binder/templates/base.html b/binder/templates/base.html index 5e58c32..d96b30a 100644 --- a/binder/templates/base.html +++ b/binder/templates/base.html @@ -3,7 +3,9 @@ {% block header %} Binder DNS Admin - + + + {% endblock header %} @@ -27,7 +29,7 @@
- {% block pageheader %}{% endblock pageheader %} + {% block pageheader %}{% endblock pageheader %}
diff --git a/binder/templates/bcommon/add_cname_record_form.html b/binder/templates/bcommon/add_cname_record_form.html index e67c9a0..255fac9 100644 --- a/binder/templates/bcommon/add_cname_record_form.html +++ b/binder/templates/bcommon/add_cname_record_form.html @@ -6,56 +6,56 @@
{% csrf_token %} Create CNAME record
- +
- +
- +
- +
- +
- +
- +
{% if form_errors.cname %} - + {% endif %}
- -
.{{zone_name}}
+ +
.{{zone_name}}
- +
{% for ttl, description in ttl_choices %} - + {% endfor %}
- +
- {% for key in tsig_keys %} {% empty %} @@ -65,7 +65,7 @@
- +
{% endblock body %} diff --git a/binder/templates/bcommon/add_record_form.html b/binder/templates/bcommon/add_record_form.html index d9146be..cabc7cc 100644 --- a/binder/templates/bcommon/add_record_form.html +++ b/binder/templates/bcommon/add_record_form.html @@ -6,22 +6,22 @@
{% csrf_token %} Create Record
- +
- +
- +
- +
- +
{% if form_errors.record_name %} {% endif %}
- -
.{{zone_name}}
+ +
.{{zone_name}}
@@ -40,34 +40,34 @@
{% if "in-addr.arpa" not in zone_name and "ip6.arpa" not in zone_name %} {% for type, name in record_type_choices %} -
- +
- {% if form_errors.record_data %} - + {% endif %} +
+ + {% if "in-addr.arpa" not in zone_name and "ip6.arpa" not in zone_name %} +
IP Address
+ {% else %} +
FQDN
+ {% endif %} +
@@ -75,28 +75,28 @@
{% for ttl, description in ttl_choices %} - + {% endfor %}
{% if "in-addr.arpa" not in zone_name and "ip.arpa" not in zone_name %}
- +
+ Yes +
{% endif %}
- +
- {% for key in tsig_keys %} {% empty %} @@ -106,7 +106,7 @@
- + Cancel {% endblock body %} diff --git a/binder/templates/bcommon/delete_record_initial.html b/binder/templates/bcommon/delete_record_initial.html index bcf7c71..76a0ca5 100644 --- a/binder/templates/bcommon/delete_record_initial.html +++ b/binder/templates/bcommon/delete_record_initial.html @@ -22,72 +22,29 @@ - TSIG Key +
- {% for key in tsig_keys %} {% empty %}
- + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/binder/templates/bcommon/list_zone.html b/binder/templates/bcommon/list_zone.html index 81e4785..503633f 100644 --- a/binder/templates/bcommon/list_zone.html +++ b/binder/templates/bcommon/list_zone.html @@ -4,10 +4,14 @@ {% block body %} {% if not errors %} -
{% csrf_token %} - -Add Record +Add Record +{% csrf_token %} + + + + +
@@ -18,17 +22,9 @@ - - {% for current_record in zone_array %} - + @@ -37,7 +33,7 @@
Select Name
-
- -
-
{{ current_record.rr_name }} {{ current_record.rr_ttl }} {{ current_record.rr_class }}
- +