Final page edits for bootstrap v4 and Admin LTE v3.2

This commit is contained in:
Tyler Todd 2023-02-17 22:25:11 +00:00
parent e1bbe10fc3
commit 62d95e874a
28 changed files with 613 additions and 547 deletions

View File

@ -14,15 +14,15 @@
<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">
Account {% if create %}Add Account{% else %}Edit Account{% endif %}
<small>{% if create %}New account{% else %}{{ account.name }}{% endif %}</small> <small>{% if create %}Account{% else %}{{ account.name }}{% endif %}</small>
</h1> </h1>
</div> </div>
<div class="col-sm-6"> <div class="col-sm-6">
<ol class="breadcrumb float-sm-right"> <ol class="breadcrumb float-sm-right">
<li class="breadcrumb-item"><a href="{{ url_for('dashboard.dashboard') }}">Home</a></li> <li class="breadcrumb-item"><a href="{{ url_for('dashboard.dashboard') }}">Home</a></li>
<li class="breadcrumb-item"><a href="{{ url_for('admin.manage_account') }}">Accounts</a></li> <li class="breadcrumb-item"><a href="{{ url_for('admin.manage_account') }}">Accounts</a></li>
<li class="breadcrumb-item active">{% if create %}Add{% else %}Edit{% endif %} account</li> <li class="breadcrumb-item active">{% if create %}Add Account{% else %}Edit Account: {{ account.name }}{% endif %}</li>
</ol> </ol>
</div> </div>
</div> </div>
@ -35,9 +35,9 @@
<div class="container-fluid"> <div class="container-fluid">
<div class="row"> <div class="row">
<div class="col-4"> <div class="col-4">
<div class="card shadow"> <div class="card">
<div class="card-header with-border"> <div class="card-header">
<h3 class="card-title">{% if create %}Add{% else %}Edit{% endif %} account</h3> <h3 class="card-title">{% if create %}Add{% else %}Edit{% endif %} Account</h3>
</div> </div>
<form role="form" method="post" action="{% if create %}{{ url_for('admin.edit_account') }}{% else %}{{ url_for('admin.edit_account', account_name=account.name) }}{% endif %}"> <form role="form" method="post" action="{% if create %}{{ url_for('admin.edit_account') }}{% else %}{{ url_for('admin.edit_account', account_name=account.name) }}{% endif %}">
<input type="hidden" name="_csrf_token" value="{{ csrf_token() }}"> <input type="hidden" name="_csrf_token" value="{{ csrf_token() }}">
@ -46,7 +46,7 @@
{% if error %} {% if error %}
<div class="alert alert-danger alert-dismissible"> <div class="alert alert-danger alert-dismissible">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button> <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
<h4><i class="icon fa fa-ban"></i> Error!</h4> <h4><i class="fa-solid fa-ban"></i> Error!</h4>
{{ error }} {{ error }}
</div> </div>
<span class="help-block">{{ error }}</span> <span class="help-block">{{ error }}</span>
@ -55,36 +55,36 @@
<label class="control-label" for="accountname">Name</label> <label class="control-label" for="accountname">Name</label>
<input type="text" class="form-control" placeholder="Account Name (required)" <input type="text" class="form-control" placeholder="Account Name (required)"
name="accountname" {% if account %}value="{{ account.name }}" {% endif %} name="accountname" {% if account %}value="{{ account.name }}" {% endif %}
{% if not create %}disabled{% endif %}> {% if not create %}disabled{% endif %} required>
<span class="fa fa-cog form-control-feedback"></span> <span class="form-control-feedback"></span>
{% if invalid_accountname %} {% if invalid_accountname %}
<span class="help-block">Cannot be blank and must only contain alphanumeric <span class="help-block text-danger">Cannot be blank and must only contain alphanumeric
characters{% if SETTING.get('account_name_extra_chars') %}, dots, hyphens or underscores{% endif %}. characters{% if SETTING.get('account_name_extra_chars') %}, dots, hyphens or underscores{% endif %}.
</span> </span>
{% elif duplicate_accountname %} {% elif duplicate_accountname %}
<span class="help-block">Account name already in use.</span> <span class="help-block text-danger">Account name already in use.</span>
{% endif %} {% endif %}
</div> </div>
<div class="form-group has-feedback"> <div class="form-group has-feedback">
<label class="control-label" for="accountdescription">Description</label> <label class="control-label" for="accountdescription">Description</label>
<input type="text" class="form-control" placeholder="Account Description (optional)" <input type="text" class="form-control" placeholder="Account Description (optional)"
name="accountdescription" {% if account %}value="{{ account.description }}" {% endif %}> name="accountdescription" {% if account %}value="{{ account.description }}" {% endif %}>
<span class="fa fa-industry form-control-feedback"></span> <span class="orm-control-feedback"></span>
</div> </div>
<div class="form-group has-feedback"> <div class="form-group has-feedback">
<label class="control-label" for="accountcontact">Contact Person</label> <label class="control-label" for="accountcontact">Contact Person</label>
<input type="text" class="form-control" placeholder="Contact Person (optional)" <input type="text" class="form-control" placeholder="Contact Person (optional)"
name="accountcontact" {% if account %}value="{{ account.contact }}" {% endif %}> name="accountcontact" {% if account %}value="{{ account.contact }}" {% endif %}>
<span class="fa fa-user form-control-feedback"></span> <span class="form-control-feedback"></span>
</div> </div>
<div class="form-group has-feedback"> <div class="form-group has-feedback">
<label class="control-label" for="accountmail">Mail Address</label> <label class="control-label" for="accountmail">Mail Address</label>
<input type="email" class="form-control" placeholder="Mail Address (optional)" <input type="email" class="form-control" placeholder="Mail Address (optional)"
name="accountmail" {% if account %}value="{{ account.mail }}" {% endif %}> name="accountmail" {% if account %}value="{{ account.mail }}" {% endif %}>
<span class="fa fa-envelope form-control-feedback"></span> <span class="form-control-feedback"></span>
</div> </div>
</div> </div>
<div class="card-header with-border"> <div class="card-header">
<h3 class="card-title">Access Control</h3> <h3 class="card-title">Access Control</h3>
</div> </div>
<div class="card-body"> <div class="card-body">
@ -104,17 +104,19 @@
</div> </div>
</div> </div>
<div class="card-footer"> <div class="card-footer">
<button type="submit" <button type="button" class="btn btn-secondary float-left" onclick="window.location.href='{{ url_for('admin.manage_account') }}'">
class="btn btn-flat btn-primary">{% if create %}Create{% else %}Update{% endif %} Cancel
Account </button>
<button type="submit" class="btn btn-primary float-right">
{% if create %}Create{% else %}Update{% endif %} Account
</button> </button>
</div> </div>
</form> </form>
</div> </div>
</div> </div>
<div class="col-8"> <div class="col-8">
<div class="card shadow"> <div class="card">
<div class="card-header with-border"> <div class="card-header">
<h3 class="card-title">Help with creating a new account</h3> <h3 class="card-title">Help with creating a new account</h3>
</div> </div>
<div class="card-body"> <div class="card-body">

View File

