diff --git a/client/database/index.html b/client/database/index.html index 91f2ce145..937c7ca5a 100644 --- a/client/database/index.html +++ b/client/database/index.html @@ -116,7 +116,7 @@ diff --git a/client/multiplayer/room.html b/client/multiplayer/room.html index e276ed020..226f09d49 100644 --- a/client/multiplayer/room.html +++ b/client/multiplayer/room.html @@ -336,7 +336,7 @@ diff --git a/client/singleplayer/bonuses.html b/client/singleplayer/bonuses.html index ed83ba1a7..8b8692597 100644 --- a/client/singleplayer/bonuses.html +++ b/client/singleplayer/bonuses.html @@ -308,7 +308,7 @@ diff --git a/client/singleplayer/tossups.html b/client/singleplayer/tossups.html index ce2507899..651ac662c 100644 --- a/client/singleplayer/tossups.html +++ b/client/singleplayer/tossups.html @@ -317,7 +317,7 @@ diff --git a/client/utilities.js b/client/utilities.js index 3352947e9..ea250f90d 100644 --- a/client/utilities.js +++ b/client/utilities.js @@ -239,16 +239,13 @@ function rangeToArray(string, max = 0) { function reportQuestion(_id, reason = '', description = '') { + document.getElementById('report-question-submit').disabled = true; fetch('/api/report-question', { method: 'POST', headers: { 'Content-Type': 'application/json' }, - body: JSON.stringify({ - _id: _id, - reason: reason, - description: description - }) + body: JSON.stringify({ _id, reason, description }) }).then(response => { if (response.status === 200) { alert('Question has been reported.'); @@ -257,6 +254,9 @@ function reportQuestion(_id, reason = '', description = '') { } }).catch(error => { alert('There was an error reporting the question.'); + }).finally(() => { + document.getElementById('report-question-close').click(); + document.getElementById('report-question-submit').disabled = false; }); }