From f2c2bbaae96e54c4ac3e5618fa8a3a7ba177cf79 Mon Sep 17 00:00:00 2001 From: johan Date: Tue, 10 Jan 2023 08:58:05 +0100 Subject: [PATCH 1/2] ca --- static/js/main.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/static/js/main.js b/static/js/main.js index 9fdb06c..73cda54 100644 --- a/static/js/main.js +++ b/static/js/main.js @@ -670,6 +670,16 @@ $('#treasure-popup-button').click((e) => { }); $('#demande-button').click(function () { + amount = $('#demande-amount').val(); + if (amount > 9) { + t = new TypeIt('#error-message-demande', { + speed: 100, + lifeLike: true + }) + .type("Trop de crêpes, maximum c'est 9") + .go(); + return; + } $.ajax({ type: "POST", url: base_url + "addPrank", @@ -677,7 +687,7 @@ $('#demande-button').click(function () { uid: localStorage.getItem('user'), token: localStorage.getItem('token'), type: "crêpe", - amount: $('#demande-amount').val(), + amount: amount, where: $('#demande-where').val(), supplement: $('#demande-supp').val(), note: $('#demande-notes').val(), From e8ecae93fb6334bf32f5c8fd2db2dfc7231c48d2 Mon Sep 17 00:00:00 2001 From: johan Date: Tue, 10 Jan 2023 09:02:51 +0100 Subject: [PATCH 2/2] fsd --- static/index.html | 2 +- static/js/main.js | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/static/index.html b/static/index.html index dc8935a..73b2bb7 100644 --- a/static/index.html +++ b/static/index.html @@ -153,7 +153,7 @@
- +