@ -37,8 +37,8 @@
<div class="container-fluid"> <div class="container-fluid">
<div class="row"> <div class="row">
<div class="col-4"> <div class="col-4">
<div class="card card-primary"> <div class="card ">
<div class="card-header with-border"> <div class="card-header">
<h3 class="card-title">{% if create %}Add{% else %}Edit{% endif %} Key</h3> <h3 class="card-title">{% if create %}Add{% else %}Edit{% endif %} Key</h3>
</div> </div>
<form role="form" method="post" <form role="form" method="post"
@ -65,7 +65,7 @@
<span class="glyphicon glyphicon-pencil form-control-feedback"></span> <span class="glyphicon glyphicon-pencil form-control-feedback"></span>
</div> </div>
</div> </div>
<div class="card-header with-border key-opts"{% if hide_opts %} style="display: none;"{% endif %}> <div class="card-header key-opts"{% if hide_opts %} style="display: none;"{% endif %}>
<h3 class="card-title">Accounts Access Control</h3> <h3 class="card-title">Accounts Access Control</h3>
</div> </div>
<div class="card-body key-opts"{% if hide_opts %} style="display: none;"{% endif %}> <div class="card-body key-opts"{% if hide_opts %} style="display: none;"{% endif %}>
@ -80,7 +80,7 @@
</select> </select>
</div> </div>
</div> </div>
<div class="card-header with-border key-opts"{% if hide_opts %} style="display: none;"{% endif %}> <div class="card-header key-opts"{% if hide_opts %} style="display: none;"{% endif %}>
<h3 class="card-title">Domain Access Control</h3> <h3 class="card-title">Domain Access Control</h3>
</div> </div>
<div class="card-body key-opts"{% if hide_opts %} style="display: none;"{% endif %}> <div class="card-body key-opts"{% if hide_opts %} style="display: none;"{% endif %}>
@ -96,16 +96,19 @@
</div> </div>
</div> </div>
<div class="card-footer"> <div class="card-footer">
<button type="submit" <button type="button" class="btn btn-secondary float-left" onclick="window.location.href='{{ url_for('admin.manage_keys') }}'">
class="btn btn-flat btn-primary float-right" id="key_submit">{% if create %}Create{% else %}Update{% endif %} <i class="fa-solid fa-window-close"></i>&nbsp;Cancel
Key</button> </button>
<button type="submit" class="btn btn-primary float-right" id="key_submit">
<i class="fa-solid fa-save"></i>&nbsp;{% if create %}Create{% else %}Update{% endif %} Key
</button>
</div> </div>
</form> </form>
</div> </div>
</div> </div>
<div class="col-8"> <div class="col-8">
<div class="card card-primary"> <div class="card">
<div class="card-header with-border"> <div class="card-header">
<h3 class="card-title">Help with {% if create %}creating a new{% else%}updating a{% endif %} key <h3 class="card-title">Help with {% if create %}creating a new{% else%}updating a{% endif %} key
</h3> </h3>
</div> </div>
@ -239,7 +242,7 @@
{% if plain_key %} {% if plain_key %}
$(document.body).ready(function () { $(document.body).ready(function () {
var modal = $("#modal_show_key"); var modal = $("#modal_show_key");
var info = "{{ plain_key }}"; var info = "Please copy this key to a secure location. You will be unable to view it again once you close this window: {{ plain_key }}";
modal.find('.modal-body p').text(info); modal.find('.modal-body p').text(info);
modal.find('#button_key_confirm').click(redirect_modal); modal.find('#button_key_confirm').click(redirect_modal);
modal.find('#button_close_modal').click(redirect_modal); modal.find('#button_close_modal').click(redirect_modal);
@ -255,45 +258,46 @@
{% endblock %} {% endblock %}
{% block modals %} {% block modals %}
<div class="modal fade" id="modal_show_key"> <div class="modal fade" id="modal_show_key">
<div class="modal-dialog"> <div class="modal-dialog">
<div class="modal-content modal-sm"> <div class="modal-content">
<div class="modal-header"> <div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close" id="button_close_modal"> <h5 class="modal-title">New API Key</h5>
<span aria-hidden="true">&times;</span> <button type="button" class="close" data-dismiss="modal" aria-label="Close" id="button_close_modal">
</button> <span aria-hidden="true">&times;</span>
<h4 class="modal-title">Your API key</h4> </button>
</div> </div>
<div class="modal-body"> <div class="modal-body">
<p></p> <p></p>
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<button type="button" class="btn btn-flat btn-primary center-block" id="button_key_confirm"> <button type="button" class="btn btn-primary" id="button_key_confirm">
Confirm</button> Confirm
</div> </button>
</div> </div>
<!-- /.modal-content -->
</div> </div>
<!-- /.modal-dialog --> </div>
</div> </div>
<div class="modal fade" id="modal_warning"> <div class="modal fade" id="modal_warning">
<div class="modal-dialog"> <div class="modal-dialog">
<div class="modal-content modal-sm"> <div class="modal-content">
<div class="modal-header"> <div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close" id="button_close_warn_modal"> <h5 class="modal-title">WARNING</h5>
<span aria-hidden="true">&times;</span> <button type="button" class="close" data-dismiss="modal" aria-label="Close" id="button_close_warn_modal">
</button> <span aria-hidden="true">&times;</span>
<h4 class="modal-title">WARNING</h4> </button>
</div>
<div class="modal-body">
<p></p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-flat btn-primary center-block" id="button_key_confirm_warn">
OK</button>
</div>
</div> </div>
<!-- /.modal-content --> <div class="modal-body">
<p></p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary close" data-dismiss="modal" id="button_close_modal">
Close
</button>
<button type="button" class="btn btn-primary" id="button_key_confirm_warn">
OK
</button>
</div>
</div>
</div> </div>
<!-- /.modal-dialog -->
</div> </div>
{% endblock %} {% endblock %}

View File

@ -47,7 +47,7 @@
{% if error %} {% if error %}
<div class="alert alert-danger alert-dismissible"> <div class="alert alert-danger alert-dismissible">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button> <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
<h4><i class="icon fa fa-ban"></i> Error!</h4> <h4><i class="fa-solid fa-ban"></i> Error!</h4>
{{ error }} {{ error }}
</div> </div>
<span class="help-block">{{ error }}</span> <span class="help-block">{{ error }}</span>
@ -56,19 +56,19 @@
<label class="control-label" for="firstname">First Name</label> <label class="control-label" for="firstname">First Name</label>
<input type="text" class="form-control" placeholder="First Name" name="firstname" <input type="text" class="form-control" placeholder="First Name" name="firstname"
{% if user %}value="{{ user.firstname }}" {% endif %}> {% if user %}value="{{ user.firstname }}" {% endif %}>
<span class="glyphicon glyphicon-user form-control-feedback"></span> <span class="form-control-feedback"></span>
</div> </div>
<div class="form-group has-feedback"> <div class="form-group has-feedback">
<label class="control-label" for="lastname">Last Name</label> <label class="control-label" for="lastname">Last Name</label>
<input type="text" class="form-control" placeholder="Last name" name="lastname" <input type="text" class="form-control" placeholder="Last name" name="lastname"
{% if user %}value="{{ user.lastname }}" {% endif %}> {% if user %}value="{{ user.lastname }}" {% endif %}>
<span class="glyphicon glyphicon-user form-control-feedback"></span> <span class="form-control-feedback"></span>
</div> </div>
<div class="form-group has-feedback"> <div class="form-group has-feedback">
<label class="control-label" for="email">E-mail address</label> <label class="control-label" for="email">E-mail address</label>
<input type="email" class="form-control" placeholder="Email" name="email" id="email" <input type="email" class="form-control" placeholder="Email" name="email" id="email"
{% if user %}value="{{ user.email }}" {% endif %}> {% if user %}value="{{ user.email }}" {% endif %}>
<span class="glyphicon glyphicon-envelope form-control-feedback"></span> <span class="form-control-feedback"></span>
</div> </div>
<p class="login-box-msg">Enter the account details below</p> <p class="login-box-msg">Enter the account details below</p>
<div class="form-group has-feedback"> <div class="form-group has-feedback">
@ -76,14 +76,14 @@
<input type="text" class="form-control" placeholder="Username" name="username" <input type="text" class="form-control" placeholder="Username" name="username"
{% if user %}value="{{ user.username }}" {% endif %} {% if user %}value="{{ user.username }}" {% endif %}
{% if not create %}disabled{% endif %}> {% if not create %}disabled{% endif %}>
<span class="glyphicon glyphicon-user form-control-feedback"></span> <span class="form-control-feedback"></span>
</div> </div>
<div class="form-group has-feedback {% if blank_password %}has-error{% endif %}"> <div class="form-group has-feedback {% if blank_password %}has-error{% endif %}">
<label class="control-label" for="username">Password</label> <label class="control-label" for="username">Password</label>
<input type="password" class="form-control" <input type="password" class="form-control"
placeholder="Password {% if create %}(Required){% else %}(Leave blank to keep unchanged){% endif %}" placeholder="Password {% if create %}(Required){% else %}(Leave blank to keep unchanged){% endif %}"
name="password"> name="password">
<span class="glyphicon glyphicon-lock form-control-feedback"></span> <span class="form-control-feedback"></span>
{% if blank_password %} {% if blank_password %}
<span class="help-block">The password cannot be blank.</span> <span class="help-block">The password cannot be blank.</span>
{% endif %} {% endif %}
@ -98,8 +98,8 @@
</div> </div>
{% if not create %} {% if not create %}
{% if user.otp_secret %} {% if user.otp_secret %}
<div class="card card-secondary"> <div class="card">
<div class="card-header with-border"> <div class="card-header">
<h3 class="card-title">Two Factor Authentication</h3> <h3 class="card-title">Two Factor Authentication</h3>
</div> </div>
<div class="card-body"> <div class="card-body">
@ -119,8 +119,8 @@
{% endif %} {% endif %}
</div> </div>
<div class="col-8"> <div class="col-8">
<div class="card card-secondary"> <div class="card">
<div class="card-header with-border"> <div class="card-header">
<h3 class="card-title"> <h3 class="card-title">
Help with {% if create %}creating a new{% else%}editing a{% endif %} user Help with {% if create %}creating a new{% else%}editing a{% endif %} user
</h3> </h3>
@ -168,18 +168,21 @@
<div class="modal-dialog"> <div class="modal-dialog">
<div class="modal-content"> <div class="modal-content">
<div class="modal-header"> <div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"> <h4 class="modal-title">Confirmation</h4>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span> <span aria-hidden="true">&times;</span>
</button> </button>
<h4 class="modal-title">Confirmation</h4>
</div> </div>
<div class="modal-body"> <div class="modal-body">
<p></p> <p></p>
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<button type="button" class="btn btn-flat btn-default pull-left" data-dismiss="modal">Close</button> <button type="button" class="btn btn-default" data-dismiss="modal">
<button type="button" class="btn btn-flat btn-danger" id="button_otp_disable_confirm">Disable Two Factor Close
Authentication</button> </button>
<button type="button" class="btn btn-danger float-right" id="button_otp_disable_confirm">
Disable Two Factor Authentication
</button>
</div> </div>
</div> </div>
</div> </div>

View File

@ -34,7 +34,7 @@
<div class="container-fluid"> <div class="container-fluid">
<div class="row"> <div class="row">
<div class="col-12"> <div class="col-12">
<div class="card shadow"> <div class="card">
<div class="card-header"> <div class="card-header">
<h3 class="card-title">Global Search</h3> <h3 class="card-title">Global Search</h3>
</div> </div>
@ -60,7 +60,7 @@
<div class="row"> <div class="row">
<div class="col-12"> <div class="col-12">
<div class="card shadow"> <div class="card">
<div class="card-header"> <div class="card-header">
<h3 class="card-title">Domains ({{ domains|length }})</h3> <h3 class="card-title">Domains ({{ domains|length }})</h3>
</div> </div>
@ -88,7 +88,7 @@
<div class="row"> <div class="row">
<div class="col-12"> <div class="col-12">
<div class="card shadow"> <div class="card">
<div class="card-header"> <div class="card-header">
<h3 class="card-title">Records ({{ records|length }})</h3> <h3 class="card-title">Records ({{ records|length }})</h3>
</div> </div>
@ -124,7 +124,7 @@
<div class="row"> <div class="row">
<div class="col-12"> <div class="col-12">
<div class="card shadow"> <div class="card">
<div class="card-header"> <div class="card-header">
<h3 class="card-title">Comments ({{ comments|length }})</h3> <h3 class="card-title">Comments ({{ comments|length }})</h3>
</div> </div>

View File

@ -40,7 +40,7 @@
<h3 class="card-title">History Management</h3> <h3 class="card-title">History Management</h3>
{% if current_user.role.name != 'User' %} {% if current_user.role.name != 'User' %}
<button type="button" class="btn btn-danger float-right" data-toggle="modal" data-target="#modal_clear_history" {% if current_user.role.name != 'Administrator' %}disabled{% endif %}> <button type="button" class="btn btn-danger float-right" data-toggle="modal" data-target="#modal_clear_history" {% if current_user.role.name != 'Administrator' %}disabled{% endif %}>
<i class="fas fa-trash"></i> <i class="fa-solid fa-trash"></i>
&nbsp;Clear History &nbsp;Clear History
</button> </button>
{% endif %} {% endif %}

View File

@ -37,7 +37,7 @@
{% if history.detailed_msg == "" and history.change_set is none %} {% if history.detailed_msg == "" and history.change_set is none %}
style="visibility: hidden;" style="visibility: hidden;"
{% endif %} value="{{ loop.index0 }}"> {% endif %} value="{{ loop.index0 }}">
<i class="fa fa-info"></i> <i class="fa-solid fa-info"></i>
&nbsp;Info &nbsp;Info
</button> </button>
</td> </td>

View File

@ -34,14 +34,12 @@
<div class="container-fluid"> <div class="container-fluid">
<div class="row"> <div class="row">
<div class="col-12"> <div class="col-12">
<div class="card card-primary"> <div class="card">
<div class="card-header with-border"> <div class="card-header">
<h3 class="card-title">Account Management</h3> <h3 class="card-title">Account Management</h3>
</div>
<div class="card-body">
<a href="{{ url_for('admin.edit_account') }}"> <a href="{{ url_for('admin.edit_account') }}">
<button type="button" class="btn btn-flat btn-primary pull-left button_add_account"> <button type="button" class="btn btn-primary float-right button_add_account">
Add Account&nbsp;<i class="fa fa-plus"></i> <i class="fa-solid fa-plus"></i>&nbsp;Add Account
</button> </button>
</a> </a>
</div> </div>
@ -68,12 +66,22 @@
<td>{{ account.user_num }}</td> <td>{{ account.user_num }}</td>
<td>{{ account.domains|length }}</td> <td>{{ account.domains|length }}</td>
<td width="15%"> <td width="15%">
<button type="button" class="btn btn-flat btn-success" onclick="window.location.href='{{ url_for('admin.edit_account', account_name=account.name) }}'"> <div class="dropdown">
Edit&nbsp;<i class="fa fa-cog"></i> <button class="btn btn-primary dropdown-toggle" type="button" id="dropdownMenu" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
</button> <i class="fa-solid fa-bars"></i>&nbsp;Actions
<button type="button" class="btn btn-flat btn-danger button_delete" id="{{ account.name }}"> </button>
Delete&nbsp;<i class="fa fa-trash"></i> <div class="dropdown-menu" aria-labelledby="dropdownMenu">
</button> <button type="button" class="dropdown-item btn-warning" onclick="window.location.href='{{ url_for('admin.edit_account', account_name=account.name) }}'">
<i class="fa-solid fa-edit"></i>&nbsp;Edit Account
</button>
<div class="dropdown-divider"></div>
<button type="button"class="dropdown-item btn-secondary button_delete" id="{{ account.name }}">
<font color="red">
<i class="fa-solid fa-trash"></i>&nbsp;Delete Account
</font>
</button>
</div>
</div>
</td> </td>
</tr> </tr>
{% endfor %} {% endfor %}
@ -127,20 +135,20 @@
</script> </script>
{% endblock %} {% endblock %}
{% block modals %} {% block modals %}
<div class="modal fade modal-warning" id="modal_delete"> <div class="modal fade" id="modal_delete">
<div class="modal-dialog"> <div class="modal-dialog">
<div class="modal-content"> <div class="modal-content">
<div class="modal-header"> <div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"> <h4 class="modal-title">Confirmation</h4>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span> <span aria-hidden="true">&times;</span>
</button> </button>
<h4 class="modal-title">Confirmation</h4>
</div> </div>
<div class="modal-body"> <div class="modal-body">
<p></p> <p></p>
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<button type="button" class="btn btn-default pull-left" data-dismiss="modal">Close</button> <button type="button" class="btn btn-default float-left" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-danger" id="button_delete_confirm">Delete</button> <button type="button" class="btn btn-danger" id="button_delete_confirm">Delete</button>
</div> </div>
</div> </div>

View File

@ -35,11 +35,9 @@
<div class="card"> <div class="card">
<div class="card-header with-border"> <div class="card-header with-border">
<h3 class="card-title">Key Management</h3> <h3 class="card-title">Key Management</h3>
</div>
<div class="card-body">
<a href="{{ url_for('admin.edit_key') }}"> <a href="{{ url_for('admin.edit_key') }}">
<button type="button" class="btn btn-primary pull-left button_add_key"> <button type="button" class="btn btn-primary float-right button_add_key">
Add Key&nbsp;<i class="fa fa-plus"></i> <i class="fa-solid fa-plus"></i>&nbsp;Add Key
</button> </button>
</a> </a>
</div> </div>
@ -52,7 +50,7 @@
<th>Description</th> <th>Description</th>
<th>Domains</th> <th>Domains</th>
<th>Accounts</th> <th>Accounts</th>
<th>Action</th> <th>Actions</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@ -64,14 +62,22 @@
<td>{% for domain in key.domains %}{{ domain.name }}{% if not loop.last %}, {% endif %}{% endfor %}</td> <td>{% for domain in key.domains %}{{ domain.name }}{% if not loop.last %}, {% endif %}{% endfor %}</td>
<td>{% for account in key.accounts %}{{ account.name }}{% if not loop.last %}, {% endif %}{% endfor %}</td> <td>{% for account in key.accounts %}{{ account.name }}{% if not loop.last %}, {% endif %}{% endfor %}</td>
<td width="15%"> <td width="15%">
<button type="button" class="btn btn-flat btn-success button_edit" <div class="dropdown">
onclick="window.location.href='{{ url_for('admin.edit_key', key_id=key.id) }}'"> <button class="btn btn-primary dropdown-toggle" type="button" id="dropdownMenu" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Edit&nbsp;<i class="fa fa-lock"></i> <i class="fa-solid fa-bars"></i>&nbsp;Actions
</button> </button>
<button type="button" class="btn btn-flat btn-danger button_delete" <div class="dropdown-menu" aria-labelledby="dropdownMenu">
id="{{ key.id }}"> <button type="button" class="dropdown-item btn-warning" onclick="window.location.href='{{ url_for('admin.edit_key', key_id=key.id) }}'">
Delete&nbsp;<i class="fa fa-trash"></i> <i class="fa-solid fa-edit"></i>&nbsp;Edit API Key
</button> </button>
<div class="dropdown-divider"></div>
<button type="button"class="dropdown-item btn-secondary button_delete" id="{{ key.id }}">
<font color="red">
<i class="fa-solid fa-trash"></i>&nbsp;Delete API Key
</font>
</button>
</div>
</div>
</td> </td>
</tr> </tr>
{% endfor %} {% endfor %}
@ -125,17 +131,21 @@
<div class="modal-dialog"> <div class="modal-dialog">
<div class="modal-content"> <div class="modal-content">
<div class="modal-header"> <div class="modal-header">
<h4 class="modal-title">Confirmation</h4>
<button type="button" class="close" data-dismiss="modal" aria-label="Close"> <button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span> <span aria-hidden="true">&times;</span>
</button> </button>
<h4 class="modal-title">Confirmation</h4>
</div> </div>
<div class="modal-body"> <div class="modal-body">
<p></p> <p></p>
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<button type="button" class="btn btn-default float-left" data-dismiss="modal">Close</button> <button type="button" class="btn btn-secondary" data-dismiss="modal">
<button type="button" class="btn btn-danger" id="button_delete_confirm">Delete</button> Close
</button>
<button type="button" class="btn btn-danger" id="button_delete_confirm">
Delete
</button>
</div> </div>
</div> </div>
</div> </div>

View File

@ -35,13 +35,11 @@
<div class="row"> <div class="row">
<div class="col-12"> <div class="col-12">
<div class="card"> <div class="card">
<div class="card-header with-border"> <div class="card-header">
<h3 class="card-title">User Management</h3> <h3 class="card-title">User Management</h3>
</div>
<div class="card-body">
<a href="{{ url_for('admin.edit_user') }}"> <a href="{{ url_for('admin.edit_user') }}">
<button type="button" class="btn btn-primary pull-left button_add_user"> <button type="button" class="btn btn-primary float-right button_add_user">
<i class="fa fa-plus"></i>&nbsp;Add User <i class="fa-solid fa-plus"></i>&nbsp;Add User
</button> </button>
</a> </a>
</div> </div>
@ -80,20 +78,30 @@
<button type="button" class="btn btn-warning button_revoke" <button type="button" class="btn btn-warning button_revoke"
id="{{ user.username }}" id="{{ user.username }}"
{% if current_user.role.name=='Operator' and user.role.name=='Administrator' %}disabled{% endif %}> {% if current_user.role.name=='Operator' and user.role.name=='Administrator' %}disabled{% endif %}>
<i class="fa fa-lock"></i>&nbsp;Revoke <i class="fa-solid fa-link-slash"></i>&nbsp;Revoke
</button> </button>
</td> </td>
<td width="15%"> <td width="15%">
<button type="button" class="btn btn-success button_edit"
onclick="window.location.href='{{ url_for('admin.edit_user', user_username=user.username) }}'" <div class="dropdown">
<button class="btn btn-primary dropdown-toggle" type="button" id="dropdownMenu" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"
{% if current_user.role.name=='Operator' and user.role.name=='Administrator' %}disabled{% endif %}> {% if current_user.role.name=='Operator' and user.role.name=='Administrator' %}disabled{% endif %}>
<i class="fa fa-lock"></i>&nbsp;Edit <i class="fa-solid fa-bars"></i>&nbsp;Actions
</button> </button>
<button type="button" class="btn btn-danger button_delete" <div class="dropdown-menu" aria-labelledby="dropdownMenu">
id="{{ user.username }}" <button type="button" class="dropdown-item btn-warning" onclick="window.location.href='{{ url_for('admin.edit_user', user_username=user.username) }}'">
{% if user.username==current_user.username or (current_user.role.name=='Operator' and user.role.name=='Administrator') %}disabled{% endif %}> <i class="fa-solid fa-edit"></i>&nbsp;Edit User
<i class="fa fa-trash"></i>&nbsp;Delete </button>
</button> {% if not user.username==current_user.username or (current_user.role.name=='Operator' and user.role.name=='Administrator') %}
<div class="dropdown-divider"></div>
<button type="button"class="dropdown-item btn-secondary button_delete" id="{{ user.username }}">
<font color="red">
<i class="fa-solid fa-trash"></i>&nbsp;Delete User
</font>
</button>
{% endif %}
</div>
</div>
</td> </td>
</tr> </tr>
{% endfor %} {% endfor %}
@ -179,7 +187,7 @@
{% endblock %} {% endblock %}
{% block modals %} {% block modals %}
<div class="modal fade modal-warning" id="modal_revoke"> <div class="modal fade" id="modal_revoke">
<div class="modal-dialog"> <div class="modal-dialog">
<div class="modal-content"> <div class="modal-content">
<div class="modal-header"> <div class="modal-header">
@ -192,14 +200,18 @@
<p></p> <p></p>
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<button type="button" class="btn btn-default pull-left" data-dismiss="modal">Close</button> <button type="button" class="btn btn-secondary float-right" data-dismiss="modal">
<button type="button" class="btn btn-danger" id="button_revoke_confirm">Revoke</button> Close
</button>
<button type="button" class="btn btn-danger float-right" id="button_revoke_confirm">
Revoke
</button>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div class="modal fade modal-warning" id="modal_delete"> <div class="modal fade" id="modal_delete">
<div class="modal-dialog"> <div class="modal-dialog">
<div class="modal-content"> <div class="modal-content">
<div class="modal-header"> <div class="modal-header">
@ -212,8 +224,12 @@
<p></p> <p></p>
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<button type="button" class="btn btn-default pull-left" data-dismiss="modal">Close</button> <button type="button" class="btn btn-default float-right" data-dismiss="modal">
<button type="button" class="btn btn-danger" id="button_delete_confirm">Delete</button> Close
</button>
<button type="button" class="btn btn-danger float-right" id="button_delete_confirm">
Delete
</button>
</div> </div>
</div> </div>
</div> </div>

View File

@ -84,7 +84,7 @@
<td> <td>
<a href="https://doc.powerdns.com/authoritative/search.html?q={{ config['name'] }}" <a href="https://doc.powerdns.com/authoritative/search.html?q={{ config['name'] }}"
target="_blank" class="btn btn-primary"> target="_blank" class="btn btn-primary">
<i class="fa fa-search"></i>&nbsp;{{ config['name'] }} <i class="fa-solid fa-search"></i>&nbsp;{{ config['name'] }}
</a> </a>
</td> </td>
<td> <td>

View File

@ -55,14 +55,14 @@
<td><i class="fas fa-toggle-off"></i>&nbsp;Off</td> <td><i class="fas fa-toggle-off"></i>&nbsp;Off</td>
<td width="20%"> <td width="20%">
<button type="button" class="btn btn-success setting-toggle-button" id="{{ setting }}"> <button type="button" class="btn btn-success setting-toggle-button" id="{{ setting }}">
<i class="fas fa-toggle-on"></i>&nbsp;Turn On <i class="fa-solid fa-toggle-on"></i>&nbsp;Turn On
</button> </button>
</td> </td>
{% elif SETTING.get(setting) in [True] %} {% elif SETTING.get(setting) in [True] %}
<td><i class="fas fa-toggle-on"></i>&nbsp;On</td> <td><i class="fas fa-toggle-on"></i>&nbsp;On</td>
<td width="20%"> <td width="20%">
<button type="button" class="btn btn-danger setting-toggle-button" id="{{ setting }}"> <button type="button" class="btn btn-danger setting-toggle-button" id="{{ setting }}">
<i class="fas fa-toggle-off"></i>&nbsp;Turn Off <i class="fa-solid fa-toggle-off"></i>&nbsp;Turn Off
</button> </button>
</td> </td>
{% else %} {% else %}
@ -71,7 +71,7 @@
</td> </td>
<td width="20%"> <td width="20%">
<button type="button" class="btn btn-primary setting-save-button" id="{{ setting }}"> <button type="button" class="btn btn-primary setting-save-button" id="{{ setting }}">
<i class="fas fa-save"></i>&nbsp;Save <i class="fa-solid fa-save"></i>&nbsp;Save
</button> </button>
</td> </td>
{% endif %} {% endif %}

View File

@ -69,7 +69,9 @@
</div> </div>
</div> </div>
<div class="card-footer"> <div class="card-footer">
<button type="submit" class="btn btn-primary"><i class="fas fa-save"></i>&nbsp;Update</button> <button type="submit" class="btn btn-primary float-right">
<i class="fa-solid fa-save"></i>&nbsp;Save
</button>
</div> </div>
</form> </form>
</div> </div>

View File

@ -34,8 +34,8 @@
<div class="container-fluid"> <div class="container-fluid">
<div class="row"> <div class="row">
<div class="col-5"> <div class="col-5">
<div class="card card-primary"> <div class="card">
<div class="card-header with-border"> <div class="card-header">
<h3 class="card-title">DNS record Settings</h3> <h3 class="card-title">DNS record Settings</h3>
</div> </div>
<form role="form" method="post"> <form role="form" method="post">
@ -66,14 +66,16 @@
</table> </table>
</div> </div>
<div class="card-footer"> <div class="card-footer">
<button type="submit" class="btn btn-flat btn-primary">Update</button> <button type="submit" class="btn btn-primary float-right">
<i class="fa-solid fa-save"></i>&nbsp;Save
</button>
</div> </div>
</form> </form>
</div> </div>
</div> </div>
<div class="col-7"> <div class="col-7">
<div class="card card-primary"> <div class="card">
<div class="card-header with-border"> <div class="card-header">
<h3 class="card-title">Help</h3> <h3 class="card-title">Help</h3>
</div> </div>
<div class="card-body"> <div class="card-body">

View File

@ -14,7 +14,6 @@
<!-- Get Google Fonts we like --> <!-- Get Google Fonts we like -->
<link rel="stylesheet" href="{{ url_for('static', filename='assets/css/source_sans_pro.css') }}"> <link rel="stylesheet" href="{{ url_for('static', filename='assets/css/source_sans_pro.css') }}">
<link rel="stylesheet" href="{{ url_for('static', filename='assets/css/roboto_mono.css') }}"> <link rel="stylesheet" href="{{ url_for('static', filename='assets/css/roboto_mono.css') }}">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.9.0/css/all.min.css">
<!-- Tell the browser to be responsive to screen width --> <!-- Tell the browser to be responsive to screen width -->
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport"> <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
<!-- Tell Safari to not recognise telephone numbers --> <!-- Tell Safari to not recognise telephone numbers -->
@ -28,56 +27,24 @@
{% endblock %} {% endblock %}
</head> </head>
<body class="hold-transition sidebar-mini text-sm {% if not SETTING.get('fullscreen_layout') %}layout-boxed{% endif %}"> <body class="hold-transition sidebar-mini {% if not SETTING.get('fullscreen_layout') %}layout-boxed{% endif %}">
{% set user_image_url = url_for('user.image', username=current_user.username) %} {% set user_image_url = url_for('user.image', username=current_user.username) %}
<div class="wrapper"> <div class="wrapper">
{% block pageheader %} {% block pageheader %}
<nav class="main-header navbar navbar-expand navbar-dark"> <nav class="main-header navbar navbar-expand navbar-white navbar-light">
<!-- Header Navbar: style can be found in header.less --> <!-- Header Navbar: style can be found in header.less -->
<!-- Sidebar toggle button--> <!-- Sidebar toggle button-->
<ul class="navbar-nav"> <ul class="navbar-nav">
<li class="nav-item"> <li class="nav-item">
<a class="nav-link" data-widget="pushmenu" href="#" role="button"> <a class="nav-link" data-widget="pushmenu" href="#" role="button">
<i class="fas fa-bars"></i> <i class="fa-solid fa-bars"></i>
</a> </a>
</li> </li>
{% if current_user.id is defined %}
<li class="nav-item d-none d-inline-block">
<a class="nav-link" href="{{ url_for('index.logout') }}">
Logout
</a>
</li>
{% endif %}
</ul> </ul>
<ul class="navbar-nav ml-auto"> <ul class="navbar-nav ml-auto">
<!-- {% if current_user.id is defined %}
<li class="nav-item dropdown user-menu">
<a href="#" class="nav-link dropdown-toggle" data-toggle="dropdown">
<img src="{{ user_image_url }}" class="user-image img-circle elevation-2" alt="User Image"/>
<span class="d-none d-md-inline">
{{ current_user.firstname }} {{ current_user.lastname }}
</span>
</a>
<ul class="dropdown-menu">
<li class="user-header bg-dark">
<img src="{{ user_image_url }}" class="img-circle elevation-2" alt="User Image"/>
<p>
{{ current_user.firstname }} {{ current_user.lastname }}
<small>{{ current_user.role.name }}</small>
</p>
</li>
<li class="user-footer">
<a href="{{ url_for('user.profile') }}" class="btn btn-primary">My Profile</a>
<a href="{{ url_for('index.logout') }}" class="btn btn-warning float-right">Log out</a>
</li>
</ul>
</li>
{% endif %}
-->
<li class="nav-item"> <li class="nav-item">
<a class="nav-link" data-widget="fullscreen" href="#" role="button"> <a class="nav-link" data-widget="fullscreen" href="#" role="button">
<i class="fas fa-expand-arrows-alt"></i> <i class="fa-solid fa-expand-arrows-alt"></i>
</a> </a>
</li> </li>
</ul> </ul>
@ -88,6 +55,7 @@
<aside class="main-sidebar sidebar-dark-primary"> <aside class="main-sidebar sidebar-dark-primary">
<!-- Logo --> <!-- Logo -->
<a href="{{ url_for('index.index') }}" class="brand-link"> <a href="{{ url_for('index.index') }}" class="brand-link">
<img src="{{ url_for('static', filename='img/favicon.png') }}" alt="PowerDNS-Admin FavIcon" class="brand-image img-circle elevation-3" style="opacity: .8">
<span class="brand-text font-weight-light"> <span class="brand-text font-weight-light">
{% if SETTING.get('site_name') %} {% if SETTING.get('site_name') %}
<b>{{ SITE_NAME }}</b> <b>{{ SITE_NAME }}</b>
@ -109,17 +77,29 @@
</div> </div>
<!-- sidebar menu: : style can be found in sidebar.less --> <!-- sidebar menu: : style can be found in sidebar.less -->
<ul class="nav nav-pills nav-sidebar flex-column" data-widget="treeview" role="menu"> <ul class="nav nav-pills nav-sidebar flex-column" data-widget="treeview" role="menu">
<li class="nav-header">USER ACTIONS</li> <li class="{{ 'nav-item active' if active_page == 'user_profile' else 'nav-item' }}">
<a href="{{ url_for('user.profile') }}" class="nav-link">
<i class="nav-icon fa-solid fa-user"></i>
<p>Profile</p>
</a>
</li>
<li class="nav-item">
<a href="{{ url_for('index.logout') }}" class="nav-link">
<i class="nav-icon fa-solid fa-sign-out-alt"></i>
<p>Logout</p>
</a>
</li>
<li class="nav-header">Zone Management</li>
<li class="{{ 'nav-item active' if active_page == 'nav-item dashboard' else 'nav-item' }}"> <li class="{{ 'nav-item active' if active_page == 'nav-item dashboard' else 'nav-item' }}">
<a href="{{ url_for('dashboard.dashboard') }}" class="nav-link"> <a href="{{ url_for('dashboard.dashboard') }}" class="nav-link">
<i class="nav-icon fas fa-tachometer-alt"></i> <i class="nav-icon fa-solid fa-tachometer-alt"></i>
<p>Dashboard</p> <p>Dashboard</p>
</a> </a>
</li> </li>
{% if SETTING.get('allow_user_create_domain') or current_user.role.name in ['Administrator', 'Operator'] %} {% if SETTING.get('allow_user_create_domain') or current_user.role.name in ['Administrator', 'Operator'] %}
<li class="{{ 'nav-item active' if active_page == 'nav-item new_domain' else 'nav-item' }}"> <li class="{{ 'nav-item active' if active_page == 'nav-item new_domain' else 'nav-item' }}">
<a href="{{ url_for('domain.add') }}" class="nav-link"> <a href="{{ url_for('domain.add') }}" class="nav-link">
<i class="nav-icon fas fa-plus"></i> <i class="nav-icon fa-solid fa-plus"></i>
<p>New Domain</p> <p>New Domain</p>
</a> </a>
</li> </li>
@ -127,86 +107,86 @@
{% if SETTING.get('allow_user_remove_domain') or current_user.role.name in ['Administrator', 'Operator'] %} {% if SETTING.get('allow_user_remove_domain') or current_user.role.name in ['Administrator', 'Operator'] %}
<li class="{{ 'nav-item active' if active_page == 'remove_domain' else 'nav-item' }}"> <li class="{{ 'nav-item active' if active_page == 'remove_domain' else 'nav-item' }}">
<a href="{{ url_for('domain.remove') }}" class="nav-link"> <a href="{{ url_for('domain.remove') }}" class="nav-link">
<i class="nav-icon fas fa-trash-alt"></i> <i class="nav-icon fa-solid fa-trash-alt"></i>
<p>Remove Domain</p> <p>Remove Domain</p>
</a> </a>
</li> </li>
{% endif %} {% endif %}
{% if current_user.role.name in ['Administrator', 'Operator'] %} {% if current_user.role.name in ['Administrator', 'Operator'] %}
<li class="nav-header">ADMINISTRATION</li> <li class="nav-header">Administration</li>
<li class="{{ 'nav-item active' if active_page == 'admin_console' else 'nav-item' }}"> <li class="{{ 'nav-item active' if active_page == 'admin_console' else 'nav-item' }}">
<a href="{{ url_for('admin.pdns_stats') }}" class="nav-link"> <a href="{{ url_for('admin.pdns_stats') }}" class="nav-link">
<i class="nav-icon fas fa-info-circle"></i> <i class="nav-icon fa-solid fa-info-circle"></i>
<p>PowerDNS Info</p> <p>PowerDNS Info</p>
</a> </a>
</li> </li>
<li class="{{ 'nav-item active' if active_page == 'admin_global_search' else 'nav-item' }}"> <li class="{{ 'nav-item active' if active_page == 'admin_global_search' else 'nav-item' }}">
<a href="{{ url_for('admin.global_search') }}" class="nav-link"> <a href="{{ url_for('admin.global_search') }}" class="nav-link">
<i class="nav-icon fas fa-search"></i> <i class="nav-icon fa-solid fa-search"></i>
<p>Global Search</p> <p>Global Search</p>
</a> </a>
</li> </li>
<li class="{{ 'nav-item active' if active_page == 'admin_history' else 'nav-item' }}"> <li class="{{ 'nav-item active' if active_page == 'admin_history' else 'nav-item' }}">
<a href="{{ url_for('admin.history') }}" class="nav-link"> <a href="{{ url_for('admin.history') }}" class="nav-link">
<i class="nav-icon fas fa-calendar-alt"></i> <i class="nav-icon fa-solid fa-calendar-alt"></i>
<p>History</p> <p>History</p>
</a> </a>
</li> </li>
<li class="{{ 'nav-item active' if active_page == 'admin_domain_template' else 'nav-item' }}"> <li class="{{ 'nav-item active' if active_page == 'admin_domain_template' else 'nav-item' }}">
<a href="{{ url_for('admin.templates') }}" class="nav-link"> <a href="{{ url_for('admin.templates') }}" class="nav-link">
<i class="nav-icon fas fa-clone"></i> <i class="nav-icon fa-solid fa-clone"></i>
<p>Domain Templates</p> <p>Domain Templates</p>
</a> </a>
</li> </li>
<li class="{{ 'nav-item active' if active_page == 'admin_accounts' else 'nav-item' }}"> <li class="{{ 'nav-item active' if active_page == 'admin_accounts' else 'nav-item' }}">
<a href="{{ url_for('admin.manage_account') }}" class="nav-link"> <a href="{{ url_for('admin.manage_account') }}" class="nav-link">
<i class="nav-icon fas fa-industry"></i> <i class="nav-icon fa-solid fa-industry"></i>
<p>Accounts</p> <p>Accounts</p>
</a> </a>
</li> </li>
<li class="{{ 'nav-item active' if active_page == 'admin_users' else 'nav-item' }}"> <li class="{{ 'nav-item active' if active_page == 'admin_users' else 'nav-item' }}">
<a href="{{ url_for('admin.manage_user') }}" class="nav-link"> <a href="{{ url_for('admin.manage_user') }}" class="nav-link">
<i class="nav-icon fas fa-users"></i> <i class="nav-icon fa-solid fa-users"></i>
<p>Users</p> <p>Users</p>
</a> </a>
</li> </li>
<li class="{{ 'nav-item active' if active_page == 'admin_keys' else 'nav-item' }}"> <li class="{{ 'nav-item active' if active_page == 'admin_keys' else 'nav-item' }}">
<a href="{{ url_for('admin.manage_keys') }}" class="nav-link"> <a href="{{ url_for('admin.manage_keys') }}" class="nav-link">
<i class="nav-icon fas fa-key"></i> <i class="nav-icon fa-solid fa-key"></i>
<p>API Keys</p> <p>API Keys</p>
</a> </a>
</li> </li>
<li class="{{ 'nav-item active' if active_page == 'admin_settings' else 'nav-item' }}"> <li class="{{ 'nav-item active' if active_page == 'admin_settings' else 'nav-item' }}">
<a href="#" class="nav-link"> <a href="#" class="nav-link">
<i class="nav-icon fas fa-cog"></i> <i class="nav-icon fa-solid fa-cog"></i>
<p> <p>
Settings Settings
<i class="right fas fa-angle-left"></i> <i class="right fa-solid fa-angle-left"></i>
</p> </p>
</a> </a>
<ul class="nav nav-treeview" {% if active_page == 'admin_settings' %}style="display: block;"{% endif %}> <ul class="nav nav-treeview" {% if active_page == 'admin_settings' %}style="display: block;"{% endif %}>
<li class="nav-item"> <li class="nav-item">
<a href="{{ url_for('admin.setting_basic') }}" class="nav-link"> <a href="{{ url_for('admin.setting_basic') }}" class="nav-link">
<i class="nav-icon far fa-circle"></i> <i class="nav-icon fa-solid fa-circle"></i>
<p>Basic</p> <p>Basic</p>
</a> </a>
</li> </li>
<li class="nav-item"> <li class="nav-item">
<a href="{{ url_for('admin.setting_records') }}" class="nav-link"> <a href="{{ url_for('admin.setting_records') }}" class="nav-link">
<i class="nav-icon far fa-circle"></i> <i class="nav-icon fa-solid fa-circle"></i>
<p>Records</p> <p>Records</p>
</a> </a>
</li> </li>
{% if current_user.role.name == 'Administrator' %} {% if current_user.role.name == 'Administrator' %}
<li class="nav-item"> <li class="nav-item">
<a href="{{ url_for('admin.setting_pdns') }}" class="nav-link"> <a href="{{ url_for('admin.setting_pdns') }}" class="nav-link">
<i class="nav-icon far fa-circle"></i> <i class="nav-icon fa-solid fa-circle"></i>
<p>PowerDNS Connection</p> <p>PowerDNS Connection</p>
</a> </a>
</li> </li>
<li class="nav-item"> <li class="nav-item">
<a href="{{ url_for('admin.setting_authentication') }}" class="nav-link"> <a href="{{ url_for('admin.setting_authentication') }}" class="nav-link">
<i class="nav-icon far fa-circle"></i> <i class="nav-icon fa-solid fa-circle"></i>
<p>Authentication</p> <p>Authentication</p>
</a> </a>
</li> </li>
@ -214,10 +194,10 @@
</ul> </ul>
</li> </li>
{% elif SETTING.get('allow_user_view_history') %} {% elif SETTING.get('allow_user_view_history') %}
<li class="nav-header">ADMINISTRATION</li> <li class="nav-header">Administration</li>
<li class="{{ 'nav-item active' if active_page == 'admin_history' else 'nav-item' }}"> <li class="{{ 'nav-item active' if active_page == 'admin_history' else 'nav-item' }}">
<a href="{{ url_for('admin.history') }}" class="nav-link"> <a href="{{ url_for('admin.history') }}" class="nav-link">
<i class="nav-icon fas fa-calendar-alt"></i> <i class="nav-icon fa-solid fa-calendar-alt"></i>
<p>History</p> <p>History</p>
</a> </a>
</li> </li>
@ -383,49 +363,43 @@
<div class="modal-dialog"> <div class="modal-dialog">
<div class="modal-content"> <div class="modal-content">
<div class="modal-header"> <div class="modal-header">
<button type="button" class="close" data-dismiss="modal" <h4 class="modal-title">Error</h4>
aria-label="Close"> <button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span> <span aria-hidden="true">&times;</span>
</button> </button>
<h4 class="modal-title">Error</h4>
</div> </div>
<div class="modal-body"> <div class="modal-body">
<p></p> <p></p>
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<button type="button" class="btn btn-flat btn-default pull-right" <button type="button" class="btn btn-secondary float-right" data-dismiss="modal">
data-dismiss="modal">Close</button> Close
</button>
</div> </div>
</div> </div>
<!-- /.modal-content -->
</div> </div>
<!-- /.modal-dialog -->
</div> </div>
<!-- /.modal --> <!-- /.modal -->
<div class="modal fade modal-success" id="modal_success"> <div class="modal fade modal-success" id="modal_success">
<div class="modal-dialog"> <div class="modal-dialog">
<div class="modal-content"> <div class="modal-content">
<div class="modal-header"> <div class="modal-header">
<button type="button" class="close" data-dismiss="modal" <h4 class="modal-title">Success</h4>
aria-label="Close"> <button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span> <span aria-hidden="true">&times;</span>
</button> </button>
<h4 class="modal-title">Success</h4>
</div> </div>
<div class="modal-body"> <div class="modal-body">
<p></p> <p></p>
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<button type="button" class="btn btn-flat btn-default pull-right" <button type="button" class="btn btn-secondary float-right" data-dismiss="modal">
data-dismiss="modal">Close</button> Close
</button>
</div> </div>
</div> </div>
<!-- /.modal-content -->
</div> </div>
<!-- /.modal-dialog -->
</div> </div>
<!-- /.modal -->
<!-- /.session-warning-modal -->
<div class="modal fade modal-warning" data-backdrop="static" id="modal_session_warning"> <div class="modal fade modal-warning" data-backdrop="static" id="modal_session_warning">
<div class="modal-dialog"> <div class="modal-dialog">
<div class="modal-content"> <div class="modal-content">
@ -438,17 +412,16 @@
<p>To coninue your ssession, select <strong>Stay Signed In</strong></p> <p>To coninue your ssession, select <strong>Stay Signed In</strong></p>
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<button type="button" class="btn btn-flat btn-danger pull-left button_stay_signed_in" <button type="button" class="btn btn-success float-right button_stay_signed_in" data-dismiss="modal">
data-dismiss="modal">Stay Signed In</button> Stay Signed In
<button type="button" class="btn btn-flat btn-default pull-right button_sign_out" </button>
data-dismiss="modal">Sign Out</button> <button type="button" class="btn btn-danger float-left button_sign_out" data-dismiss="modal">
Sign Out
</button>
</div> </div>
</div> </div>
<!-- /.session-warning-modal-content -->
</div> </div>
<!-- /.session-warning-modal-dialog -->
</div> </div>
<!-- /.session-warning-modal -->
{% endblock %} {% endblock %}
{% block modals %} {% block modals %}
{% endblock %} {% endblock %}

View File

@ -36,7 +36,7 @@
{% if current_user.role.name in ['Administrator', 'Operator'] or SETTING.get('allow_user_view_history') %} {% if current_user.role.name in ['Administrator', 'Operator'] or SETTING.get('allow_user_view_history') %}
<div class="row"> <div class="row">
<div class="col-3"> <div class="col-3">
<div class="card shadow card-outline card-secondary"> <div class="card">
<div class="card-header"> <div class="card-header">
<h3 class="card-title">Statistics</h3> <h3 class="card-title">Statistics</h3>
</div> </div>
@ -50,7 +50,7 @@
<p>{% if domain_count > 1 %}Domains{% else %}Domain{% endif %}</p> <p>{% if domain_count > 1 %}Domains{% else %}Domain{% endif %}</p>
</div> </div>
<div class="icon"> <div class="icon">
<i class="fa fa-book"></i> <i class="fa-solid fa-book"></i>
</div> </div>
</div> </div>
</div> </div>
@ -63,7 +63,7 @@
<p>{% if user_num > 1 %}Users{% else %}User{% endif %}</p> <p>{% if user_num > 1 %}Users{% else %}User{% endif %}</p>
</div> </div>
<div class="icon"> <div class="icon">
<i class="fa fa-users"></i> <i class="fa-solid fa-users"></i>
</div> </div>
</div> </div>
</a> </a>
@ -79,7 +79,7 @@
<p>{% if history_number > 1 %}Histories{% else %}History{% endif %}</p> <p>{% if history_number > 1 %}Histories{% else %}History{% endif %}</p>
</div> </div>
<div class="icon"> <div class="icon">
<i class="fa fa-calendar"></i> <i class="fa-solid fa-calendar"></i>
</div> </div>
</div> </div>
</a> </a>
@ -93,7 +93,7 @@
<p>Uptime</p> <p>Uptime</p>
</div> </div>
<div class="icon"> <div class="icon">
<i class="fa fa-clock"></i> <i class="fa-solid fa-clock"></i>
</div> </div>
</div> </div>
</a> </a>
@ -104,7 +104,7 @@
</div> </div>
</div> </div>
<div class="col-9"> <div class="col-9">
<div class="card shadow card-outline card-secondary"> <div class="card">
<div class="card-header"> <div class="card-header">
<h3 class="card-title">Recent History</h3> <h3 class="card-title">Recent History</h3>
</div> </div>
@ -139,7 +139,7 @@
{% if history.detailed_msg == "" and history.change_set is none %} {% if history.detailed_msg == "" and history.change_set is none %}
style="visibility: hidden;" style="visibility: hidden;"
{% endif %} value="{{ loop.index0 }}"> {% endif %} value="{{ loop.index0 }}">
&nbsp;Info <i class="fa-solid fa-info-circle"></i>&nbsp;Info
</button> </button>
</td> </td>
</tr> </tr>
@ -153,56 +153,59 @@
{% endif %} {% endif %}
<div class="row"> <div class="row">
<div class="col-12"> <div class="col-12">
<div class="card shadow card-outline card-secondary"> <div class="card">
<div class="card-header"> <div class="card-header">
<div class="nav-tabs-custom"> <div class="nav-tabs-custom">
<ul class="nav nav-tabs" id="custom-content-below-tab" role="tablist"> <ul class="nav nav-tabs card-header-tabs" id="custom-content-below-tab" role="tablist">
<li class="nav-item"> <li class="nav-item">
<a class="nav-link active" href="#tab_{{custom_boxes.order[0]}}" data-toggle="pill" role="tab"> <a class="nav-link active" href="#tab_{{custom_boxes.order[0]}}" data-toggle="pill" role="tab">
Hosted Domains <b>{{custom_boxes.boxes[custom_boxes.order[0]][0]}}</b> Hosted Domains <b>{{custom_boxes.boxes[custom_boxes.order[0]][0]}}</b>
</a> </a>
</li> </li>
{% for boxId in custom_boxes.order[1:] %} {% for boxId in custom_boxes.order[1:] %}
<li class="nav-item" > <li class="nav-item">
<a class="nav-link" href="#tab_{{boxId}}" data-toggle="pill" role="tab">Hosted Domains <b>{{custom_boxes.boxes[boxId][0]}}</b></a> <a class="nav-link" href="#tab_{{boxId}}" data-toggle="pill" role="tab">Hosted Domains <b>{{custom_boxes.boxes[boxId][0]}}</b></a>
</li> </li>
{% endfor %} {% endfor %}
</ul> </ul>
<div class="tab-content"> </div>
{% for boxId in custom_boxes.order %} </div>
<div class="tab-pane fade show" id='tab_{{boxId}}'> <div class="card-body">
<div class="card-header"> <div class="tab-content">
<h3 class="card-title">Hosted Domains <b>{{custom_boxes.boxes[boxId][0]}}</b></h3> {% for boxId in custom_boxes.order %}
{% if show_bg_domain_button %} <div class="tab-pane fade show" id='tab_{{boxId}}'>
<button type="button" class="btn btn-primary refresh-bg-button float-right"> <div class="card-header">
<i class="fas fa-sync"></i> <h3 class="card-title">Hosted Domains <b>{{custom_boxes.boxes[boxId][0]}}</b></h3>
&nbsp;Sync domains {% if show_bg_domain_button %}
</button> <button type="button" class="btn btn-primary refresh-bg-button float-right">
{% endif %} <i class="fa-solid fa-sync"></i>
</div> &nbsp;Sync Domains
<div class="card-body"> </button>
<table id='tbl_domain_list_{{boxId}}' class="table table-bordered table-striped"> {% endif %}
<thead> </div>
<tr> <div class="card-body">
<th>Name</th> <table id='tbl_domain_list_{{boxId}}' class="table table-bordered table-striped">
<th>DNSSEC</th> <thead>
<th>Type</th> <tr>
<th>Serial</th> <th>Name</th>
<th>Master</th> <th>DNSSEC</th>
<th>Account</th> <th>Type</th>
<th>Actions</th> <th>Serial</th>
</tr> <th>Primary</th>
</thead> <th>Account</th>
<tbody> <th>Actions</th>
</tbody> </tr>
</table> </thead>
</div> <tbody>
</div> </tbody>
{% endfor %} </table>
</div>
</div> </div>
{% endfor %}
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
@ -304,117 +307,112 @@
}); });
{% if current_user.role.name in ['Administrator', 'Operator'] or not SETTING.get('dnssec_admins_only') %} {% if current_user.role.name in ['Administrator', 'Operator'] or not SETTING.get('dnssec_admins_only') %}
$(document.body).on("click", ".button_dnssec", function() { $(document.body).on("click", ".button_dnssec", function() {
var domain = $(this).prop('id'); var domain = $(this).prop('id');
getdnssec($SCRIPT_ROOT + '/domain/' + domain + '/dnssec', domain); getdnssec($SCRIPT_ROOT + '/domain/' + domain + '/dnssec', domain);
}); });
$(document.body).on("click", ".button_dnssec_enable", function() { $(document.body).on("click", ".button_dnssec_enable", function() {
var domain = $(this).prop('id'); var domain = $(this).prop('id');
enable_dns_sec($SCRIPT_ROOT + '/domain/' + domain + '/dnssec/enable', '{{ csrf_token() }}'); enable_dns_sec($SCRIPT_ROOT + '/domain/' + domain + '/dnssec/enable', '{{ csrf_token() }}');
});
}); $(document.body).on("click", ".button_dnssec_disable", function() {
$(document.body).on("click", ".button_dnssec_disable", function() {
var domain = $(this).prop('id'); var domain = $(this).prop('id');
enable_dns_sec($SCRIPT_ROOT + '/domain/' + domain + '/dnssec/disable', '{{ csrf_token() }}'); enable_dns_sec($SCRIPT_ROOT + '/domain/' + domain + '/dnssec/disable', '{{ csrf_token() }}');
});
});
{% endif %} {% endif %}
</script> </script>
{% endblock %} {% endblock %}
{% block modals %} {% block modals %}
<div class="modal fade" id="modal_history_info"> <div class="modal fade" id="modal_history_info">
<div class="modal-dialog"> <div class="modal-dialog">
<div class="modal-content"> <div class="modal-content">
<div class="modal-header"> <div class="modal-header">
<button type="button" class="close" data-dismiss="modal" <h4 class="modal-title">History Details</h4>
aria-label="Close"> <button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span> <span aria-hidden="true">&times;</span>
</button> </button>
<h4 class="modal-title">History Details</h4> </div>
</div> <div class="modal-body">
<div class="modal-body"> <div id="modal-info-content">
<div id="modal-info-content"></div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-flat btn-default pull-right"
data-dismiss="modal">Close</button>
</div>
</div> </div>
<!-- /.modal-content --> </div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary float-right" data-dismiss="modal">
Close
</button>
</div>
</div> </div>
<!-- /.modal-dialog --> </div>
</div> </div>
<div class="modal fade modal-primary" id="modal_template">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"
aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
<h4 class="modal-title">Clone to template</h4>
</div>
<div class="modal-body">
<p></p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-flat btn-default pull-left"
id="button_close" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-flat btn-primary" id="button_save">Save</button>
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal-dialog -->
</div>
<!-- /.modal -->
<div class="modal fade" id="modal_dnssec_info">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title">DNSSEC</h4>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<p></p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-flat btn-default pull-right"
data-dismiss="modal">Close</button>
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal-dialog -->
</div>
<!-- /.modal -->
<div class="modal fade" id="modal_bg_reload">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"
aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
<h4 class="modal-title">Sync domains from nameserver</h4>
</div>
<div class="modal-body">
<div class="overlay"> <div class="modal fade modal-primary" id="modal_template">
<div id="modal_bg_reload_content"><i class="fa fa-refresh fa-spin"></i> Update in progress ..</div> <div class="modal-dialog">
</div> <div class="modal-content">
</div> <div class="modal-header">
<div class="modal-footer"> <h4 class="modal-title">Clone to template</h4>
<button type="button" class="btn btn-flat btn-default pull-right" <button type="button" class="close" data-dismiss="modal" aria-label="Close">
data-dismiss="modal">Close</button> <span aria-hidden="true">&times;</span>
</div> </button>
</div> </div>
<!-- /.modal-content --> <div class="modal-body">
<p></p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary float-right" id="button_close" data-dismiss="modal">
Close
</button>
<button type="button" class="btn btn-primary float-right" id="button_save">
Save
</button>
</div>
</div> </div>
<!-- /.modal-dialog --> </div>
</div>
<div class="modal fade" id="modal_dnssec_info">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title">DNSSEC</h4>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<p></p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary float-right" data-dismiss="modal">
Close
</button>
</div>
</div>
</div>
</div>
<div class="modal fade" id="modal_bg_reload">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title">Sync Domains from backend</h4>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<div id="modal_bg_reload_content">
<i class="fa fa-refresh fa-spin"></i> Update in progress ..
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary float-right" data-dismiss="modal">
Close
</button>
</div>
</div>
</div>
</div> </div>
{% endblock %} {% endblock %}

