diff --git a/files/assets/js/award_modal.js b/files/assets/js/award_modal.js index 79ab1457c..a597d0a21 100644 --- a/files/assets/js/award_modal.js +++ b/files/assets/js/award_modal.js @@ -97,30 +97,16 @@ function vote(type, id, dir) { function pick(kind, canbuy1, canbuy2) { const buy1 = document.getElementById('buy1') - const buy1go = document.getElementById('buy1-go') if (canbuy1 && kind != "grass") - { buy1.disabled=false; - buy1go.disabled=false; - } else - { buy1.disabled=true; - buy1go.disabled=true; - } const buy2 = document.getElementById('buy2') - const buy2go = document.getElementById('buy2-go') if (canbuy2 && kind != "benefactor") - { buy2.disabled=false; - buy2go.disabled=false; - } else - { buy2.disabled=true; - buy2go.disabled=true; - } let ownednum = Number(document.getElementById(`${kind}-owned`).textContent); document.getElementById('giveaward').disabled = (ownednum == 0); diff --git a/files/assets/js/bootstrap.js b/files/assets/js/bootstrap.js index f783981f4..36b2bf97d 100644 --- a/files/assets/js/bootstrap.js +++ b/files/assets/js/bootstrap.js @@ -338,3 +338,18 @@ function timestamp(str, ti) { const date = new Date(ti*1000); document.getElementById(str).setAttribute("data-bs-original-title", formatDate(date)); }; + +function areyousure(t) { + if (t.value) { + t.type = 'submit'; + t.value = 'Are you sure?' + } + else + { + t.innerHTML = t.innerHTML.replace(t.textContent, 'Are you sure?') + } + t.setAttribute("onclick", t.dataset.click); + + if (t.dataset.dismiss) + t.setAttribute("data-bs-dismiss", t.dataset.dismiss); +} diff --git a/files/classes/submission.py b/files/classes/submission.py index 4d10ce8e7..e00e0e154 100644 --- a/files/classes/submission.py +++ b/files/classes/submission.py @@ -374,7 +374,7 @@ class Submission(Base): body += " - WINNER!" if not winner and v and v.admin_level >= PERMS['POST_BETS_DISTRIBUTE']: - body += f'''''' + body += f'''''' body += "" else: input_type = 'radio' if o.exclusive else 'checkbox' diff --git a/files/templates/award_modal.html b/files/templates/award_modal.html index 93f6b9a1a..1a549f3b6 100644 --- a/files/templates/award_modal.html +++ b/files/templates/award_modal.html @@ -32,11 +32,9 @@ - - + - - +
diff --git a/files/templates/comments.html b/files/templates/comments.html index 73759a15d..6b6ae7803 100644 --- a/files/templates/comments.html +++ b/files/templates/comments.html @@ -642,9 +642,9 @@ {% endif %} {% if not c.ghost %} - Unblock user - Are you sure? - Block user + Unblock user + + Block user {% endif %} {% endif %} diff --git a/files/templates/hats.html b/files/templates/hats.html index 38fd23166..99a9d9409 100644 --- a/files/templates/hats.html +++ b/files/templates/hats.html @@ -124,14 +124,10 @@