clean up delete template, change rr_array -> rr_list. list multiple records for deletion a bit cleaner

This commit is contained in:
Jeffrey Forman 2012-11-23 22:22:59 -05:00
parent 8858d831b1
commit 9c5143cbd7
2 changed files with 21 additions and 16 deletions

View File

@ -10,9 +10,7 @@ Delete record(s) in {{ zone_name }}
<form action="/delete_record/result/" method="POST">{% csrf_token %}
<input type="hidden" name="dns_server" value="{{ dns_server }}">
<input type="hidden" name="zone_name" value="{{ zone_name }}">
<input type="hidden" name="rr_array" value="{{ rr_array }}">
<!-- <input type="hidden" name="delete_step" value="finalize"> -->
<input type="hidden" name="rr_list" value="{{ rr_list }}">
<tr>
<th colspan="2">Do you really want to delete the following records?</th>
</tr>
@ -26,19 +24,26 @@ Delete record(s) in {{ zone_name }}
</tr>
<tr>
<td>Records</td>
<td>{% for current_rr in rr_array %} {{ current_rr}} {% endfor %}</td>
<td>{% for current_rr in rr_list %}{{ current_rr }}<br> {% endfor %}</td>
</tr>
<tr>
<td>Key</td>
<td> <select name="key_name">
<td>
<select name="key_name">
<option selected="selected" value=""/>
{% for current_key in tsig_keys %}
<option value="{{current_key}}">{{current_key}}</option>
{% endfor %}</td>
</tr>
<option value="{{current_key.id}}">{{current_key}}</option>
{% endfor %}
</select>
</td>
</tr>
<tr>
<td colspan="2">
<input type="submit" value="Yes, I really want to delete them."/>
</td>
</tr>
</table>
<input type="submit" value="Yes, I really want to delete them."/>
</form>
{% endblock body %}

View File

@ -23,7 +23,7 @@ Zone listing for {{ zone_name }}
<input type="hidden" name="zone_name" value="{{ zone_name }}">
{% for current_record in zone_array %}
<tr>
<td><input type="checkbox" name="rr_array" value="{{ current_record.rr_name }}.{{ zone_name }}"></td>
<td><input type="checkbox" name="rr_list" value="{{ current_record.rr_name }}.{{ zone_name }}"></td>
<td>{{ current_record.rr_name }}</td>
<td>{{ current_record.rr_ttl }}</td>
<td>{{ current_record.rr_class }}</td>