This commit is contained in:
johan 2023-01-10 08:58:05 +01:00
parent 2d15d097bd
commit f2c2bbaae9

View file

@ -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(),