Merge branch 'template-cleanup' of https://github.com/Dunedan/binder into Dunedan-template-cleanup

resolve some conflicts with templates

Conflicts:
	binder/templates/bcommon/add_cname_record_form.html
	binder/templates/bcommon/delete_record_initial.html
This commit is contained in:
jeffrey forman 2015-05-27 20:03:33 -04:00
commit 5effaf8c45
5 changed files with 68 additions and 71 deletions

View File

@ -3,7 +3,9 @@
{% block header %}
<head>
<title>Binder DNS Admin</title>
<link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}bootstrap/css/bootstrap.css" />
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}bootstrap/css/bootstrap.min.css" />
<script src="{{ STATIC_URL }}sorttable.js"></script>
</head>
{% endblock header %}

View File

@ -6,28 +6,28 @@
<form class="form-horizontal" action="/add_cname_record/result/" method="post">{% csrf_token %}
<legend>Create CNAME record</legend>
<div class="form-group">
<label class="control-label col-md-2">DNS Server</label>
<label for="id_dns_server" class="control-label col-md-2">DNS Server</label>
<div class="controls col-md-10">
<input type="text" class="form-control" name="dns_server" value="{{dns_server.hostname}}" readonly />
<input type="text" id="id_dns_server" class="form-control" name="dns_server" value="{{dns_server.hostname}}" readonly />
</div>
</div>
<div class="form-group">
<label class="control-label col-md-2">Zone</label>
<label for="id_zone_name" class="control-label col-md-2">Zone</label>
<div class="controls col-md-10">
<input type="text" class="form-control" name="zone_name" value="{{zone_name}}" readonly />
<input type="text" id="id_zone_name" class="form-control" name="zone_name" value="{{zone_name}}" readonly />
</div>
</div>
<div class="form-group">
<label class="control-label col-md-2">Originating Record</label>
<label for="id_originating_record" class="control-label col-md-2">Originating Record</label>
<div class="controls col-md-10">
<input type="text" class="form-control" name="originating_record" value="{{originating_record}}" readonly />
<input type="text" id="id_originating_record" class="form-control" name="originating_record" value="{{originating_record}}" readonly />
</div>
</div>
<div class="form-group">
<label class="control-label col-md-2">CNAME</label>
<label for="id_cname" class="control-label col-md-2">CNAME</label>
<div class="controls col-md-10">
{% if form_errors.cname %}
<div class="alert alert-danger" role="alert">
@ -35,7 +35,7 @@
</div>
{% endif %}
<div class="input-group">
<input type="text" class="form-control" name="cname"/>
<input type="text" id="id_originating_record" class="form-control" name="cname"/>
<div class="input-group-addon">.{{zone_name}}</div>
</div>
</div>
@ -45,17 +45,17 @@
<label class="control-label col-md-2">TTL</label>
<div class="controls col-md-10">
{% for ttl, description in ttl_choices %}
<label class="radio-inline">
<input type="radio" name="ttl" id="ttl_{{ttl}}" value="{{ttl}}">{{ttl}} ({{description}})
<label for="id_ttl_{{ttl}}" class="radio-inline">
<input type="radio" id="id_ttl_{{ ttl }}" name="ttl" value="{{ttl}}">{{ttl}} ({{description}})
</label>
{% endfor %}
</div>
</div>
<div class="form-group">
<label class="control-label col-md-2">TSIG Key</label>
<label for="id_key_name" class="control-label col-md-2">TSIG Key</label>
<div class="controls col-md-10">
<select class="form-control" name="key_name">
<select id="id_key_name" class="form-control" name="key_name">
{% for key in tsig_keys %}
<option value="{{key.id}}"{% if key == dns_server.default_transfer_key %} selected="selected"{% endif %}>{{key}}</option>
{% empty %}
@ -64,8 +64,7 @@
</select>
</div>
</div>
<button type="submit" class="btn">Save Changes</button>
<button type="submit" class="btn btn-default">Save Changes</button>
<a href="{% url "zone_list" dns_server=dns_server zone_name=zone_name %}" class="btn btn-warning">Cancel</a>
</form>

View File

@ -6,22 +6,22 @@
<form class="form-horizontal" action="/add_record/result/" method="POST">{% csrf_token %}
<legend>Create Record</legend>
<div class="form-group">
<label class="control-label col-md-2">DNS Server</label>
<label for="id_dns_server" class="control-label col-md-2">DNS Server</label>
<div class="controls col-md-10">
<input type="text" class="form-control" name="dns_server" value="{{dns_server.hostname}}" readonly />
<input type="text" id="id_dns_server" class="form-control" name="dns_server" value="{{dns_server.hostname}}" readonly />
</div>
</div>
<div class="form-group">
<label class="control-label col-md-2">Zone</label>
<label for="id_zone_name" class="control-label col-md-2">Zone</label>
<div class="controls col-md-10">
<input type="text" class="form-control" name="zone_name" value="{{zone_name}}" readonly>
<input type="text" id="id_zone_name" class="form-control" name="zone_name" value="{{zone_name}}" readonly>
</div>
</div>
<div class="form-group">
<label class="control-label col-md-2">Record Name</label>
<label for="id_record_name" class="control-label col-md-2">Record Name</label>
<div class="controls col-md-10">
{% if form_errors.record_name %}
<div class="alert alert-danger" role="alert">
@ -29,7 +29,7 @@
</div>
{% endif %}
<div class="input-group">
<input type="text" class="form-control" name="record_name"/>
<input type="text" id="id_record_name" class="form-control" name="record_name"/>
<div class="input-group-addon">.{{zone_name}}</div>
</div>
</div>
@ -40,20 +40,20 @@
<div class="controls col-md-10">
{% if "in-addr.arpa" not in zone_name and "ip6.arpa" not in zone_name %}
{% for type, name in record_type_choices %}
<label class="radio-inline">
<input type="radio" name="record_type" id="record_type_{{name}}" value="{{name}}">{{name}}
<label for="id_record_type_{{ name }}" class="radio-inline">
<input type="radio" id="id_record_type_{{ name }}" name="record_type" value="{{name}}">{{name}}
</label>
{% endfor %}
{% else %}
<label class="radio-inline">
<input type="radio" name="record_type" id="record_type_PTR" value="PTR" checked="checked">PTR
<label for="id_record_type" class="radio-inline">
<input type="radio" id="id_record_type" name="record_type" id="record_type_PTR" value="PTR" checked="checked">PTR
</label>
{% endif %}
</div>
</div>
<div class="form-group">
<label class="control-label col-md-2">Record Data</label>
<label for="id_record_data" class="control-label col-md-2">Record Data</label>
<div class="controls col-md-10">
{% if form_errors.record_data %}
<div class="alert alert-danger" role="alert">
@ -61,7 +61,7 @@
</div>
{% endif %}
<div class="input-group">
<input type="text" class="form-control" name="record_data"/>
<input type="text" id="id_record_data" class="form-control" name="record_data"/>
{% if "in-addr.arpa" not in zone_name and "ip6.arpa" not in zone_name %}
<div class="input-group-addon">IP Address</div>
{% else %}
@ -75,8 +75,8 @@
<label class="control-label col-md-2">TTL</label>
<div class="controls col-md-10">
{% for ttl, description in ttl_choices %}
<label class="radio-inline">
<input type="radio" name="ttl" id="ttl_{{ttl}}" value="{{ttl}}">{{ttl}} ({{description}})
<label for="id_ttl_{{ ttl }}" class="radio-inline">
<input type="radio" id="id_ttl_{{ ttl }}" name="ttl" value="{{ttl}}">{{ttl}} ({{description}})
</label>
{% endfor %}
</div>
@ -84,19 +84,19 @@
{% if "in-addr.arpa" not in zone_name and "ip.arpa" not in zone_name %}
<div class="form-group">
<label class="control-label col-md-2">Create PTR?</label>
<label for="id_create_reverse" class="control-label col-md-2">Create PTR?</label>
<div class="checkbox controls col-md-10">
<label>
<input type="checkbox" name="create_reverse" id="create_reverse" value="True" aria-label="create ptr record?">Yes
</label>
<input type="checkbox" id="id_create_reverse" name="create_reverse" id="create_reverse" value="True" aria-label="create ptr record?">Yes
<label>
</div>
</div>
{% endif %}
<div class="form-group">
<label class="control-label col-md-2">TSIG Key</label>
<label for="id_key_name" class="control-label col-md-2">TSIG Key</label>
<div class="controls col-md-10">
<select class="form-control" name="key_name">
<select id="id_key_name" class="form-control" name="key_name">
{% for key in tsig_keys %}
<option value="{{key.id}}"{% if key == dns_server.default_transfer_key %} selected="selected"{% endif %}>{{key}}</option>
{% empty %}
@ -106,7 +106,7 @@
</div>
</div>
<button type="submit" class="btn">Save Changes</button>
<button type="submit" class="btn btn-default">Save Changes</button>
<a href="{% url "zone_list" dns_server=dns_server zone_name=zone_name %}" class="btn btn-warning">Cancel</a>
</form>
{% endblock body %}

