diff --git a/app.py b/app.py index b59c1e2..915bc87 100644 --- a/app.py +++ b/app.py @@ -12,3 +12,7 @@ def start(): @app.route("/pay_cash/") def pay_cash(price: int): return render_template('paycash.jinja', price=escape(price), api_url=api_url) + +@app.route("/pay_card/") +def pay_card(price: int): + return render_template('paycard.jinja', price=escape(price), api_url=api_url) \ No newline at end of file diff --git a/static/scripts/main.js b/static/scripts/main.js index 3326c6c..2361461 100644 --- a/static/scripts/main.js +++ b/static/scripts/main.js @@ -129,6 +129,11 @@ function payCash() { window.location.href = "/pay_cash/" + total_cost } +function payCard() { + const total_cost = document.getElementById('totalprice').innerHTML.replace('€ ','') + window.location.href = "/pay_card/" + total_cost +} + function toMain() { window.location.href = "/"; } \ No newline at end of file diff --git a/templates/index.jinja b/templates/index.jinja index 314d35b..1723b69 100644 --- a/templates/index.jinja +++ b/templates/index.jinja @@ -84,7 +84,7 @@
- +
diff --git a/templates/paycard.jinja b/templates/paycard.jinja new file mode 100644 index 0000000..20df887 --- /dev/null +++ b/templates/paycard.jinja @@ -0,0 +1,60 @@ + + + + + + + Toddler Shop + + + + + + + +
+
+
+ +
+
+
+
+
+
+
+ +
+
+

€ {{price}}

+
+
+
+
+
+
+
+ +
+
+
+ +
+
+ +
+ +
+ +
+
+
+ +
+
+
+ + + + + \ No newline at end of file diff --git a/templates/paycash.jinja b/templates/paycash.jinja index ec00104..63914ee 100644 --- a/templates/paycash.jinja +++ b/templates/paycash.jinja @@ -15,7 +15,7 @@
- +
@@ -34,7 +34,7 @@
- +