View File

@ -4,9 +4,9 @@
{% macro dnssec(domain) %} {% macro dnssec(domain) %}
{% if domain.dnssec %} {% if domain.dnssec %}
<td><span style="cursor:pointer" class="btn btn-lg btn-success button_dnssec" id="{{ domain.name }}"><i class="fa fa-lock"></i>&nbsp;Enabled</span></td> <td><span style="cursor:pointer" class="badge badge-success button_dnssec" id="{{ domain.name }}"><i class="fa-solid fa-lock"></i>&nbsp;Enabled</span></td>
{% else %} {% else %}
<td><span style="cursor:pointer" class="btn btn-sm btn-danger button_dnssec" id="{{ domain.name }}"><i class="fa fa-unlock-alt"></i>&nbsp;Disabled</span></td> <td><span style="cursor:pointer" class="badge badge-danger button_dnssec" id="{{ domain.name }}"><i class="fa-solid fa-lock-open"></i>&nbsp;Disabled</span></td>
{% endif %} {% endif %}
{% endmacro %} {% endmacro %}
@ -31,30 +31,45 @@
{% macro actions(domain) %} {% macro actions(domain) %}
<td width="6%"> <td width="6%">
<div class="dropdown"> <div class="dropdown">
<button class="btn btn-secondary dropdown-toggle" type="button" id="dropdownMenu" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> <button class="btn btn-primary dropdown-toggle" type="button" id="dropdownMenu" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Options <i class="fa-solid fa-bars"></i>&nbsp;Actions
</button> </button>
<div class="dropdown-menu" aria-labelledby="dropdownMenu"> <div class="dropdown-menu" aria-labelledby="dropdownMenu">
{% if current_user.role.name in ['Administrator', 'Operator'] %} {% if current_user.role.name in ['Administrator', 'Operator'] %}
<button class="dropdown-item btn-success button_template" id="{{ domain.name }}" type="button"> <button class="dropdown-item btn-success button_template" id="{{ domain.name }}" type="button">
<i class="fa fa-clone"></i>&nbsp;Clone to Template <i class="fa-solid fa-clone"></i>&nbsp;Clone to Template
</button> </button>
<button class="dropdown-item btn-success" type="button" onclick="window.location.href='{{ url_for('domain.domain', domain_name=domain.name) }}'"> <button class="dropdown-item btn-success" type="button" onclick="window.location.href='{{ url_for('domain.domain', domain_name=domain.name) }}'">
<i class="fa fa-cog"></i>&nbsp;Manage Domain <i class="fa-solid fa-cog"></i>&nbsp;Manage Domain
</button> </button>
<button class="dropdown-item btn-danger" type="button" onclick="window.location.href='{{ url_for('domain.setting', domain_name=domain.name) }}'"> <button class="dropdown-item btn-danger" type="button" onclick="window.location.href='{{ url_for('domain.setting', domain_name=domain.name) }}'">
<i class="fa fa-cog"></i>&nbsp;Admin Settings <i class="fa-solid fa-cog"></i>&nbsp;Admin Settings
</button> </button>
<button class="dropdown-item btn-primary" type="button" onclick="window.location.href='{{ url_for('domain.changelog', domain_name=domain.name) }}'"> <button class="dropdown-item btn-primary" type="button" onclick="window.location.href='{{ url_for('domain.changelog', domain_name=domain.name) }}'">
<i class="fa fa-history" aria-hidden="true"></i>&nbsp;Domain Changelog <i class="fa-solid fa-history" aria-hidden="true"></i>&nbsp;Domain Changelog
</button> </button>
<div class="dropdown-divider"></div>
<button type="button"class="dropdown-item btn-secondary button_delete" onclick="window.location.href='{{ url_for('domain.remove') }}'">
<font color="red">
<i class="fa-solid fa-trash"></i>&nbsp;Remove Domain
</font>
</button>
</div>
{% else %} {% else %}
<button class="dropdown-item btn-success" type="button" onclick="window.location.href='{{ url_for('domain.domain', domain_name=domain.name) }}'"> <button class="dropdown-item btn-success" type="button" onclick="window.location.href='{{ url_for('domain.domain', domain_name=domain.name) }}'">
<i class="fa fa-cog"></i>&nbsp;Manage Domain <i class="fa-solid fa-cog"></i>&nbsp;Manage Domain
</button> </button>
{% if allow_user_view_history %} {% if allow_user_view_history %}
<button class="dropdown-item btn-primary" type="button" onclick="window.location.href='{{ url_for('domain.changelog', domain_name=domain.name) }}'"> <button class="dropdown-item btn-primary" type="button" onclick="window.location.href='{{ url_for('domain.changelog', domain_name=domain.name) }}'">
<i class="fa fa-history" aria-hidden="true"></i>&nbsp;Domain Changelog <i class="fa-solid fa-history" aria-hidden="true"></i>&nbsp;Domain Changelog
</button>
{% endif %}
{% if allow_user_remove_domain %}
<div class="dropdown-divider"></div>
<button type="button"class="dropdown-item btn-secondary button_delete" onclick="window.location.href='{{ url_for('domain.remove') }}'">
<font color="red">
<i class="fa-solid fa-trash"></i>&nbsp;Remove Domain
</font>
</button> </button>
{% endif %} {% endif %}
{% endif %} {% endif %}

