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