Commits

George Notaras committed 89d20e6

Updated zone import templates. Added template for imports using AXFR queries.

  • Participants
  • Parent commits ff72cdf

Comments (0)

Files changed (2)

File src/powerdns_manager/templates/powerdns_manager/import/axfr.html

+{% extends "admin/base_site.html" %}
+{% load i18n static %}
+{% load url from future %}
+
+{% block extrastyle %}{{ block.super }}<link rel="stylesheet" type="text/css" href="{% static "admin/css/forms.css" %}" />{% endblock %}
+
+{% block title %}{% trans "Import zone using AXFR query" %}{% endblock %}
+
+{% block breadcrumbs %}
+    <div class="breadcrumbs">
+        <a href="{% url 'admin:index' %}">{% trans 'Home' %}</a>
+        &rsaquo; {% trans 'Import zone using AXFR query' %}
+    </div>
+{% endblock %}
+
+{% block content %}
+    <div id="content-main">
+        
+        <form action="" method="post">{% csrf_token %}
+        <div>
+            {% if form.errors %}
+                <p class="errornote">
+                {% blocktrans count counter=form.errors.items|length %}Please correct the error below.{% plural %}Please correct the errors below.{% endblocktrans %}
+                </p>
+            {% endif %}
+
+            <h1>{% trans 'Import zone using AXFR query' %}</h1>
+            <p>{% trans "This web form facilitates importing zone data using AXFR queries." %}</p>
+            <p>{% trans "By checking ``overwrite``, if a zone with the same origin exists in your database will be deleted and replaced by the imported one. Proceed with caution." %}</p>
+            
+            <fieldset class="module aligned wide">
+    
+                <div class="form-row">
+                    {{ form.origin.errors }}
+                    <label for="id_origin" class="required">{% trans 'Origin' %}:</label>{{ form.origin }}
+                </div>
+    
+                <div class="form-row">
+                    {{ form.nameserver.errors }}
+                    <label for="id_nameserver" class="required">{% trans 'Nameserver IP' %}:</label>{{ form.nameserver }}
+                </div>
+    
+                <div class="form-row">
+                    {{ form.overwrite.errors }}
+                    <label for="id_overwrite" class="">{% trans 'Overwrite' %}:</label>{{ form.overwrite }}
+                </div>
+    
+            </fieldset>
+
+            <div class="submit-row">
+                <input type="submit" value="{% trans 'Import zone' %}" class="default" />
+            </div>
+
+            <script type="text/javascript">document.getElementById("id_origin").focus();</script>
+        </div>
+        </form>
+
+    </div> <!-- content-main -->
+{% endblock %}

File src/powerdns_manager/templates/powerdns_manager/import/success.html

 
 {% block content %}
 	<h1>{% trans 'Zone import successful' %}</h1>
-	<p>{% trans 'The zone file has been imported successfully. Import ' %}<a href="{% url 'import_zone' %}">{% trans 'another zone' %}</a>.</p>
+	<p>{% trans 'The zone file has been imported successfully. Import ' %}
+	{% if is_axfr %}
+	    <a href="{% url 'import_axfr' %}">{% trans 'another zone' %}</a>
+	{% else %}
+	    <a href="{% url 'import_zone' %}">{% trans 'another zone' %}</a>
+	{% endif %}
+	.</p>
 {% endblock %}