From 28f142682c3db8b361efdce00570ca7348888f29 Mon Sep 17 00:00:00 2001 From: Ben Dover Date: Sat, 6 Dec 2025 18:16:57 +0100 Subject: [PATCH 1/4] Reworked verify purchase and seperated Recharge from buy products --- nanposweb/templates/index.html | 164 +++++++++++++++++--------------- nanposweb/templates/verify.html | 77 ++++++--------- 2 files changed, 117 insertions(+), 124 deletions(-) diff --git a/nanposweb/templates/index.html b/nanposweb/templates/index.html index 547d843..2fc1556 100644 --- a/nanposweb/templates/index.html +++ b/nanposweb/templates/index.html @@ -47,89 +47,97 @@ {% endblock %} {% block content %} -
- {{ form.csrf_token }} -
- {% for product in products %} - {% if product.visible or view_all %} -
- {% if product.price < 0 %} - {% if config.VERIFY_FREE_PURCHASES %} - - {% if product.is_food %} - {% set icon = (food_icons | random) %} - {% else %} - {% if product.has_alc %} - {% set icon = (alc_icons | random) %} + + {{ form.csrf_token }} + +

Recharge Balance

+
+ {% for product in products %} + {% if (product.visible or view_all) and product.price < 0 %} +
+ {% if config.VERIFY_FREE_PURCHASES %} + + {% if product.is_food %} + {% set icon = (food_icons | random) %} {% else %} - {% set icon = (drink_icons | random) %} + {% if product.has_alc %} + {% set icon = (alc_icons | random) %} + {% else %} + {% set icon = (drink_icons | random) %} + {% endif %} {% endif %} - {% endif %} - - {{ product.name }}
- {% if config.SHOW_BALANCE_AND_PRICE %} - {{ macro.render_currency(product.price) }} - {% else %} - {{ macro.render_contingent(balance, product.price) }} - {% endif %} -
- {% else %} - - {% endif %} - {% else %} - {% if product in favorites %} - - {% else %} - - {% endif %} + + {% endif %} +
{% endif %} + {% endfor %} +
-
- {% endif %} - {% endfor %} -
-
-{% endblock %} +

Buy product

+
+ {% for product in products %} + {% if (product.visible or view_all) and product.price >= 0 %} +
+ {% if product in favorites %} + + {% else %} + + {% endif %} +
+ {% endif %} + {% endfor %} +
+ + {% endblock %} diff --git a/nanposweb/templates/verify.html b/nanposweb/templates/verify.html index e12f21c..1146f1b 100644 --- a/nanposweb/templates/verify.html +++ b/nanposweb/templates/verify.html @@ -1,54 +1,39 @@ {% extends 'base.html' %} -{% block pagetitle %}Verify Purchase{% endblock %} - -{% block utilbar %} -