View File

@ -22,11 +22,11 @@
</td>
</tr>
<tr>
<td>TSIG Key</td>
<td><label for="id_key_name">TSIG Key</label></td>
<td>
<div class="form-group">
<div class="controls">
<select class="form-control" name="key_name">
<select id="id_key_name" class="form-control" name="key_name">
{% for key in tsig_keys %}
<option value="{{key.id}}"{% if key == dns_server.default_transfer_key %} selected="selected"{% endif %}>{{key}}</option>
{% empty %}
@ -39,7 +39,7 @@
</tr>
<tr>
<td>
<button type="submit" class="btn">Yes, really delete.</button>
<button type="submit" class="btn btn-default">Yes, really delete.</button>
<a href="{% url "zone_list" dns_server=dns_server zone_name=zone_name %}" class="btn btn-warning">Cancel</a>
</td>
<td></td>

View File

@ -4,10 +4,14 @@
{% block body %}
{% if not errors %}
<form action="{% url "delete_record" %}" method="post">{% csrf_token %}
<table class="table table-condensed table-hover sortable">
<a href="{% url "add_record" dns_server=dns_server zone_name=zone_name %}" class="btn btn-default">Add Record</a></button>
<a href="{% url "add_record" dns_server=dns_server zone_name=zone_name %}" class="btn btn-default">Add Record</a>
<form action="{% url "delete_record" %}" method="post">{% csrf_token %}
<input type="hidden" name="dns_server" value="{{ dns_server.hostname }}">
<input type="hidden" name="zone_name" value="{{ zone_name }}">
<table class="table table-condensed table-hover sortable">
<tr>
<th>Select</th>
<th>Name</th>
@ -18,17 +22,9 @@
<th></th>
</tr>
<input type="hidden" name="dns_server" value="{{ dns_server.hostname }}">
<input type="hidden" name="zone_name" value="{{ zone_name }}">
{% for current_record in zone_array %}
<tr>
<td>
<div class="checkbox">
<label>
<input type="checkbox" id="rr_{{current_record.rr_name}}" name="rr_list" value="{{ current_record.rr_name }}.{{ zone_name }}"/>
</label>
</div>
</td>
<td><input type="checkbox" id="rr_{{current_record.rr_name}}" 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>
@ -37,7 +33,7 @@
<td>
<div class="btn-toolbar" style="margin: 0;">
<div class="btn-group">
<button class="btn dropdown-toggle" data-toggle="dropdown">Record Actions <span class="caret"></span></button>
<button class="btn btn-default dropdown-toggle" data-toggle="dropdown">Record Actions <span class="caret"></span></button>
<ul class="dropdown-menu">
<li><a href="#">Edit Record (Coming Soon)</a></li>
{% if current_record.rr_type == "A" %}