From d792a7658c18204c527c2c793b877f8314df61f4 Mon Sep 17 00:00:00 2001
From: W13R <9070224-W13R@users.noreply.gitlab.com>
Date: Mon, 16 May 2022 10:51:22 +0200
Subject: [PATCH] Fixed a bug in the template for the order page caused by
localization and removed the previously applied workaround for this issue
---
application/app/templates/order.html | 3 ++-
static/css/main.css | 2 +-
static/js/order.js | 2 +-
3 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/application/app/templates/order.html b/application/app/templates/order.html
index adbb8e3..3c99638 100644
--- a/application/app/templates/order.html
+++ b/application/app/templates/order.html
@@ -1,6 +1,7 @@
{% extends "baseLayout.html" %}
{% load i18n %}
+{% load l10n %}
{% block title %}
{% translate "Drinks - Order" %}
@@ -31,7 +32,7 @@
{% translate "Price per Item" %} ({{ currency_suffix }}):
-
{{ drink.price }}
+
{{ drink.price }}
{% if not drink.binary_availability %}
diff --git a/static/css/main.css b/static/css/main.css
index 298dd35..d8377b2 100644
--- a/static/css/main.css
+++ b/static/css/main.css
@@ -58,7 +58,7 @@ main {
align-items: center;
flex-grow: 1;
width: 100%;
- margin-top: 2rem;
+ margin-top: 5vh;
}
.userPanel {
display: flex;
diff --git a/static/js/order.js b/static/js/order.js
index d35a025..d7f0f86 100644
--- a/static/js/order.js
+++ b/static/js/order.js
@@ -14,7 +14,7 @@ document.addEventListener("DOMContentLoaded", () => {
// 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() {