From 280d27343db4b0107759288c8787b32af24aa03d Mon Sep 17 00:00:00 2001 From: Sli Date: Wed, 25 Dec 2024 20:44:52 +0100 Subject: [PATCH] Put error popup inside the basket --- core/static/core/style.scss | 31 ++++++++----------- counter/templates/counter/counter_click.jinja | 20 ++++++------ 2 files changed, 24 insertions(+), 27 deletions(-) diff --git a/core/static/core/style.scss b/core/static/core/style.scss index 2f12d380..486964bc 100644 --- a/core/static/core/style.scss +++ b/core/static/core/style.scss @@ -344,24 +344,6 @@ body { text-align: center; } - .popup { - z-index: 10; - /* to get on top of tomselect */ - display: inline-block; - text-align: center; - overflow: auto; - margin: auto; - position: fixed; - top: 0; - left: 0; - bottom: 0; - right: 0; - height: 20vh; - width: 20vw; - align-content: center; - } - - .tabs { border-radius: 5px; @@ -1283,6 +1265,18 @@ u, float: right; } + .basket-error-container { + position: relative; + display: block + } + + .basket-error { + z-index: 10; // to get on top of tomselect + text-align: center; + position: absolute; + } + + #products { flex-basis: 100%; margin: 0.2em; @@ -1292,6 +1286,7 @@ u, #click_form { flex: auto; margin: 0.2em; + width: 20%; } #user_info { diff --git a/counter/templates/counter/counter_click.jinja b/counter/templates/counter/counter_click.jinja index b4257b76..e902a3c8 100644 --- a/counter/templates/counter/counter_click.jinja +++ b/counter/templates/counter/counter_click.jinja @@ -31,14 +31,6 @@

Javascript is required for the counter UI.

- -
{% trans %}Customer{% endtrans %}
{{ user_mini_profile(customer.user) }} @@ -51,7 +43,7 @@

-
+
{% trans %}Selling{% endtrans %}
{% set counter_click_url = url('counter:click', counter_id=counter.id, user_id=customer.user_id) %} @@ -86,6 +78,16 @@
+
+
+
+ {% csrf_token %}
{{ form.management_form }}