From 5be668a04959d74e3ff0f299e0ca29841ad0304c Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Mon, 7 Nov 2022 07:41:57 +0200 Subject: [PATCH] fix "give award" button not getting grayed-out correctly --- files/assets/js/award_modal.js | 2 +- files/assets/js/core.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/files/assets/js/award_modal.js b/files/assets/js/award_modal.js index 490946c79..0cf167cc0 100644 --- a/files/assets/js/award_modal.js +++ b/files/assets/js/award_modal.js @@ -130,7 +130,7 @@ function buy(mb) { const xhr = createXhrWithFormKey(url); if(typeof data === 'object' && data !== null) { for(let k of Object.keys(data)) { - form.append(k, data[k]); + form.append(k, data[k]); } } xhr[0].onload = function() { diff --git a/files/assets/js/core.js b/files/assets/js/core.js index 25a7d4d71..0b4904d75 100644 --- a/files/assets/js/core.js +++ b/files/assets/js/core.js @@ -33,7 +33,7 @@ function createXhrWithFormKey(url, method="POST", form=new FormData()) { } function postToast(t, url, data, extraActionsOnSuccess, method="POST") { - const isShopConfirm = t.id.startsWith('buy1-') || t.id.startsWith('buy2-') + const isShopConfirm = t.id.startsWith('buy1-') || t.id.startsWith('buy2-') || t.id.startsWith('giveaward') if (!isShopConfirm) {