View File

@ -33,30 +33,30 @@
<div class="col-12"> <div class="col-12">
<div class="card"> <div class="card">
<div class="card-header"> <div class="card-header">
{% if domain.type != 'Secondary' %} {% if domain.type != 'Slave' %}
<button type="button" style="position: relative; margin-left: 20px" class="btn btn-primary float-left button_add_record" id="{{ domain.name }}"> <button type="button" style="position: relative; margin-left: 20px" class="btn btn-primary float-left button_add_record" id="{{ domain.name }}">
<i class="fas fa-plus"></i> <i class="fa-solid fa-plus"></i>
&nbsp;Add Record &nbsp;Add Record
</button> </button>
<button type="button" style="position: relative; margin-left: 20px" class="btn btn-primary float-right button_apply_changes" id="{{ domain.name }}" value="{{ domain.serial }}"> <button type="button" style="position: relative; margin-left: 20px" class="btn btn-primary float-right button_apply_changes" id="{{ domain.name }}" value="{{ domain.serial }}">
<i class="fas fa-save"></i> <i class="fa-solid fa-save"></i>
&nbsp;Apply Changes &nbsp;Apply Changes
</button> </button>
{% else %} {% else %}
<button type="button" style="position: relative; margin-left: 20px" class="btn btn-primary float-left button_update_from_primary" id="{{ domain.name }}"> <button type="button" style="position: relative; margin-left: 20px" class="btn btn-primary float-left button_update_from_primary" id="{{ domain.name }}">
<i class="fas fa-download"></i> <i class="fa-solid fa-sync"></i>
&nbsp;Update from Primary &nbsp;Update from Primary
</button> </button>
{% endif %} {% endif %}
{% if current_user.role.name in ['Administrator', 'Operator'] %} {% if current_user.role.name in ['Administrator', 'Operator'] %}
<button type="button" style="position: relative; margin-left: 20px" class="btn btn-primary float-left btn-danger" onclick="window.location.href='{{ url_for('domain.setting', domain_name=domain.name) }}'"> <button type="button" style="position: relative; margin-left: 20px" class="btn btn-primary float-left btn-danger" onclick="window.location.href='{{ url_for('domain.setting', domain_name=domain.name) }}'">
<i class="fas fa-cog"></i> <i class="fa-solid fa-toolbox"></i>
&nbsp;Admin &nbsp;Admin
</button> </button>
{% endif %} {% endif %}
{% if current_user.role.name in ['Administrator', 'Operator'] or SETTING.get('allow_user_view_history') %} {% if current_user.role.name in ['Administrator', 'Operator'] or SETTING.get('allow_user_view_history') %}
<button type="button" style="position: relative; margin-left: 20px" class="btn btn-primary button_changelog" id="{{ domain.name }}"> <button type="button" style="position: relative; margin-left: 20px" class="btn btn-primary button_changelog" id="{{ domain.name }}">
<i class="fas fa-history" aria-hidden="true"></i> <i class="fa-solid fa-history" aria-hidden="true"></i>
&nbsp;Changelog &nbsp;Changelog
</button> </button>
{% endif %} {% endif %}
@ -70,7 +70,7 @@
<th>Status</th> <th>Status</th>
<th>TTL</th> <th>TTL</th>
<th>Data</th> <th>Data</th>
{% if domain.type != 'Secondary' %} {% if domain.type != 'Slave' %}
<th>Comment</th> <th>Comment</th>
<th>Edit</th> <th>Edit</th>
<th>Delete</th> <th>Delete</th>
@ -95,23 +95,25 @@
<td width="6%"> <td width="6%">
{% if record.is_allowed_edit() %} {% if record.is_allowed_edit() %}
<button type="button" class="btn btn-warning button_edit"> <button type="button" class="btn btn-warning button_edit">
<i class="fa fa-edit"></i> <i class="fa-solid fa-edit"></i>
</button> </button>
{% else %} {% else %}
<button type="button" class="btn btn-warning"> <button type="button" class="btn btn-warning">
<i class="fa fa-exclamation-circle"></i> <i class="fa-solid fa-exclamation-circle"></i>
</button> </button>
{% endif %} {% endif %}
</td> </td>
<td width="6%"> <td width="6%">
{% if record.is_allowed_delete() %} {% if record.is_allowed_delete() %}
<button type="button" class="btn btn-danger button_delete"><i class="fa fa-trash"></i></button> <button type="button" class="btn btn-danger button_delete">
<i class="fa-solid fa-trash"></i>
</button>
{% endif %} {% endif %}
</td> </td>
{% if current_user.role.name in ['Administrator', 'Operator'] or SETTING.get('allow_user_view_history') %} {% if current_user.role.name in ['Administrator', 'Operator'] or SETTING.get('allow_user_view_history') %}
<td width="6%"> <td width="6%">
<button type="button" onclick="show_record_changelog('{{record.name}}','{{record.type}}',event)" class="btn btn-primary"> <button type="button" onclick="show_record_changelog('{{record.name}}','{{record.type}}',event)" class="btn btn-primary">
<i class="fa fa-history" aria-hidden="true"></i> <i class="fa-solid fa-history" aria-hidden="true"></i>
</button> </button>
</td> </td>
{% endif %} {% endif %}
@ -171,7 +173,7 @@
// hidden column so that we can add new records on top // hidden column so that we can add new records on top
// regardless of whatever sorting is done. See orderFixed // regardless of whatever sorting is done. See orderFixed
visible: false, visible: false,
{% if domain.type != 'Secondary' %} {% if domain.type != 'Slave' %}
{% if current_user.role.name in ['Administrator', 'Operator'] or SETTING.get('allow_user_view_history') %} {% if current_user.role.name in ['Administrator', 'Operator'] or SETTING.get('allow_user_view_history') %}
targets: [ 9 ] targets: [ 9 ]
{% else %} {% else %}
@ -186,7 +188,7 @@
targets: [ 4, 5 ] targets: [ 4, 5 ]
} }
], ],
{% if domain.type != 'Secondary' %} {% if domain.type != 'Slave' %}
{% if current_user.role.name in ['Administrator', 'Operator'] or SETTING.get('allow_user_view_history') %} {% if current_user.role.name in ['Administrator', 'Operator'] or SETTING.get('allow_user_view_history') %}
"orderFixed": [[9, 'asc']] "orderFixed": [[9, 'asc']]
{% else %} {% else %}
@ -229,7 +231,7 @@
}); });
}); });
// handle edit button and record click // handle edit button and record click
{% if domain.type != 'Secondary' %} {% if domain.type != 'Slave' %}
$(document.body).on("click", ".button_edit{% if quick_edit %}, .row_record{% endif %}", function(e) { $(document.body).on("click", ".button_edit{% if quick_edit %}, .row_record{% endif %}", function(e) {
e.stopPropagation(); e.stopPropagation();
if ($(this).is('tr')) { if ($(this).is('tr')) {
@ -296,9 +298,9 @@
// add new row // add new row
var default_type = records_allow_edit[0] var default_type = records_allow_edit[0]
{% if current_user.role.name in ['Administrator', 'Operator'] or SETTING.get('allow_user_view_history') %} {% if current_user.role.name in ['Administrator', 'Operator'] or SETTING.get('allow_user_view_history') %}
var nRow = jQuery('#tbl_records').dataTable().fnAddData(['', default_type, 'Active', window.ttl_options[0][0], '', '', '', '', '', '0']); var nRow = jQuery('#tbl_records').dataTable().fnAddData(['', default_type, 'Active', window.ttl_options[0][0], '', '', '', '', '', '0']);
{% else %} {% else %}
var nRow = jQuery('#tbl_records').dataTable().fnAddData(['', default_type, 'Active', window.ttl_options[0][0], '', '', '', '', '0']); var nRow = jQuery('#tbl_records').dataTable().fnAddData(['', default_type, 'Active', window.ttl_options[0][0], '', '', '', '', '0']);
{% endif %} {% endif %}
editRow($("#tbl_records").DataTable(), nRow); editRow($("#tbl_records").DataTable(), nRow);
document.getElementById("edit-row-focus").focus(); document.getElementById("edit-row-focus").focus();
@ -563,11 +565,16 @@
} }
}); });
{% endif %} {% endif %}
window.onload = function() {
document.getElementById("loading-spinner").style.display = "none";
}
</script> </script>
{% endblock %} {% endblock %}
{% block modals %} {% block modals %}
<div class="modal fade modal-warning" id="modal_delete"> <div class="modal fade" id="modal_delete">
<div class="modal-dialog"> <div class="modal-dialog">
<div class="modal-content"> <div class="modal-content">
<div class="modal-header"> <div class="modal-header">
@ -580,14 +587,18 @@
<p></p> <p></p>
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<button type="button" class="btn btn-primary pull-left" id="button_delete_cancel" data-dismiss="modal">Close</button> <button type="button" class="btn btn-secondary pull-left" id="button_delete_cancel" data-dismiss="modal">
<button type="button" class="btn btn-danger" id="button_delete_confirm">Delete</button> <i class="fa-solid fa-window-close"></i>&nbsp;Close
</button>
<button type="button" class="btn btn-danger" id="button_delete_confirm">
<i class="fa-solid fa-trash"></i>&nbsp;Delete
</button>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div class="modal fade modal-primary" id="modal_apply_changes"> <div class="modal fade" id="modal_apply_changes">
<div class="modal-dialog"> <div class="modal-dialog">
<div class="modal-content"> <div class="modal-content">
<div class="modal-header"> <div class="modal-header">
@ -600,14 +611,18 @@
<p></p> <p></p>
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<button type="button" class="btn btn-primary" data-dismiss="modal">Close</button> <button type="button" class="btn btn-secondary" data-dismiss="modal">
<button type="button" class="btn btn-success" id="button_apply_confirm">Apply</button> <i class="fa-solid fa-window-close"></i>&nbsp;Close
</button>
<button type="button" class="btn btn-success" id="button_apply_confirm">
<i class="fa-solid fa-save"></i>&nbsp;Apply Changes
</button>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div class="modal fade modal-primary" id="modal_custom_record"> <div class="modal fade bg-primary" id="modal_custom_record">
<div class="modal-dialog"> <div class="modal-dialog">
<div class="modal-content"> <div class="modal-content">
<div class="modal-header"> <div class="modal-header">
@ -620,7 +635,12 @@
<p></p> <p></p>
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<button type="button" class="btn btn-primary" id="button_save">Save</button> <button type="button" class="btn btn-secondary" data-dismiss="modal">
<i class="fa-solid fa-window-close"></i>&nbsp;Close
</button>
<button type="button" class="btn btn-success" id="button_save">
<i class="fa-solid fa-save"></i>&nbsp;Save
</button>
</div> </div>
</div> </div>
</div> </div>

