diff --git a/binder/templates/base.html b/binder/templates/base.html index 963e1d1..d9a6ef6 100644 --- a/binder/templates/base.html +++ b/binder/templates/base.html @@ -15,43 +15,49 @@ -
+
-
- {% block navigation %} - - {% endblock navigation %} -
- -
-
-
- {% block pageheader %}{% endblock pageheader %} -
-
- - {% block errors %} - {% if errors %} -
- Errors were encountered: -
- {{ errors }} +
+ +
+
+

{% block pageheader %}{% endblock pageheader %}

+
+
+
+
+
+ {% block errors %} + {% if errors %} +
+ Errors were encountered: +
+ {{ errors }} +
+ {% endif %} + {% endblock errors %} + + {% block body %} + {% endblock body %} +
+
diff --git a/binder/templates/bcommon/add_cname_record_form.html b/binder/templates/bcommon/add_cname_record_form.html index 8991ba2..2edbeef 100644 --- a/binder/templates/bcommon/add_cname_record_form.html +++ b/binder/templates/bcommon/add_cname_record_form.html @@ -5,57 +5,81 @@ {% block body %}
{% csrf_token %} Create CNAME record -
- -
- -
-
-
- -
- +
+ +
+
-
- -
- -
- -
-
- -
- -
- {% if form_errors.cname %} - + +
+ +
+ +
+ {% if form_errors.originating_record %} +
+
+ {{ form_errors.originating_record|stringformat:"s"|striptags }} + {% if form_data.originating_record %} Previous Value: {{ form_data.originating_record }}{% endif %} +
+
+ {% endif %} +
+ +
+ +
- -
.{{zone_name}}
+ + .{{zone_name}} +
-
- -
- -
- {% for ttl, description in ttl_choices %} - - {% endfor %} + {% if form_errors.cname %} +
+
+ CNAME: {{ form_errors.cname|stringformat:"s"|striptags }} + {% if form_data.cnamr %} Previous Value: {{ form_data.cname }}{% endif %} +
+ {% endif %}
-
- -
- + {% for ttl, description in ttl_choices %} + + {% endfor %} + +
+ {% if form_errors.ttl %} +
+
+ {{ form_errors.ttl|stringformat:"s"|striptags }} + {% if form_data.ttl %} Previous Value: {{ form_data.ttl }}{% endif %} +
+
+ {% endif %} +
+ +
+ +
+
+ {% if form_errors.key_name %} +
+
+ {{ form_errors.key_name|stringformat:"s"|striptags }} + {% if form_data.key_name %} Previous Value: {{ form_data.key_name }}{% endif %} +
+
+ {% endif %}
- - Cancel - +
+
+
+ + Cancel +
+
+ {% endblock body %} diff --git a/binder/templates/bcommon/add_record_form.html b/binder/templates/bcommon/add_record_form.html index 4f46a05..cb384a2 100644 --- a/binder/templates/bcommon/add_record_form.html +++ b/binder/templates/bcommon/add_record_form.html @@ -5,98 +5,113 @@ {% block body %}
{% csrf_token %} Create Record -
- -
- + +
+ +
+
-
- -
- -
- -
-
- - -
- -
- {% if form_errors.record_name %} - + +
+ +
- -
.{{zone_name}}
+ + .{{zone_name}} +
+ {% if form_errors.record_name %} +
+
+ {{ form_errors.record_name|stringformat:"s"|striptags }} + {% if form_data.record_name %} Previous Value: {{ form_data.record_name }}{% endif %} +
+
+ {% endif %}
-
- -
+
+ +
+ {{name}} - - {% endfor %} + {% for type, name in record_type_choices %} + + {% endfor %} {% else %} - + {% endif %} +
+ {% if form_errors.record_type %} +
+
+ {{ form_errors.record_type|stringformat:"s"|striptags }} + {% if form_data.record_type %} Previous Value: {{ form_data.record_type }}{% endif %} +
+
+ {% endif %}
-
- -
- {% 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 %} +
+ +
+ +
+ {% if form_errors.record_data %} +
+
+ {{ form_errors.record_data|stringformat:"s"|striptags }} + {% if form_data.record_data %} Previous Value: {{ form_data.record_data }}{% endif %}
+ {% endif %}
- -
- -
- {% for ttl, description in ttl_choices %} - - {% endfor %} + +
+ +
+
+ {% if form_errors.ttl %} +
+
+ {{ form_errors.ttl|stringformat:"s"|striptags }} + {% if form_data.ttl %} Previous Value: {{ form_data.ttl }}{% endif %} +
+
+ {% endif %}
{% if "in-addr.arpa" not in zone_name and "ip.arpa" not in zone_name %}
- -
-
{% endif %} -
- -
- {% for key in tsig_keys %} {% empty %} @@ -104,9 +119,22 @@ {% endfor %}
+ {% if form_errors.key_name %} +
+
+ {{ form_errors.key_name|stringformat:"s"|striptags }} + {% if form_data.key_name %} Previous Value: {{ form_data.key_name }}{% endif %} +
+
+ {% endif %}
- - Cancel +
+
+
+ + Cancel +
+
{% endblock body %} diff --git a/binder/templates/bcommon/delete_record_initial.html b/binder/templates/bcommon/delete_record_initial.html index df78019..3d252d1 100644 --- a/binder/templates/bcommon/delete_record_initial.html +++ b/binder/templates/bcommon/delete_record_initial.html @@ -3,51 +3,65 @@ {% block pageheader %}Delete record(s) in {{ zone_name }}{% endblock pageheader %} {% block body %} -
- {% csrf_token %} - - - - - - - - - - - - - - - - - - - - - -
DNS Server{{dns_server.hostname}}
Zone{{zone_name}}
Records{% for current_rr in rr_list %} - {{ current_rr }}
- {% endfor %} -
-
-
- +
+

