From 995d3cbc98ab0c8b860f5186190c1e784a2e45e4 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Fri, 4 Nov 2022 23:44:37 +0200 Subject: [PATCH] add postToastReload --- files/assets/js/core.js | 10 ++++++++++ files/classes/submission.py | 2 +- files/templates/admin/app.html | 6 +++--- files/templates/admin/apps.html | 6 +++--- files/templates/header.html | 4 ++-- files/templates/notifications.html | 2 +- files/templates/settings_apps.html | 4 ++-- files/templates/settings_profile.html | 6 +++--- files/templates/userpage.html | 4 ++-- files/templates/userpage_blocking.html | 2 +- 10 files changed, 28 insertions(+), 18 deletions(-) diff --git a/files/assets/js/core.js b/files/assets/js/core.js index c08fa0833..f31a1e23d 100644 --- a/files/assets/js/core.js +++ b/files/assets/js/core.js @@ -78,6 +78,16 @@ function postToast(t, url, data, callback) { } } +function postToastReload(t, url) { + postToast(t, url, + { + }, + () => { + location.reload() + } + ); +} + function postToastSwitch(t, url, button1, button2, cls, callback) { postToast(t, url, { diff --git a/files/classes/submission.py b/files/classes/submission.py index a2952f6f8..2458a76bf 100644 --- a/files/classes/submission.py +++ b/files/classes/submission.py @@ -323,7 +323,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/admin/app.html b/files/templates/admin/app.html index 717a4f11c..c77c4495c 100644 --- a/files/templates/admin/app.html +++ b/files/templates/admin/app.html @@ -34,12 +34,12 @@
{% if not app.client_id%} - - + + {% else %} - + {% endif %}
diff --git a/files/templates/admin/apps.html b/files/templates/admin/apps.html index 04ed595ae..5e6d3bbed 100644 --- a/files/templates/admin/apps.html +++ b/files/templates/admin/apps.html @@ -40,12 +40,12 @@
{% if not app.client_id %} - - + + {% else %} - + {% endif %}
diff --git a/files/templates/header.html b/files/templates/header.html index 63fe44c0f..a0f530fdd 100644 --- a/files/templates/header.html +++ b/files/templates/header.html @@ -262,7 +262,7 @@ Archives {% endif %} Contact us - + @@ -332,7 +332,7 @@ Contact us {% else %}