View File

@ -34,8 +34,8 @@
<div class="container-fluid"> <div class="container-fluid">
<div class="row"> <div class="row">
<div class="col-4"> <div class="col-4">
<div class="card shadow card-outline card-secondary"> <div class="card">
<div class="card-header with-border"> <div class="card-header">
<h3 class="card-title">Create new domain</h3> <h3 class="card-title">Create new domain</h3>
</div> </div>
<form role="form" method="post" action="{{ url_for('domain.add') }}"> <form role="form" method="post" action="{{ url_for('domain.add') }}">
@ -118,19 +118,19 @@
</div> </div>
</div> </div>
<div class="card-footer"> <div class="card-footer">
<button type="submit" class="btn btn-primary"> <button type="button" class="btn btn-secondary" onclick="window.location.href='{{ url_for('dashboard.dashboard') }}'">
Submit <i class="fa-solid fa-window-close"></i>&nbsp;Cancel
</button> </button>
<button type="button" class="btn btn-default" onclick="window.location.href='{{ url_for('dashboard.dashboard') }}'"> <button type="submit" class="btn btn-primary float-right">
Cancel <i class="fa-solid fa-save"></i>&nbsp;Create
</button> </button>
</div> </div>
</form> </form>
</div> </div>
</div> </div>
<div class="col-8"> <div class="col-8">
<div class="card shadow card-outline card-secondary"> <div class="card">
<div class="card-header with-border"> <div class="card-header">
<h3 class="card-title">Help with creating a new domain</h3> <h3 class="card-title">Help with creating a new domain</h3>
</div> </div>
<div class="card-body"> <div class="card-body">
@ -218,18 +218,18 @@
<div class="modal-dialog"> <div class="modal-dialog">
<div class="modal-content modal-sm"> <div class="modal-content modal-sm">
<div class="modal-header alert-danger"> <div class="modal-header alert-danger">
<button type="button" class="close" data-dismiss="modal" aria-label="Close" id="button_close_warn_modal">
<span aria-hidden="true">&times;</span>
</button>
<h4 class="modal-title"> <h4 class="modal-title">
WARNING WARNING
</h4> </h4>
<button type="button" class="close" data-dismiss="modal" aria-label="Close" id="button_close_warn_modal">
<span aria-hidden="true">&times;</span>
</button>
</div> </div>
<div class="modal-body"> <div class="modal-body">
<p></p> <p></p>
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<button type="button" class="btn btn-flat btn-primary center-block" data-dismiss="modal" id="button_confirm_warn_modal"> <button type="button" class="btn btn-primary center-block" data-dismiss="modal" id="button_confirm_warn_modal">
CLOSE CLOSE
</button> </button>
</div> </div>