{{ dns_server.hostname }}

+
+
+ +
+ + +
+

{{ zone_name }}

+
+
+ +
+ + +
+

{% for current_rr in rr_list %}{{ current_rr }}
{% endfor %}

+
+
+ +
+ +
+ + {% endfor %} + +
+ {% if form_errors.key_name %} +
+
+ {{ form_errors.key_name|stringformat:"s"|striptags }} + {% if form_data.key_name %} Previous Value: {{ form_data.key_name }}{% endif %}
-
- - Cancel -
+ {% endif %} +
- - - +
+
+
+ + Cancel +
+
{% endblock body %} diff --git a/binder/templates/bcommon/list_zone.html b/binder/templates/bcommon/list_zone.html index 503633f..9c77109 100644 --- a/binder/templates/bcommon/list_zone.html +++ b/binder/templates/bcommon/list_zone.html @@ -11,7 +11,7 @@ - +
@@ -19,12 +19,11 @@ - + - {% for current_record in zone_array %} - + @@ -33,7 +32,9 @@ {% endfor %} -
Select NameClass Type DataActions
{{ current_record.rr_name }} {{ current_record.rr_ttl }} {{ current_record.rr_class }}
- +
diff --git a/binder/templates/index.html b/binder/templates/index.html index e97b10a..87b781b 100644 --- a/binder/templates/index.html +++ b/binder/templates/index.html @@ -1,6 +1,6 @@ {% extends "base.html" %} -{% block pageheader %}{% endblock pageheader %} +{% block pageheader %}Home{% endblock pageheader %} {% block body %} diff --git a/binder/tests/testViews.py b/binder/tests/testViews.py index 5707666..8eb3b95 100644 --- a/binder/tests/testViews.py +++ b/binder/tests/testViews.py @@ -70,13 +70,13 @@ class PostTests(TestCase): "rr_list": []}) self.assertContains(response, - '', + '', html=True) self.assertContains(response, - '', + '', html=True) self.assertContains(response, - '', + '', html=True) @@ -87,10 +87,10 @@ class PostTests(TestCase): "rr_list": ["testrecord1.testzone1.test.net", "testrecord2.testzone1.test.net"]}) self.assertContains(response, - '', html=True) + '', html=True) self.assertContains(response, - '', + '', html=True) self.assertContains(response, - '', + '', html=True)