Completed first-found updates for the basic settings view.

This commit is contained in:
Matt Scott 2023-02-20 10:08:09 -05:00
parent 5a4279d7b8
commit a5d69e3e40

View File

@ -1,27 +1,18 @@
{% extends "base.html" %} {% extends "base.html" %}
{% set active_page = "admin_settings" %} {% set active_page = "admin_settings" %}
{% block title %}<title>Basic Settings - {{ SITE_NAME }}</title>{% endblock %}
{% block title %}
<title>
Basic Settings - {{ SITE_NAME }}
</title>
{% endblock %}
{% block dashboard_stat %} {% block dashboard_stat %}
<div class="content-header"> <div class="content-header">
<div class="container-fluid"> <div class="container-fluid">
<div class="row mb-2"> <div class="row mb-2">
<div class="col-sm-6"> <div class="col-sm-6">
<h1 class="m-0 text-dark"> <h1 class="m-0 text-dark">Basic Settings</h1>
Settings
<small>Basic</small>
</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') }}">Dashboard</a></li> <li class="breadcrumb-item"><a href="{{ url_for('dashboard.dashboard') }}">Dashboard</a></li>
<li class="breadcrumb-item active">Settings - Basic</li> <li class="breadcrumb-item active">Basic Settings</li>
</ol> </ol>
</div> </div>
</div> </div>
@ -30,14 +21,15 @@
{% endblock %} {% endblock %}
{% block content %} {% block content %}
<section class="content"> <section class="content">
<div class="container-fluid"> <div class="container-fluid">
<div class="card"> <div class="card card-outline card-primary shadow">
<div class="card-header with-border"> <div class="card-header with-border">
<h3 class="card-title">Basic Settings</h3> <h3 class="card-title">Settings Editor</h3>
</div> </div>
<div class="card-body"> <!-- /.card-header -->
<table id="tbl_settings" class="table table-bordered table-striped"> <div class="card-body table-responsive">
<table id="tbl_settings" class="table table-bordered table-striped table-hover table-sm">
<thead> <thead>
<tr> <tr>
<th>Setting Name</th> <th>Setting Name</th>
@ -49,28 +41,31 @@
{% for setting in settings %} {% for setting in settings %}
<tr class="odd"> <tr class="odd">
<td> <td>
{{ setting }} <label for="value{{ loop.index }}">{{ setting }}</label>
</td> </td>
{% if SETTING.get(setting) in [False] %} {% if SETTING.get(setting) in [False] %}
<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>
<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="fa-solid 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>
<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="fa-solid fa-toggle-off"></i>&nbsp;Turn Off <i class="fa-solid fa-toggle-off"></i>&nbsp;Turn Off
</button> </button>
</td> </td>
{% else %} {% else %}
<td> <td>
<input name="value" id="value" value="{{ SETTING.get(setting) }}"> <input name="value" id="value{{ loop.index }}" value="{{ SETTING.get(setting) }}">
</td> </td>
<td width="20%"> <td>
<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="fa-solid fa-save"></i>&nbsp;Save <i class="fa-solid fa-save"></i>&nbsp;Save
</button> </button>
</td> </td>
@ -80,9 +75,12 @@
</tbody> </tbody>
</table> </table>
</div> </div>
<!-- /.card-body -->
</div> </div>
<!-- /.card -->
</div> </div>
</section> <!-- /.container-fluid -->
</section>
{% endblock %} {% endblock %}
{% block extrascripts %} {% block extrascripts %}