View File

@ -39,9 +39,9 @@
<div class="col-12"> <div class="col-12">
<div class="card"> <div class="card">
<div class="card-body"> <div class="card-body">
<button type="button" class="btn btn-primary pull-left button_show_records" id="{{ domain.name }}"> <button type="button" class="btn btn-primary float-left button_show_records" id="{{ domain.name }}">
<i class="fas fa-arrow-left"></i> <i class="fa-solid fa-arrow-left"></i>
&nbsp;Manage &nbsp;Manage Domain {{ domain.name }}
</button> </button>
</div> </div>
<div class="card-body"> <div class="card-body">

View File

@ -34,9 +34,9 @@
<div class="container-fluid"> <div class="container-fluid">
<div class="row"> <div class="row">
<div class="col-4"> <div class="col-4">
<div class="card shadow card-outline card-secondary"> <div class="card">
<div class="card-header"> <div class="card-header">
<h3 class="card-title">Remove domain</h3> <h3 class="card-title">Remove Domain</h3>
</div> </div>
<form role="form" method="post" action="{{ url_for('domain.remove') }}"> <form role="form" method="post" action="{{ url_for('domain.remove') }}">
<input type="hidden" name="_csrf_token" value="{{ csrf_token() }}"> <input type="hidden" name="_csrf_token" value="{{ csrf_token() }}">
@ -50,23 +50,25 @@
<br /> <br />
</div> </div>
<div class="card-footer"> <div class="card-footer">
<button type="button" class="btn btn-default" onclick="window.location.href='{{ url_for('dashboard.dashboard') }}'"> <button type="button" class="btn btn-secondary" onclick="window.location.href='{{ url_for('dashboard.dashboard') }}'">
Cancel <i class="fa-solid fa-window-close"></i>&nbsp;Cancel
</button>
<button type="button" class="btn btn-danger button_delete float-right">
<i class="fa-solid fa-trash-alt"></i>&nbsp;Remove
</button> </button>
<button type="button" class="btn btn-danger button_delete float-right">Remove</button>
</div> </div>
</form> </form>
</div> </div>
</div> </div>
<div class="col-8"> <div class="col-8">
<div class="card shadow card-outline card-secondary"> <div class="card">
<div class="card-header"> <div class="card-header">
<h3 class="card-title">Help with removing a new domain</h3> <h3 class="card-title">Help with removing a domain</h3>
</div> </div>
<div class="card-body"> <div class="card-body">
<dl class="dl-horizontal"> <dl class="dl-horizontal">
<dt>Domain name</dt> <dt>Domain Name</dt>
<dd>Select domain you wish to remove from DNS.</dd> <dd>Select the domain you wish to remove from the system.</dd>
</dl> </dl>
<p>Find more details at <a href="https://docs.powerdns.com/md/">https://docs.powerdns.com/md/</a></p> <p>Find more details at <a href="https://docs.powerdns.com/md/">https://docs.powerdns.com/md/</a></p>
</div> </div>
@ -122,11 +124,11 @@
<p></p> <p></p>
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<button type="button" class="btn btn-default" id="button_delete_cancel" data-dismiss="modal"> <button type="button" class="btn btn-secondary" id="button_delete_cancel" data-dismiss="modal">
Close <i class="fa-solid fa-window-close"></i>&nbsp;Cancel
</button> </button>
<button type="button" class="btn btn-danger float-right" id="button_delete_confirm"> <button type="button" class="btn btn-danger float-right" id="button_delete_confirm">
Delete <i class="fa-solid fa-trash-alt"></i>&nbsp;Remove
</button> </button>
</div> </div>
</div> </div>

View File

