Fixed a bug in the template for the order page caused by localization and removed the previously applied workaround for this issue
This commit is contained in:
parent
aa0f2d67ed
commit
d792a7658c
3 changed files with 4 additions and 3 deletions
|
@ -1,6 +1,7 @@
|
||||||
{% extends "baseLayout.html" %}
|
{% extends "baseLayout.html" %}
|
||||||
|
|
||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
|
{% load l10n %}
|
||||||
|
|
||||||
{% block title %}
|
{% block title %}
|
||||||
{% translate "Drinks - Order" %}
|
{% translate "Drinks - Order" %}
|
||||||
|
@ -31,7 +32,7 @@
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="column">{% translate "Price per Item" %} ({{ currency_suffix }}):</div>
|
<div class="column">{% translate "Price per Item" %} ({{ currency_suffix }}):</div>
|
||||||
<div class="column" id="pricePerDrink" data-drink-price="{{ drink.price }}">{{ drink.price }}</div>
|
<div class="column" id="pricePerDrink" data-drink-price="{% localize off %}{{ drink.price }}{% endlocalize %}">{{ drink.price }}</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% if not drink.binary_availability %}
|
{% if not drink.binary_availability %}
|
||||||
|
|
|
@ -58,7 +58,7 @@ main {
|
||||||
align-items: center;
|
align-items: center;
|
||||||
flex-grow: 1;
|
flex-grow: 1;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin-top: 2rem;
|
margin-top: 5vh;
|
||||||
}
|
}
|
||||||
.userPanel {
|
.userPanel {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
|
@ -14,7 +14,7 @@ document.addEventListener("DOMContentLoaded", () => {
|
||||||
|
|
||||||
// calculate & display sum
|
// calculate & display sum
|
||||||
|
|
||||||
let order_price_per_drink = parseFloat(document.getElementById("pricePerDrink").dataset.drinkPrice.replace(",", "."));
|
let order_price_per_drink = parseFloat(document.getElementById("pricePerDrink").dataset.drinkPrice);
|
||||||
|
|
||||||
function calculate_and_display_sum() {
|
function calculate_and_display_sum() {
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue