diff --git a/drama/routes/admin.py b/drama/routes/admin.py index 7757c1a4d6..4b8b31dedd 100644 --- a/drama/routes/admin.py +++ b/drama/routes/admin.py @@ -665,14 +665,14 @@ def ban_user(user_id, v): user.ban(admin=v, reason=reason) - - for x in user.alts: - if x.admin_level > 0: break - x.ban(admin=v, reason=reason) + if request.form.get("alts", ""): + for x in user.alts: + if x.admin_level > 0: break + x.ban(admin=v, reason=reason) send_notification(1046, user, text) - if days == 0: duration = "permenant" + if days == 0: duration = "permanent" elif days == 1: duration = "1 day" else: duration = f"{days} days" ma=ModAction( @@ -701,9 +701,10 @@ def unban_user(user_id, v): user.unban() - for x in user.alts: - if x.admin_level == 0: - x.unban() + if request.form.get("alts", ""): + for x in user.alts: + if x.admin_level == 0: + x.unban() send_notification(1046, user, "Your Drama account has been reinstated. Please carefully review and abide by the [rules](/post/2510) to ensure that you don't get suspended again.") diff --git a/drama/templates/comments.html b/drama/templates/comments.html index 4a0d6e4f4a..39b62ee8cd 100644 --- a/drama/templates/comments.html +++ b/drama/templates/comments.html @@ -299,11 +299,13 @@
  • Approve
  • {% endif %} - {% if v and v.admin_level==6 and v.id != c.author_id and c.author.is_banned %} + {% if v and v.admin_level==6 and v.id != c.author_id %} + {% if c.author.is_banned %}
  • Unban user
  • {% else %}
  • Ban user
  • {% endif %} + {% endif %} {% if v and c.parent_submission and (c.author_id==v.id or v.admin_level > 0) %} @@ -472,7 +474,7 @@ {% endif %} {% endif %} - {% if v and c.post and v.admin_level == 6 %} + {% if v and (c.post and v.admin_level == 6) %} {% if c.author_id != v.id %} {% if c.author.is_banned %}
  • Unban user
  • diff --git a/drama/templates/default.html b/drama/templates/default.html index 941ecb80a5..acf3595ee1 100644 --- a/drama/templates/default.html +++ b/drama/templates/default.html @@ -4,23 +4,73 @@ {% include "bootstrap.html" %} {% if v and v.agendaposter %} - + + + {% endif %}