remotes/1693045480750635534/spooky-22
Aevann1 2021-08-03 13:43:33 +02:00
parent 851a923f3a
commit 652da9fd66
2 changed files with 10 additions and 11 deletions

View File

@ -967,7 +967,6 @@ def admin_dump_cache(v):
def admin_ban_domain(v):
domain=request.form.get("domain",'').strip()
if not domain: abort(400)
reason=int(request.form.get("reason",0))

View File

@ -21,16 +21,16 @@
<h2>Actions</h2>
<form action="/admin/ban_domain" method="post">
<input type="hidden" name="formkey" value="{{v.formkey}}">
<input type="hidden" name="domain" value="{{domain_name}}">
<label for="reason_select">Ban reason</label>
<select id="reason_select" class="form-control" name="reason" onchange="$('#ban-submit').prop('disabled', false)">
<option value="0">---Select Ban Reason---</option>
{% for i in reasons %}
<option value="{{i}}"{% if i==domain.reason %} selected{% endif %}>{{reasons[i]}}</option>
{% endfor %}
</select>
<input type="submit" class="btn btn-primary" value="Ban {{domain_name}}" disabled>
<input type="hidden" name="formkey" value="{{v.formkey}}">
<input type="hidden" name="domain" value="{{domain_name}}">
<label for="reason_select">Ban reason</label>
<select id="reason_select" class="form-control" name="reason" onchange="$('#ban-submit').prop('disabled', false)">
<option value="0">---Select Ban Reason---</option>
{% for i in reasons %}
<option value="{{i}}"{% if i==domain.reason %} selected{% endif %}>{{reasons[i]}}</option>
{% endfor %}
</select>
<input id="ban-submit" type="submit" class="btn btn-primary" value="Ban {{domain_name}}" disabled>
</form>
{% endblock %}