1. Fix(CSS): Styles improved across all pages. \n 2. Fix(SQL): User authentication correction for demo account with user role.

This commit is contained in:
2025-07-12 18:28:30 +01:00
parent 62cafa8bed
commit 4954c63d84
121 changed files with 562 additions and 3917 deletions

View File

@@ -29,6 +29,14 @@
{% set block_id = 'button_save' %}
{% include 'components/common/buttons/_buttons_save_cancel.html' %}
</div>
{#
<div class="{{ model.FLAG_CONTAINER_INPUT }}">
{% set block_id = 'button_cancel' %}
{% include 'components/common/buttons/_buttons_save_cancel.html' %}
</div>
#}
</div>
<div class="{{ model.FLAG_COLUMN }}">
<div class="{{ model.FLAG_CONTAINER_INPUT }}">
{% set block_id = 'button_cancel' %}
{% include 'components/common/buttons/_buttons_save_cancel.html' %}

View File

@@ -2,11 +2,22 @@
{% if colour is not defined %}
{% set colour = model.COLOUR_PRIMARY %}
{% endif %}
{% if background_colour is not defined %}
{% set background_colour = model.COLOUR_ACCENT %}
{% endif %}
{% if id is not defined %}
{% set id = model.ID_BUTTON_HAMBURGER %}
{% endif %}
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"
fill="{{ colour }}"
class="{{ model.FLAG_BUTTON }} {{ model.FLAG_ICON }} {{ model.FLAG_ADD }} {{ model.FLAG_ACTIVE }}"
<div class="{{ model.FLAG_BUTTON }} {{ model.FLAG_ICON }} {{ model.FLAG_HAMBURGER }}"
id="{{ id }}"
>
<!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.-->
<path d="M0 96C0 78.3 14.3 64 32 64l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 128C14.3 128 0 113.7 0 96zM0 256c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 288c-17.7 0-32-14.3-32-32zM448 416c0 17.7-14.3 32-32 32L32 448c-17.7 0-32-14.3-32-32s14.3-32 32-32l384 0c17.7 0 32 14.3 32 32z"/>
</svg>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"
fill="{{ colour }}"
class="{{ model.FLAG_BUTTON }} {{ model.FLAG_ICON }} {{ model.FLAG_HAMBURGER }}"
style="background-color: {{ background_colour }};"
>
<!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.-->
<path d="M0 96C0 78.3 14.3 64 32 64l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 128C14.3 128 0 113.7 0 96zM0 256c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 288c-17.7 0-32-14.3-32-32zM448 416c0 17.7-14.3 32-32 32L32 448c-17.7 0-32-14.3-32-32s14.3-32 32-32l384 0c17.7 0 32 14.3 32 32z"/>
</svg>
</div>

View File

@@ -1,4 +1,4 @@
<div class="{{ model.FLAG_OVERLAY }} {{ model.FLAG_COLLAPSED }} {{ model.FLAG_CARD }} {{ model.FLAG_COLUMN }}" id="{{ model.ID_OVERLAY_CONFIRM }}" style="visibility: hidden;" z-index="2">
<div class="{{ model.FLAG_OVERLAY }} {{ model.FLAG_IS_COLLAPSED }} {{ model.FLAG_CARD }} {{ model.FLAG_COLUMN }}" id="{{ model.ID_OVERLAY_CONFIRM }}" style="visibility: hidden;" z-index="2">
<div class="{{ model.FLAG_CONTAINER }} {{ model.FLAG_ROW }}">
<h2>Are you sure?</h2>
</div>

View File

@@ -1,4 +1,4 @@
<div class="{{ model.FLAG_OVERLAY }} {{ model.FLAG_COLLAPSED }} {{ model.FLAG_CARD }}" id="{{ model.ID_OVERLAY_ERROR }}" style="visibility: hidden;" z-index="2">
<div class="{{ model.FLAG_OVERLAY }} {{ model.FLAG_IS_COLLAPSED }} {{ model.FLAG_CARD }}" id="{{ model.ID_OVERLAY_ERROR }}" style="visibility: hidden;" z-index="2">
<div class="{{ model.FLAG_CONTAINER }} {{ model.FLAG_ROW }}">
<h2>Error:</h2>
<div id="{{ model.ID_LABEL_ERROR }}"></div>

View File

@@ -11,9 +11,9 @@
{
"@context": "https://schema.org",
"@type": "ProfessionalService",
"name": "{{ model.NAME_COMPANY }}",
"name": "Dog Training",
"url": "{{ model.get_url_host() }}",
"logo": "{{ model.get_url_host() }}{{ url_for('static', filename='images/Logo.png') }}",
"logo": "{{ model.get_url_host() }}{{ url_for('static', filename='images/Wisp_LQ.webp') }}",
"description": "Dog training management web app.",
"address": {
"@type": "PostalAddress",
@@ -80,7 +80,6 @@
var flagCity = "{{ model.FLAG_CITY }}";
var flagCloseTemporaryElement = "{{ model.FLAG_CLOSE_TEMPORARY_ELEMENT }}";
var flagCode = "{{ model.FLAG_CODE }}";
var flagCollapsed = "{{ model.FLAG_COLLAPSED }}";
var flagCollapsible = "{{ model.FLAG_COLLAPSIBLE }}";
var flagColumn = "{{ model.FLAG_COLUMN }}";
var flagCommand = "{{ model.FLAG_COMMAND }}";
@@ -114,6 +113,7 @@
var flagImageLogo = "{{ model.FLAG_IMAGE_LOGO }}";
var flagInitialised = "{{ model.FLAG_INITIALISED }}";
var flagIsChecked = "{{ model.FLAG_IS_CHECKED }}";
var flagIsCollapsed = "{{ model.FLAG_IS_COLLAPSED }}";
// var flagItems = "{{ model.FLAG_ITEMS }}";
// var flagKeyPrimary = "{{ model.FLAG_KEY_PRIMARY }}";
var flagLeftHandStub = "{{ model.FLAG_LEFT_HAND_STUB }}";
@@ -185,6 +185,8 @@
var hashSaveDogDogCommandLink = "{{ model.HASH_SAVE_DOG_DOG_COMMAND_LINK }}";
var idButtonApplyFilters = "#{{ model.ID_BUTTON_APPLY_FILTERS }}";
var idButtonHamburger = "#{{ model.ID_BUTTON_HAMBURGER }}";
var idButtonCancel = "#{{ model.ID_BUTTON_CANCEL }}";
var idButtonSave = "#{{ model.ID_BUTTON_SAVE }}";
var idContainerTemplateElements = "#{{ model.ID_CONTAINER_TEMPLATE_ELEMENTS }}";
var idCSRFToken = "#{{ model.ID_CSRF_TOKEN }}";
var idFormFilters = "#{{ model.ID_FORM_FILTERS }}";
@@ -222,86 +224,26 @@
</header>
-->
<div class="topnav">
<div class="{{ model.FLAG_CONTAINER }}" style="width: 18vw; min-width: 18vw; max-width: 20vw;">
<img class="header-logo" src="{{ url_for('static', filename='images/Logo.png') }}" alt="{{ model.NAME_COMPANY }} logo" aria-label="{{ model.NAME_COMPANY }} logo" tabindex="0">
<div class="{{ model.FLAG_CONTAINER }} header-logo"> <!-- style="width: 18vw; min-width: 18vw; max-width: 20vw;" -->
<img class="header-logo" src="{{ url_for('static', filename='images/Wisp_LQ.webp') }}" alt="Dog Training logo" aria-label="Dog Training logo" tabindex="0">
</div>
<div class="{{ model.FLAG_CONTAINER }}" style="width: 75vw; min-width: 65vw; max-width: 80vw;">
<div class="{{ model.FLAG_CONTAINER }} company-name"> <!-- style="width: 75vw; min-width: 65vw; max-width: 80vw;" -->
<h1 class="company-name">Dog Training - {{ model.title }}</h1>
</div>
{#
<div class="{{ model.FLAG_CONTAINER }}" style="width: 7vw; min-width: 7vw; max-width: 15vw; justify-content: flex-end; "> <!-- padding-left: 25%; -->
<div class="{{ model.FLAG_CONTAINER }}"> <!-- style="width: 7vw; min-width: 7vw; max-width: 15vw; justify-content: flex-end; " padding-left: 25%; -->
<button id="{{ model.ID_BUTTON_HAMBURGER }}" class="{{ model.FLAG_BUTTON }} {{ model.FLAG_BUTTON_PRIMARY }}" tabindex="1" alt="Hamburger menu button" aria-label="Hamburger menu button"></button>
</div>
#}
</div>
<!-- Hamburger navigation menu -->
<div id="{{ model.ID_OVERLAY_HAMBURGER }}" class="{{ model.FLAG_OVERLAY}} {{ model.FLAG_HAMBURGER }}"> <!-- style="height: {{ 27 * 3 }}px" {- { 4.5 * 3 }}vh {{ model.FLAG_COLLAPSED }} -->
{% include 'components/common/buttons/_icon_hamburger.html' %}
<div id="{{ model.ID_OVERLAY_HAMBURGER }}" class="{{ model.FLAG_OVERLAY}} {{ model.FLAG_HAMBURGER }} {{ model.FLAG_IS_COLLAPSED }}">
<div class="{{ model.FLAG_CONTAINER }} {{ model.FLAG_ROW }}">
<a class="{{ model.FLAG_NAV_HOME }}">Home</a>
</div>
{#
{% if model.is_page_dog and model.user.can_admin_dog %}
<div class="{{ model.FLAG_CONTAINER }} {{ model.FLAG_ROW }}">
<a class="{{ model.FLAG_NAV_STORE_PRODUCT_PERMUTATIONS }}">Product Permutations</a>
</div>
{% if model.user.can_admin_dog %}
<div class="{{ model.FLAG_CONTAINER }} {{ model.FLAG_ROW }}">
<a class="{{ model.FLAG_NAV_STORE_STOCK_ITEMS }}">Stock Items</a>
</div>
{% endif %}
<!--
<div class="{{ model.FLAG_CONTAINER }} {{ model.FLAG_ROW }}">
<!-- <a href="{ url_ for('create_price_dummy') }">Create template price</a> --
<form id="{{ model.ID_FORM_IS_INCLUDED_VAT }}" class="{{ model.FLAG_CONTAINER }}" action="{ { url_ for('set_is_included_VAT') } }" method="POST">
{ { model.form_is_included_VAT.hidden_tag() }}
<div class="container-input">
{ { model.form_is_included_VAT.is_included.label }}
{ { model.form_is_included_VAT.is_included( checked = model.is_included_VAT ) }}
{ % for error in model.form_is_included_VAT.is_included.errors %}
<p class="error">{{ error }}</p>
{ % endfor %}
</div>
</form>
</div>
<div class="{{ model.FLAG_CONTAINER }} {{ model.FLAG_ROW }}">
<form id="{{ model.ID_FORM_DELIVERY_REGION }}" class="{{ model.FLAG_CONTAINER }}" action="{ { url_ for('set_delivery_region') } }" method="POST">
{ { model.form_delivery_region.hidden_tag() }}
<div class="container-input">
{ { model.form_delivery_region.id_region_delivery.label }}
{ { model.form_delivery_region.id_region_delivery() }}
{ % for error in model.form_delivery_region.id_region_delivery.errors %}
<p class="error">{{ error }}</p>
{ % endfor %}
</div>
</form>
</div>
<div class="{{ model.FLAG_CONTAINER }} {{ model.FLAG_ROW }}">
<form id="{{ model.ID_FORM_CURRENCY }}" class="{{ model.FLAG_CONTAINER }}" action="{ { url_ for('set_currency') } }" method="POST">
{ { model.form_currency.hidden_tag() }}
<div class="container-input">
{ { model.form_currency.id_currency.label }}
{ { model.form_currency.id_currency() }}
{ % for error in model.form_currency.id_currency.errors %}
<p class="error">{{ error }}</p>
{ % endfor %}
</div>
</form>
</div>
<div class="{{ model.FLAG_CONTAINER }} {{ model.FLAG_ROW }}">
<a href="{ { url_for('routes_user.logout') if model.is_user_logged_in else url_for('routes_user.login') }}" style="float:right">{{ 'Logout' if model.is_user_logged_in else 'Login' }}</a>
</div>
-->
{% else %}
{% if model.user.can_admin_dog %}
<div class="{{ model.FLAG_CONTAINER }} {{ model.FLAG_ROW }}">
<a class="{{ model.FLAG_NAV_STORE_HOME }}">Shop</a>
</div>
{% endif %}
{% endif %}
#}
{% if model.user.can_admin_dog %}
{% if True or model.user.can_admin_dog %}
<div class="{{ model.FLAG_CONTAINER }} {{ model.FLAG_ROW }}">
<a class="{{ model.FLAG_NAV_DOG_HOME }}">Dog Home</a>
</div>
@@ -329,7 +271,7 @@
<!-- Footer -->
<div class="footer">
<h4 style="padding-top: 1vh;">Copyright &copy; {{ model.NAME_COMPANY }}. <a href="{{ url_for('routes_legal.license') }}" alt="License" aria-label="License">All rights reserved.</a></h4>
<h4>Copyright &copy; {{ model.NAME_COMPANY }}. <a href="{{ url_for('routes_legal.license') }}" alt="License" aria-label="License">All rights reserved.</a></h4>
<h5>Company number 13587499</h5>
<div class="{{ model.FLAG_CONTAINER }} {{ model.FLAG_ROW }}">
<div class="{{ model.FLAG_CONTAINER }} {{ model.FLAG_COLUMN }}"><p><a href="{{ url_for('routes_legal.accessibility_statement') }}" alt="Accessibility statement" aria-label="Accessibility statement">Accessibility statement</a></p></div>

View File

@@ -11,7 +11,7 @@
<div class="{{ model.FLAG_CONTAINER }} {{ model.FLAG_ROW }}">
<a class="{{ model.FLAG_NAV_USER_LOGIN }} {{ model.FLAG_BUTTON }} {{ model.FLAG_BUTTON_PRIMARY }}">Login</a>
</div>
{% elif model.user.can_admin_dog %}
{% elif True or model.user.can_admin_dog %}
<div class="{{ model.FLAG_CONTAINER }} {{ model.FLAG_ROW }}">
<a class="{{ model.FLAG_NAV_DOG_HOME }} {{ model.FLAG_BUTTON }} {{ model.FLAG_BUTTON_PRIMARY }}">Dog Home</a>
</div>

View File

@@ -8,9 +8,11 @@
<div class="{{ model.FLAG_CARD }} {{ model.FLAG_ROW }}">
<div class="{{ model.FLAG_CONTAINER }} {{ model.FLAG_COLUMN }}">
<h2>Dog</h2>
{#
<div class="{{ model.FLAG_CONTAINER }} {{ model.FLAG_ROW }}">
<button class="{{ model.FLAG_NAV_DOG_DOGS }} {{ model.FLAG_BUTTON }} {{ model.FLAG_BUTTON_PRIMARY }}">Dogs</button>
</div>
#}
<div class="{{ model.FLAG_CONTAINER }} {{ model.FLAG_ROW }}">
<button class="{{ model.FLAG_NAV_DOG_COMMAND_CATEGORIES }} {{ model.FLAG_BUTTON }} {{ model.FLAG_BUTTON_PRIMARY }}">Command Categories</button>
</div>