forked from rDrama/rDrama
sneed
parent
82a602c3a7
commit
1ff3bfe783
|
@ -665,14 +665,14 @@ def ban_user(user_id, v):
|
||||||
|
|
||||||
user.ban(admin=v, reason=reason)
|
user.ban(admin=v, reason=reason)
|
||||||
|
|
||||||
|
if request.form.get("alts", ""):
|
||||||
for x in user.alts:
|
for x in user.alts:
|
||||||
if x.admin_level > 0: break
|
if x.admin_level > 0: break
|
||||||
x.ban(admin=v, reason=reason)
|
x.ban(admin=v, reason=reason)
|
||||||
|
|
||||||
send_notification(1046, user, text)
|
send_notification(1046, user, text)
|
||||||
|
|
||||||
if days == 0: duration = "permenant"
|
if days == 0: duration = "permanent"
|
||||||
elif days == 1: duration = "1 day"
|
elif days == 1: duration = "1 day"
|
||||||
else: duration = f"{days} days"
|
else: duration = f"{days} days"
|
||||||
ma=ModAction(
|
ma=ModAction(
|
||||||
|
@ -701,9 +701,10 @@ def unban_user(user_id, v):
|
||||||
|
|
||||||
user.unban()
|
user.unban()
|
||||||
|
|
||||||
for x in user.alts:
|
if request.form.get("alts", ""):
|
||||||
if x.admin_level == 0:
|
for x in user.alts:
|
||||||
x.unban()
|
if x.admin_level == 0:
|
||||||
|
x.unban()
|
||||||
|
|
||||||
send_notification(1046, user,
|
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.")
|
"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.")
|
||||||
|
|
|
@ -69,7 +69,7 @@
|
||||||
<div class="ml-3 w-100">
|
<div class="ml-3 w-100">
|
||||||
{% if u.is_suspended %}
|
{% if u.is_suspended %}
|
||||||
<h5 style="color:#ff66ac;">BANNED USER{% if u.ban_reason %}: {{u.ban_reason}}{% endif %}</h5>
|
<h5 style="color:#ff66ac;">BANNED USER{% if u.ban_reason %}: {{u.ban_reason}}{% endif %}</h5>
|
||||||
{% if unban %} <h5 style="color:#ff66ac;">{{unban}}</h5>{% endif %}
|
<h5 style="color:#ff66ac;">{{u.unban_string}}</h5>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<div class="d-flex align-items-center mt-1 mb-2">
|
<div class="d-flex align-items-center mt-1 mb-2">
|
||||||
|
@ -184,7 +184,11 @@
|
||||||
<pre></pre>
|
<pre></pre>
|
||||||
{% if u.is_banned %}
|
{% if u.is_banned %}
|
||||||
<form action="/api/unban_user/{{u.id}}/?notoast=1" method="post" action="">
|
<form action="/api/unban_user/{{u.id}}/?notoast=1" method="post" action="">
|
||||||
<input type="hidden" name="formkey", value="{{v.formkey}}">
|
<input type="hidden" name="formkey" value="{{v.formkey}}">
|
||||||
|
<div class="custom-control custom-checkbox">
|
||||||
|
<input type="checkbox" id="alts-1-desktop" class="custom-control-input" name="alts" value="1">
|
||||||
|
<label class="custom-control-label" for="alts-1-desktop">Include alts</label>
|
||||||
|
</div>
|
||||||
<input type="submit" class="btn btn-success" value="Unban user">
|
<input type="submit" class="btn btn-success" value="Unban user">
|
||||||
</form>
|
</form>
|
||||||
{% else %}
|
{% else %}
|
||||||
|
@ -192,6 +196,10 @@
|
||||||
<input type="hidden" name="formkey" value="{{v.formkey}}">
|
<input type="hidden" name="formkey" value="{{v.formkey}}">
|
||||||
<input style="font-size:11px;" type="text" class="form-control" name="reason" placeholder="Ban Reason" onchange="document.getElementById('user-ban-submit').disabled=false">
|
<input style="font-size:11px;" type="text" class="form-control" name="reason" placeholder="Ban Reason" onchange="document.getElementById('user-ban-submit').disabled=false">
|
||||||
<input style="font-size:11px;" type="number" class="form-control" name="days" placeholder="Days (blank = permanent)">
|
<input style="font-size:11px;" type="number" class="form-control" name="days" placeholder="Days (blank = permanent)">
|
||||||
|
<div class="custom-control custom-checkbox">
|
||||||
|
<input type="checkbox" id="alts-2-desktop" class="custom-control-input" name="alts" value="1">
|
||||||
|
<label class="custom-control-label" for="alts-2-desktop">Include alts</label>
|
||||||
|
</div>
|
||||||
<input id="user-ban-submit" type="submit" class="btn btn-danger" value="Ban user" disabled>
|
<input id="user-ban-submit" type="submit" class="btn btn-danger" value="Ban user" disabled>
|
||||||
</form>
|
</form>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -284,7 +292,7 @@
|
||||||
<div class="mt-n3 py-3">
|
<div class="mt-n3 py-3">
|
||||||
{% if u.is_suspended %}
|
{% if u.is_suspended %}
|
||||||
<h5 style="color:#ff66ac;">BANNED USER{% if u.ban_reason %}: {{u.ban_reason}}{% endif %}</h5>
|
<h5 style="color:#ff66ac;">BANNED USER{% if u.ban_reason %}: {{u.ban_reason}}{% endif %}</h5>
|
||||||
{% if unban %} <h5 style="color:#ff66ac;">{{unban}}</h5>{% endif %}
|
<h5 style="color:#ff66ac;">{{u.unban_string}}</h5>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<a class="text-black"><h1 class="h5 d-inline-block" style="color: #{{u.namecolor}}">{{u.username}}</h1></a>
|
<a class="text-black"><h1 class="h5 d-inline-block" style="color: #{{u.namecolor}}">{{u.username}}</h1></a>
|
||||||
|
|
||||||
|
@ -366,6 +374,10 @@
|
||||||
{% if u.is_banned %}
|
{% if u.is_banned %}
|
||||||
<form action="/api/unban_user/{{u.id}}/?notoast=1" method="post">
|
<form action="/api/unban_user/{{u.id}}/?notoast=1" method="post">
|
||||||
<input type="hidden" name="formkey", value="{{v.formkey}}">
|
<input type="hidden" name="formkey", value="{{v.formkey}}">
|
||||||
|
<div class="custom-control custom-checkbox">
|
||||||
|
<input type="checkbox" id="alts-1-mobile" class="custom-control-input" name="alts" value="1">
|
||||||
|
<label class="custom-control-label" for="alts-1-mobile">Include alts</label>
|
||||||
|
</div>
|
||||||
<input type="submit" class="btn btn-success" value="Unban user">
|
<input type="submit" class="btn btn-success" value="Unban user">
|
||||||
</form>
|
</form>
|
||||||
{% else %}
|
{% else %}
|
||||||
|
@ -373,6 +385,10 @@
|
||||||
<input type="hidden" name="formkey" value="{{v.formkey}}">
|
<input type="hidden" name="formkey" value="{{v.formkey}}">
|
||||||
<input style="font-size:11px;" type="text" class="form-control" name="reason" placeholder="Ban Reason" onchange="document.getElementById('user-ban-submit2').disabled=false">
|
<input style="font-size:11px;" type="text" class="form-control" name="reason" placeholder="Ban Reason" onchange="document.getElementById('user-ban-submit2').disabled=false">
|
||||||
<input style="font-size:11px;" type="number" class="form-control" name="days" placeholder="Days (blank = permanent)">
|
<input style="font-size:11px;" type="number" class="form-control" name="days" placeholder="Days (blank = permanent)">
|
||||||
|
<div class="custom-control custom-checkbox">
|
||||||
|
<input type="checkbox" id="alts-2-mobile" class="custom-control-input" name="alts" value="1">
|
||||||
|
<label class="custom-control-label" for="alts-2-mobile">Include alts</label>
|
||||||
|
</div>
|
||||||
<input id="user-ban-submit2" type="submit" class="btn btn-danger" value="Ban user" disabled>
|
<input id="user-ban-submit2" type="submit" class="btn btn-danger" value="Ban user" disabled>
|
||||||
</form>
|
</form>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
Loading…
Reference in New Issue