@ -83,8 +83,10 @@
<div class="card-body"> <div class="card-body">
<div class="col-offset-2"> <div class="col-offset-2">
<div class="form-group"> <div class="form-group">
<button type="submit" class="btn btn-primary"><i class="fa fa-check"></i> <button type="submit" class="btn btn-primary">
Save</button> <i class="fa-solid fa-check"></i>
Save
</button>
</div> </div>
</div> </div>
</div> </div>
@ -114,7 +116,7 @@
{% endfor %} {% endfor %}
</select><br /> </select><br />
<button type="submit" class="btn btn-flat btn-primary" id="change_soa_edit_api"> <button type="submit" class="btn btn-flat btn-primary" id="change_soa_edit_api">
<i class="fa fa-check"></i>&nbsp;Change account for {{ domain.name | pretty_domain_name }} <i class="fa-solid fa-check"></i>&nbsp;Change account for {{ domain.name | pretty_domain_name }}
</button> </button>
</form> </form>
</div> </div>
@ -193,7 +195,7 @@
placeholder="Enter valid Primary Server IP addresses (separated by commas)"> placeholder="Enter valid Primary Server IP addresses (separated by commas)">
</div> </div>
<button type="submit" class="btn btn-primary" id="change_type"> <button type="submit" class="btn btn-primary" id="change_type">
<i class="fa fa-check"></i>&nbsp;Change type for {{ domain.name | pretty_domain_name }} <i class="fa-solid fa-check"></i>&nbsp;Change type for {{ domain.name | pretty_domain_name }}
</button> </button>
</form> </form>
</div> </div>
@ -236,7 +238,7 @@
<option>OFF</option> <option>OFF</option>
</select><br /> </select><br />
<button type="submit" class="btn btn-primary" id="change_soa_edit_api"> <button type="submit" class="btn btn-primary" id="change_soa_edit_api">
<i class="fa fa-check"></i>&nbsp;Change SOA-EDIT-API setting for {{ domain.name | pretty_domain_name }} <i class="fa-solid fa-check"></i>&nbsp;Change SOA-EDIT-API setting for {{ domain.name | pretty_domain_name }}
</button> </button>
</form> </form>
</div> </div>
@ -253,9 +255,9 @@
<p>This function is used to remove a domain from PowerDNS-Admin <b>AND</b> PowerDNS. All records and <p>This function is used to remove a domain from PowerDNS-Admin <b>AND</b> PowerDNS. All records and
user privileges associated with this domain will also be removed. This change cannot be user privileges associated with this domain will also be removed. This change cannot be
reverted.</p> reverted.</p>
<button type="button" class="btn btn-danger pull-left delete_domain" <button type="button" class="btn btn-danger float-left delete_domain"
id="{{ domain.name }}"> id="{{ domain.name }}">
<i class="fa fa-trash"></i>&nbsp;DELETE DOMAIN {{ domain.name | pretty_domain_name }} <i class="fa-solid fa-trash"></i>&nbsp;DELETE DOMAIN {{ domain.name | pretty_domain_name }}
</button> </button>
</div> </div>
</div> </div>
@ -370,26 +372,24 @@
</script> </script>
{% endblock %} {% endblock %}
{% block modals %} {% block modals %}
<div class="modal fade modal-warning" id="modal_delete_domain"> <div class="modal fade" id="modal_delete_domain">
<div class="modal-dialog"> <div class="modal-dialog">
<div class="modal-content"> <div class="modal-content">
<div class="modal-header"> <div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"> <h4 class="modal-title">Confirmation</h4>
<span aria-hidden="true">&times;</span> <button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button> </button>
<h4 class="modal-title">Confirmation</h4>
</div> </div>
<div class="modal-body"> <div class="modal-body">
<p></p> <p></p>
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<button type="button" class="btn btn-flat btn-default pull-left" data-dismiss="modal">Close</button> <button type="button" class="btn btn-secondary float-left" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-flat btn-danger" id="button_delete_confirm"> <button type="button" class="btn btn-danger" id="button_delete_confirm">
Delete</button> Delete</button>
</div> </div>
</div> </div>
<!-- /.modal-content -->
</div> </div>
<!-- /.modal-dialog -->
</div> </div>
{% endblock %} {% endblock %}

View File

@ -8,7 +8,6 @@
<!-- Tell the browser to be responsive to screen width --> <!-- Tell the browser to be responsive to screen width -->
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport"> <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
<META HTTP-EQUIV="REFRESH" CONTENT="{{ 60 * SETTING.get('session_timeout') }}"> <META HTTP-EQUIV="REFRESH" CONTENT="{{ 60 * SETTING.get('session_timeout') }}">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.9.0/css/all.min.css">
{% assets "css_login" -%} {% assets "css_login" -%}
<link rel="stylesheet" href="{{ ASSET_URL }}"> <link rel="stylesheet" href="{{ ASSET_URL }}">
{%- endassets %} {%- endassets %}
@ -103,25 +102,25 @@
{% endif %} {% endif %}
{% if SETTING.get('oidc_oauth_enabled') %} {% if SETTING.get('oidc_oauth_enabled') %}
<a href="{{ url_for('index.oidc_login') }}" class="btn btn-block btn-social btn-openid btn-flat"> <a href="{{ url_for('index.oidc_login') }}" class="btn btn-block btn-social btn-openid btn-flat">
<i class="fa fa-openid"></i> <i class="fa-brands fa-openid"></i>
Sign in using OpenID Connect Sign in using OpenID Connect
</a> </a>
{% endif %} {% endif %}
{% if SETTING.get('github_oauth_enabled') %} {% if SETTING.get('github_oauth_enabled') %}
<a href="{{ url_for('index.github_login') }}" class="btn btn-block btn-social btn-github btn-flat"> <a href="{{ url_for('index.github_login') }}" class="btn btn-block btn-social btn-github btn-flat">
<i class="fa fa-github"></i> <i class="fa-brands fa-github"></i>
Sign in using Github Sign in using Github
</a> </a>
{% endif %} {% endif %}
{% if SETTING.get('google_oauth_enabled') %} {% if SETTING.get('google_oauth_enabled') %}
<a href="{{ url_for('index.google_login') }}" class="btn btn-block btn-social btn-google btn-flat"> <a href="{{ url_for('index.google_login') }}" class="btn btn-block btn-social btn-google btn-flat">
<i class="fa fa-google"></i> <i class="fa-brands fa-google"></i>
Sign in using Google Sign in using Google
</a> </a>
{% endif %} {% endif %}
{% if SETTING.get('azure_oauth_enabled') %} {% if SETTING.get('azure_oauth_enabled') %}
<a href="{{ url_for('index.azure_login') }}" class="btn btn-block btn-social btn-microsoft btn-flat"> <a href="{{ url_for('index.azure_login') }}" class="btn btn-block btn-social btn-microsoft btn-flat">
<i class="fa fa-windows"></i> <i class="fa-brands fa-windows"></i>
Sign in using Microsoft Azure Sign in using Microsoft Azure
</a> </a>
{% endif %} {% endif %}

View File

@ -34,11 +34,11 @@
</div> </div>
{% endif %} {% endif %}
<p class="login-box-msg">Enter your personal details below</p> <p class="login-box-msg">Enter your personal details below</p>
<form action="{{ url_for('index.register') }}" method="post" novalidate> <form action="{{ url_for('index.register') }}" method="post" validator>
<input type="hidden" name="_csrf_token" value="{{ csrf_token() }}"> <input type="hidden" name="_csrf_token" value="{{ csrf_token() }}">
<div class="form-group"> <div class="form-group">
<div class="input-group mb-3"> <div class="input-group">
<div class="input-group-prepend"> <div class="input-group-prepend">
<span class="input-group-text"> <span class="input-group-text">
<i class="fas fa-user"></i> <i class="fas fa-user"></i>
@ -55,7 +55,7 @@
</div> </div>
<div class="form-group"> <div class="form-group">
<div class="input-group mb-3"> <div class="input-group">
<div class="input-group-prepend"> <div class="input-group-prepend">
<span class="input-group-text"> <span class="input-group-text">
<i class="fas fa-user"></i> <i class="fas fa-user"></i>
@ -72,7 +72,7 @@
</div> </div>
<div class="form-group"> <div class="form-group">
<div class="input-group mb-3"> <div class="input-group">
<div class="input-group-prepend"> <div class="input-group-prepend">
<span class="input-group-text"> <span class="input-group-text">
<i class="fas fa-envelope"></i> <i class="fas fa-envelope"></i>
@ -91,7 +91,7 @@
<p class="login-box-msg">Enter your account details below</p> <p class="login-box-msg">Enter your account details below</p>
<div class="form-group"> <div class="form-group">
<div class="input-group mb-3"> <div class="input-group">
<div class="input-group-prepend"> <div class="input-group-prepend">
<span class="input-group-text"> <span class="input-group-text">
<i class="fas fa-user"></i> <i class="fas fa-user"></i>
@ -108,7 +108,7 @@
</div> </div>
<div class="form-group"> <div class="form-group">
<div class="input-group mb-3"> <div class="input-group">
<div class="input-group-prepend"> <div class="input-group-prepend">
<span class="input-group-text"> <span class="input-group-text">
<i class="fas fa-lock"></i> <i class="fas fa-lock"></i>
@ -125,7 +125,7 @@
</div> </div>
<div class="form-group"> <div class="form-group">
<div class="input-group mb-3"> <div class="input-group">
<div class="input-group-prepend"> <div class="input-group-prepend">
<span class="input-group-text"> <span class="input-group-text">
<i class="fas fa-lock"></i> <i class="fas fa-lock"></i>
@ -145,7 +145,7 @@
<p class="login-box-msg">Please complete the CAPTCHA below</p> <p class="login-box-msg">Please complete the CAPTCHA below</p>
<div class="form-group"> <div class="form-group">
{{ captcha() }} {{ captcha() }}
<div class="input-group mb-3"> <div class="input-group">
<div class="input-group-prepend"> <div class="input-group-prepend">
<span class="input-group-text"> <span class="input-group-text">
<i class="fas fa-shield-alt"></i> <i class="fas fa-shield-alt"></i>
@ -164,7 +164,7 @@
<div class="row"> <div class="row">
<div class="d-flex justify-content-between mx-auto mt-3"> <div class="d-flex justify-content-between mx-auto mt-3">
<button type="button" class="btn btn-secondary" id="button_back">Back</button> <button type="button" class="btn btn-secondary" id="button_back">Back</button>
<button type="submit" class="btn btn-primary mx-3">Register</button> <button type="submit" class="btn btn-primary btn-block mx-3">Register</button>
</div> </div>
</div> </div>
</form> </form>

View File

@ -69,7 +69,7 @@
</div> </div>
<div class="row"> <div class="row">
<div class="col-xs-4"> <div class="col-xs-4">
<button type="submit" class="btn btn-flat btn-primary btn-block">Continue</button> <button type="submit" class="btn btn-primary btn-block">Continue</button>
</div> </div>
</div> </div>
</form> </form>

View File

@ -41,7 +41,7 @@
<div class="alert alert-danger alert-dismissible"> <div class="alert alert-danger alert-dismissible">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button> <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
<h4> <h4>
<i class="icon fa fa-ban"></i> Error! <i class="fa-solid fa-ban"></i> Error!
</h4> </h4>
<div class="alert-message block-message error"> <div class="alert-message block-message error">
<a class="close" href="#">x</a> <a class="close" href="#">x</a>
@ -58,12 +58,12 @@
{% endwith %} {% endwith %}
<div class="row"> <div class="row">
<div class="col-12"> <div class="col-12">
<div class="card shadow card-outline card-secondary"> <div class="card">
<div class="card-header"> <div class="card-header">
<h3 class="card-title">Templates</h3> <h3 class="card-title">Templates</h3>
<a href="{{ url_for('admin.create_template') }}"> <a href="{{ url_for('admin.create_template') }}">
<button type="button" class="btn btn-primary float-right"> <button type="button" class="btn btn-primary float-right">
<i class="fa fa-plus"></i>&nbsp;Create Template <i class="fa-solid fa-plus"></i>&nbsp;Create Template
</button> </button>
</a> </a>
</div> </div>
@ -74,7 +74,7 @@
<th>Name</th> <th>Name</th>
<th>Description</th> <th>Description</th>
<th>Number of Records</th> <th>Number of Records</th>
<th width="20%">Action</th> <th width="20%">Actions</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@ -92,14 +92,22 @@
{{ template.records|count }} {{ template.records|count }}
</td> </td>
<td> <td>
<a href="{{ url_for('admin.edit_template', template=template.name) }}"> <div class="dropdown">
<button type="button" class="btn btn-warning button_edit" id="btn_edit"> <button class="btn btn-primary dropdown-toggle" type="button" id="dropdownMenu" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<i class="fa fa-edit"></i>&nbsp;Edit <i class="fa-solid fa-bars"></i>&nbsp;Actions
</button> </button>
</a> <div class="dropdown-menu" aria-labelledby="dropdownMenu">
<button type="button" class="btn btn-danger button_delete" id="{{template.name}}"> <button type="button" class="dropdown-item btn-warning" onclick="window.location.href='{{ url_for('admin.edit_template', template=template.name) }}'">
<i class="fa fa-trash"></i>&nbsp;Delete <i class="fa-solid fa-edit"></i>&nbsp;Edit Template
</button> </button>
<div class="dropdown-divider"></div>
<button type="button"class="dropdown-item btn-secondary button_delete" id="{{template.name}}">
<font color="red">
<i class="fa-solid fa-trash"></i>&nbsp;Delete Template
</font>
</button>
</div>
</div>
</td> </td>
</tr> </tr>
{% endfor %} {% endfor %}

View File

@ -39,7 +39,7 @@
<div class="alert alert-danger alert-dismissible"> <div class="alert alert-danger alert-dismissible">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button> <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
<h4> <h4>
<i class="icon fa fa-ban"></i> Error! <i class="fa-solid fa-ban"></i> Error!
</h4> </h4>
<div class="alert-message block-message error"> <div class="alert-message block-message error">
<a class="close" href="#">x</a> <a class="close" href="#">x</a>
@ -55,8 +55,8 @@
{% endwith %} {% endwith %}
<div class="row"> <div class="row">
<div class="col-4"> <div class="col-4">
<div class="card card-primary"> <div class="card">
<div class="card-header with-border"> <div class="card-header">
<h3 class="card-title">Create new template</h3> <h3 class="card-title">Create new template</h3>
</div> </div>
<form role="form" method="post" action="{{ url_for('admin.create_template') }}"> <form role="form" method="post" action="{{ url_for('admin.create_template') }}">
@ -72,16 +72,19 @@
</div> </div>
</div> </div>
<div class="card-footer"> <div class="card-footer">
<button type="submit" class="btn btn-primary">Submit</button> <button type="button" class="btn btn-secondary float-left" onclick="window.location.href='{{ url_for('admin.templates') }}'">
<button type="button" class="btn btn-default" Cancel
onclick="window.location.href='{{ url_for('admin.templates') }}'">Cancel</button> </button>
<button type="submit" class="btn btn-primary float-right">
<i class="fa-solid fa-save"></i>&nbsp;Save
</button>
</div> </div>
</form> </form>
</div> </div>
</div> </div>
<div class="col-8"> <div class="col-8">
<div class="card card-primary"> <div class="card">
<div class="card-header with-border"> <div class="card-header">
<h3 class="card-title">Help with creating a new template</h3> <h3 class="card-title">Help with creating a new template</h3>
</div> </div>
<div class="card-body"> <div class="card-body">

View File

