diff --git a/files/assets/js/bootstrap.js b/files/assets/js/bootstrap.js index 3ca8f95a8..8c52bfcad 100644 --- a/files/assets/js/bootstrap.js +++ b/files/assets/js/bootstrap.js @@ -176,7 +176,7 @@ if (document.readyState === "complete" || document.addEventListener("DOMContentLoaded", bsTriggerOnReady); } -function post_toast(t, url, button1, button2, classname) { +function post_toast(t, url, button1, button2, classname, extra_actions) { let isShopConfirm = t.id.startsWith('buy1-go') || t.id.startsWith('buy2-go'); if (!isShopConfirm) @@ -208,6 +208,8 @@ function post_toast(t, url, button1, button2, classname) { document.getElementById(button2).classList.toggle(classname); } } + + if (extra_actions) extra_actions(xhr); } else { document.getElementById('toast-post-error-text').innerText = "Error, please try again later." if (data && data["error"]) document.getElementById('toast-post-error-text').innerText = data["error"]; diff --git a/files/templates/hats.html b/files/templates/hats.html index 53aa21bd1..d24f817bf 100644 --- a/files/templates/hats.html +++ b/files/templates/hats.html @@ -16,6 +16,25 @@ {% endblock %} {% block content %} + +
@@ -53,22 +72,20 @@