Completed first-found updates for the zone record settings view.

This commit is contained in:
Matt Scott 2023-02-20 10:14:09 -05:00
parent a5d69e3e40
commit 09127fb326

View File

@ -1,101 +1,109 @@
{% extends "base.html" %} {% extends "base.html" %}
{% set active_page = "admin_settings" %} {% set active_page = "admin_settings" %}
{% block title %}<title>Zone Record Settings - {{ SITE_NAME }}</title>{% endblock %}
{% block title %}
<title>
DNS Records Settings - {{ SITE_NAME }}
</title>
{% endblock %}
{% block dashboard_stat %} {% block dashboard_stat %}
<div class="content-header"> <div class="content-header">
<div class="container-fluid"> <div class="container-fluid">
<div class="row mb-2"> <div class="row mb-2">
<div class="col-sm-6"> <div class="col-sm-6">
<h1 class="m-0 text-dark"> <h1 class="m-0 text-dark">Zone Record Settings</h1>
Settings </div>
<small>Records</small> <div class="col-sm-6">
</h1> <ol class="breadcrumb float-sm-right">
<li class="breadcrumb-item"><a href="{{ url_for('dashboard.dashboard') }}">Dashboard</a></li>
<li class="breadcrumb-item active">Zone Record Settings</li>
</ol>
</div>
</div>
</div> </div>
<div class="col-sm-6">
<ol class="breadcrumb float-sm-right">
<li class="breadcrumb-item"><a href="{{ url_for('dashboard.dashboard') }}">Dashboard</a></li>
<li class="breadcrumb-item active">Settings - Records </li>
</ol>
</div>
</div>
</div> </div>
</div>
{% endblock %} {% endblock %}
{% block content %} {% block content %}
<section class="content"> <section class="content">
<div class="container-fluid"> <div class="container-fluid">
<div class="row"> <div class="row">
<div class="col-5"> <div class="col-12 col-sm-6 col-lg-4">
<div class="card"> <form role="form" method="post">
<div class="card-header"> <input type="hidden" name="_csrf_token" value="{{ csrf_token() }}">
<h3 class="card-title">DNS record Settings</h3> <input type="hidden" name="create" value="{{ create }}">
</div> <div class="card card-outline card-primary shadow">
<form role="form" method="post"> <div class="card-header">
<input type="hidden" name="_csrf_token" value="{{ csrf_token() }}"> <h3 class="card-title">Settings Editor</h3>
<input type="hidden" name="create" value="{{ create }}"> </div>
<div class="card-body"> <!-- /.card-header -->
<table class="table table-bordered"> <div class="card-body">
<tr> <table class="table table-bordered">
<th style="width: 10px">#</th> <tr>
<th style="width: 40px">Record</th> <th>#</th>
<th>Forward Zone</th> <th>Record</th>
<th>Reverse Zone</th> <th>Forward Zone</th>
</tr> <th>Reverse Zone</th>
{% for record in f_records %} </tr>
<tr> {% for record in f_records %}
<td>{{ loop.index }}</td> <tr>
<td>{{ record }}</td> <td>{{ loop.index }}</td>
<td> <td>{{ record }}</td>
<input type="checkbox" id="fr_{{ record|lower }}" name="fr_{{ record|lower }}" <td>
class="checkbox" {% if f_records[record] %}checked{% endif %}> <input type="checkbox" id="fr_{{ record|lower }}"
</td> name="fr_{{ record|lower }}"
<td> class="checkbox" {% if f_records[record] %}checked{% endif %}>
<input type="checkbox" id="rr_{{ record|lower }}" name="rr_{{ record|lower }}" </td>
class="checkbox" {% if r_records[record] %}checked{% endif %}> <td>
</td> <input type="checkbox" id="rr_{{ record|lower }}"
</tr> name="rr_{{ record|lower }}"
{% endfor %} class="checkbox" {% if r_records[record] %}checked{% endif %}>
</table> </td>
</tr>
{% endfor %}
</table>
</div>
<!-- /.card-body -->
<div class="card-footer">
<button type="submit" class="btn btn-primary float-right" title="Save Settings">
<i class="fa-solid fa-save"></i>&nbsp;Save Settings
</button>
</div>
<!-- /.card-footer -->
</div>
<!-- /.card -->
</form>
</div>
<!-- /.col -->
<div class="col-12 col-sm-6 col-lg-8">
<div class="card card-outline card-secondary shadow">
<div class="card-header">
<h3 class="card-title">Settings Editor Help</h3>
</div>
<!-- /.card-header -->
<div class="card-body">
<p>Select record types you allow user to edit in the forward zone and reverse zone. Take a
look at
<a href="https://doc.powerdns.com/authoritative/appendices/types.html" target="_blank">PowerDNS
docs</a>
for
full list of supported record types.
</p>
</div>
<!-- /.card-body -->
</div>
<!-- /.card -->
</div>
<!-- /.col -->
</div> </div>
<div class="card-footer"> <!-- /.row -->
<button type="submit" class="btn btn-primary float-right">
<i class="fa-solid fa-save"></i>&nbsp;Save
</button>
</div>
</form>
</div> </div>
</div> <!-- /.container-fluid -->
<div class="col-7"> </section>
<div class="card">
<div class="card-header">
<h3 class="card-title">Help</h3>
</div>
<div class="card-body">
<p>Select record types you allow user to edit in the forward zone and reverse zone. Take a look at
<a href="https://doc.powerdns.com/authoritative/appendices/types.html">PowerDNS docs</a> for
full list of supported record types.
</p>
</div>
</div>
</div>
</div>
</div>
</section>
{% endblock %} {% endblock %}
{% block extrascripts %} {% block extrascripts %}
<script> <script>
$('.checkbox').iCheck({ $('.checkbox').iCheck({
checkboxClass: 'icheckbox_square-blue', checkboxClass: 'icheckbox_square-blue',
increaseArea: '20%' increaseArea: '20%'
}) })
</script> </script>
{% endblock %} {% endblock %}