@ -39,11 +39,11 @@
<h3 class="card-title">Manage Template Records for {{ template }}</h3> <h3 class="card-title">Manage Template Records for {{ template }}</h3>
</div> </div>
<div class="card-body"> <div class="card-body">
<button type="button" class="btn btn-primary pull-left button_add_record" id="{{ template }}"> <button type="button" class="btn btn-primary float-left button_add_record" id="{{ template }}">
<i class="fa fa-plus"></i>&nbsp;Add Record <i class="fa-solid fa-plus"></i>&nbsp;Add Record
</button> </button>
<button type="button" class="btn btn-primary pull-right button_apply_changes" id="{{ template }}"> <button type="button" class="btn btn-primary float-right button_apply_changes" id="{{ template }}">
<i class="fa fa-save"></i>&nbsp;Apply Changes <i class="fa-solid fa-save"></i>&nbsp;Save Changes
</button> </button>
</div> </div>
<div class="card-body"> <div class="card-body">
@ -84,12 +84,12 @@
</td> </td>
<td width="6%"> <td width="6%">
<button type="button" class="btn btn-warning button_edit"> <button type="button" class="btn btn-warning button_edit">
<i class="fa fa-edit"></i>&nbsp;Edit <i class="fa-solid fa-edit"></i>&nbsp;Edit
</button> </button>
</td> </td>
<td width="6%"> <td width="6%">
<button type="button" class="btn btn-danger button_delete"> <button type="button" class="btn btn-danger button_delete">
<i class="fa fa-trash"></i>&nbsp;Delete <i class="fa-solid fa-trash"></i>&nbsp;Delete
</button> </button>
</td> </td>
<td> <td>
@ -110,8 +110,8 @@
{% block extrascripts %} {% block extrascripts %}
<script> <script>
// superglobals // superglobals
window.records_allow_edit = {{ editable_records|tojson }}; window.records_allow_edit = {{ editable_records | tojson }};
window.ttl_options = {{ ttl_options|tojson }}; window.ttl_options = {{ ttl_options | tojson }};
window.nEditing = null; window.nEditing = null;
window.nNew = false; window.nNew = false;
@ -238,7 +238,7 @@
// add new row // add new row
var default_type = records_allow_edit[0] var default_type = records_allow_edit[0]
var nRow = jQuery('#tbl_records').dataTable().fnAddData(['', default_type, 'Active', 3600, '', '', '', '', '0']); var nRow = jQuery('#tbl_records').dataTable().fnAddData(['', default_type, 'Active', window.ttl_options[0][0], '', '', '', '', '0']);
editRow($("#tbl_records").DataTable(), nRow); editRow($("#tbl_records").DataTable(), nRow);
document.getElementById("edit-row-focus").focus(); document.getElementById("edit-row-focus").focus();
nEditing = nRow; nEditing = nRow;
@ -430,67 +430,67 @@
<div class="modal-dialog"> <div class="modal-dialog">
<div class="modal-content"> <div class="modal-content">
<div class="modal-header"> <div class="modal-header">
<button type="button" class="close" data-dismiss="modal" <h4 class="modal-title">Confirmation</h4>
<button type="button" class="close" data-dismiss="modal"
aria-label="Close"> aria-label="Close">
<span aria-hidden="true">&times;</span> <span aria-hidden="true">&times;</span>
</button> </button>
<h4 class="modal-title">Confirmation</h4>
</div> </div>
<div class="modal-body"> <div class="modal-body">
<p></p> <p></p>
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<button type="button" class="btn btn-flat btn-default pull-left" id="button_delete_cancel" <button type="button" class="btn btn-secondary float-left" id="button_delete_cancel" data-dismiss="modal">
data-dismiss="modal">Close</button> Close
<button type="button" class="btn btn-flat btn-danger" id="button_delete_confirm">Delete</button> </button>
<button type="button" class="btn btn-danger" id="button_delete_confirm">
Delete
</button>
</div> </div>
</div> </div>
<!-- /.modal-content -->
</div> </div>
<!-- /.modal-dialog -->
</div> </div>
<div class="modal fade modal-primary" id="modal_apply_changes"> <div class="modal fade modal-primary" id="modal_apply_changes">
<div class="modal-dialog"> <div class="modal-dialog">
<div class="modal-content"> <div class="modal-content">
<div class="modal-header"> <div class="modal-header">
<button type="button" class="close" data-dismiss="modal" <h4 class="modal-title">Confirmation</h4>
<button type="button" class="close" data-dismiss="modal"
aria-label="Close"> aria-label="Close">
<span aria-hidden="true">&times;</span> <span aria-hidden="true">&times;</span>
</button> </button>
<h4 class="modal-title">Confirmation</h4>
</div> </div>
<div class="modal-body"> <div class="modal-body">
<p></p> <p></p>
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<button type="button" class="btn btn-flat btn-default pull-left" <button type="button" class="btn btn-secondary float-left" data-dismiss="modal">
data-dismiss="modal">Close</button> Close
<button type="button" class="btn btn-flat btn-primary" id="button_apply_confirm">Apply</button> </button>
<button type="button" class="btn btn-primary" id="button_apply_confirm">
Apply
</button>
</div> </div>
</div> </div>
<!-- /.modal-content -->
</div> </div>
<!-- /.modal-dialog -->
</div> </div>
<div class="modal fade modal-primary" id="modal_custom_record"> <div class="modal fade modal-primary" id="modal_custom_record">
<div class="modal-dialog"> <div class="modal-dialog">
<div class="modal-content"> <div class="modal-content">
<div class="modal-header"> <div class="modal-header">
<button type="button" class="close" data-dismiss="modal" <h4 class="modal-title">Custom Record</h4>
<button type="button" class="close" data-dismiss="modal"
aria-label="Close"> aria-label="Close">
<span aria-hidden="true">&times;</span> <span aria-hidden="true">&times;</span>
</button> </button>
<h4 class="modal-title">Custom Record</h4>
</div> </div>
<div class="modal-body"> <div class="modal-body">
<p></p> <p></p>
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<button type="button" class="btn btn-flat btn-primary" id="button_save">Save</button> <button type="button" class="btn btn-primary" id="button_save">Save</button>
</div> </div>
</div> </div>
<!-- /.modal-content -->
</div> </div>
<!-- /.modal-dialog -->
</div> </div>
{% endblock %} {% endblock %}

View File

@ -1,5 +1,7 @@
{% extends "base.html" %} {% extends "base.html" %}
{% set active_page = "user_profile" %}
{% block title %} {% block title %}
<title> <title>
My Profile - {{ SITE_NAME }} My Profile - {{ SITE_NAME }}
@ -31,38 +33,39 @@
<section class="content"> <section class="content">
<div class="container-fluid"> <div class="container-fluid">
<div class="row"> <div class="row">
<div class="col-12"> <div class="col-6">
<div class="card card-primary"> <div class="card">
<div class="card-header with-border"> <div class="card-header">
<h3 class="card-title">
Edit my profile {% if session['authentication_type'] != 'LOCAL' %} [Disabled - Authenticated externally]{% endif %}
</h3>
</div>
<div class="card-body">
<div class="nav-tabs-custom"> <div class="nav-tabs-custom">
<ul class="nav nav-tabs" role="tablist"> <ul class="nav nav-tabs" role="tablist">
<li class="nav-item"> <li class="nav-item">
<a class="nav-link active" href="#tabs-personal" data-toggle="tab">Personal Info</a> <a class="nav-link active" href="#tabs-personal" data-toggle="tab">
Personal Info
</a>
</li> </li>
{% if session['authentication_type'] == 'LOCAL' %} {% if session['authentication_type'] == 'LOCAL' %}
<li class="nav-item"> <li class="nav-item">
<a class="nav-link" href="#tabs-password" data-toggle="tab">Change Password</a> <a class="nav-link" href="#tabs-password" data-toggle="tab">
Change Password
</a>
</li> </li>
{% endif %} {% endif %}
{% if session['authentication_type'] in ['LOCAL', 'LDAP'] %} {% if session['authentication_type'] in ['LOCAL', 'LDAP'] %}
<li class="nav-item"> <li class="nav-item">
<a class="nav-link" href="#tabs-authentication" data-toggle="tab">Authentication</a> <a class="nav-link" href="#tabs-authentication" data-toggle="tab">
Authentication
</a>
</li> </li>
{% endif %} {% endif %}
</ul> </ul>
<div class="card-body">
<div class="tab-content"> <div class="tab-content">
<div class="tab-pane fade show active" id="tabs-personal"> <div class="tab-pane fade show active" id="tabs-personal">
<form role="form" method="post" action="{{ user_profile }}"> <form role="form" method="post" action="{{ user_profile }}">
<input type="hidden" name="_csrf_token" value="{{ csrf_token() }}"> <input type="hidden" name="_csrf_token" value="{{ csrf_token() }}">
<div class="form-group"> <div class="form-group">
<label for="firstname">First Name</label> <label for="firstname">First Name</label>
<input type="text" class="form-control" name="firstname" id="firstname" <input type="text" class="form-control" name="firstname" id="firstname" placeholder="{{ current_user.firstname }}"
placeholder="{{ current_user.firstname }}"
{% if session['authentication_type'] != 'LOCAL' %}disabled{% endif %}> {% if session['authentication_type'] != 'LOCAL' %}disabled{% endif %}>
</div> </div>
<div class="form-group"> <div class="form-group">
@ -71,12 +74,14 @@
{% if session['authentication_type'] != 'LOCAL' %}disabled{% endif %}> {% if session['authentication_type'] != 'LOCAL' %}disabled{% endif %}>
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="email">E-mail</label> <input type="email" class="form-control" name="email" id="email" placeholder="{{ current_user.email }}" <label for="email">E-Mail</label> <input type="email" class="form-control" name="email" id="email" placeholder="{{ current_user.email }}"
{% if session['authentication_type'] != 'LOCAL' %}disabled{% endif %}> {% if session['authentication_type'] != 'LOCAL' %}disabled{% endif %}>
</div> </div>
{% if session['authentication_type'] == 'LOCAL' %} {% if session['authentication_type'] == 'LOCAL' %}
<div class="form-group"> <div class="form-group">
<button type="submit" class="btn btn-primary">Submit</button> <button type="submit" class="btn btn-primary">
<i class="fa-solid fa-floppy-disk"></i>&nbsp;Save
</button>
</div> </div>
{% endif %} {% endif %}
</form> </form>
@ -89,14 +94,17 @@
<form action="{{ user_profile }}" method="post"> <form action="{{ user_profile }}" method="post">
<input type="hidden" name="_csrf_token" value="{{ csrf_token() }}"> <input type="hidden" name="_csrf_token" value="{{ csrf_token() }}">
<div class="form-group"> <div class="form-group">
<label for="password">New Password</label> <input type="password" class="form-control" name="password" id="newpassword"> <label for="password">New Password</label>
<input type="password" class="form-control" name="password" id="newpassword">
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="rpassword">Re-type New Password</label> <label for="rpassword">Re-type New Password</label>
<input type="password" class="form-control" name="rpassword" id="rpassword"> <input type="password" class="form-control" name="rpassword" id="rpassword">
</div> </div>
<div class="form-group"> <div class="form-group">
<button type="submit" class="btn btn-primary">Change Password</button> <button type="submit" class="btn btn-primary">
<i class="fa-solid fa-floppy-disk"></i>&nbsp;Save
</button>
</div> </div>
</form> </form>
{% endif %} {% endif %}
@ -118,17 +126,19 @@
<br /> <br />
<form> <form>
<input type=text id="otp_secret" value={{current_user.otp_secret}} readonly> <input type=text id="otp_secret" value={{current_user.otp_secret}} readonly>
<button type=button style="position:relative; right:28px" onclick="copy_otp_secret_to_clipboard()"> <i class="fa fa-clipboard"></i> </button> <button type=button style="position:relative; right:28px" onclick="copy_otp_secret_to_clipboard()">
<i class="fa-solid fa-clipboard"></i>
</button>
<br /> <br />
<font color="red" id="copy_tooltip" style="visibility:collapse">Copied.</font> <font color="red" id="copy_tooltip" style="visibility:collapse">Copied.</font>
</form> </form>
</div> </div>
You can use Google Authenticator You can use Google Authenticator
(<a target="_blank" href="https://play.google.com/store/apps/details?id=com.google.android.apps.authenticator2">Android</a> (<a target="_blank" href="https://play.google.com/store/apps/details?id=com.google.android.apps.authenticator2"><i class="fa-brands fa-google-play"></i>Android</a>
- <a target="_blank" href="https://apps.apple.com/us/app/google-authenticator/id388497605">iOS</a>) - <a target="_blank" href="https://apps.apple.com/us/app/google-authenticator/id388497605"><i class="fa-brands fa-app-store-ios"></i>iOS</a>)
or FreeOTP or FreeOTP
(<a target="_blank" href="https://play.google.com/store/apps/details?id=org.fedorahosted.freeotp&hl=en">Android</a> (<a target="_blank" href="https://play.google.com/store/apps/details?id=org.fedorahosted.freeotp&hl=en"><i class="fa-brands fa-google-play"></i>Android</a>
- <a target="_blank" href="https://itunes.apple.com/en/app/freeotp-authenticator/id872559395?mt=8">iOS</a>) - <a target="_blank" href="https://itunes.apple.com/en/app/freeotp-authenticator/id872559395?mt=8"><i class="fa-brands fa-app-store-ios"></i>iOS</a>)
on your smartphone to scan the QR code. on your smartphone to scan the QR code.
<br /> <br />
<font color="red"> <font color="red">
@ -153,19 +163,7 @@
</section> </section>
{% endblock %} {% endblock %}
{% block extrascripts %} {% block extrascripts %}
<!-- TODO: add password and password confirmation comparison check -->
<script> <script>
$(function () {
$('#tabs').tabs({
// add url anchor tags
activate: function (event, ui) {
window.location.hash = ui.newPanel.attr('id');
}
});
// re-set active tab (ui)
var activeTabIdx = $('#tabs').tabs('option', 'active');
$('#tabs li:eq(' + activeTabIdx + ')').tab('show')
});
// initialize pretty checkboxes // initialize pretty checkboxes
$('.otp_toggle').iCheck({ $('.otp_toggle').iCheck({
@ -174,16 +172,19 @@
}); });
// handle checkbox toggling // handle checkbox toggling
$('.otp_toggle').on('ifToggled', function (event) { $('.otp_toggle').on('ifToggled', function(event) {
var enable_otp = $(this).prop('checked'); var enable_otp = $(this).prop('checked');
var postdata = { var postdata = {
'action': 'enable_otp', 'action': 'enable_otp',
'data': { 'data': {
'enable_otp': enable_otp 'enable_otp': enable_otp
}, },
'_csrf_token': '{{ csrf_token() }}' '_csrf_token': '{{ csrf_token() }}'
}; };
applyChanges(postdata, $SCRIPT_ROOT + '/user/profile', false, true); applyChanges(postdata, $SCRIPT_ROOT + '/user/profile', false, true, function() {
window.location.reload();
$('#tabs li:eq(2) a').tab('show');
}); });
});
</script> </script>
{% endblock %} {% endblock %}