fgf
This commit is contained in:
parent
c67c51f173
commit
128cb36f13
2 changed files with 10 additions and 11 deletions
|
@ -967,7 +967,6 @@ def admin_dump_cache(v):
|
||||||
def admin_ban_domain(v):
|
def admin_ban_domain(v):
|
||||||
|
|
||||||
domain=request.form.get("domain",'').strip()
|
domain=request.form.get("domain",'').strip()
|
||||||
|
|
||||||
if not domain: abort(400)
|
if not domain: abort(400)
|
||||||
|
|
||||||
reason=int(request.form.get("reason",0))
|
reason=int(request.form.get("reason",0))
|
||||||
|
|
|
@ -21,16 +21,16 @@
|
||||||
<h2>Actions</h2>
|
<h2>Actions</h2>
|
||||||
|
|
||||||
<form action="/admin/ban_domain" method="post">
|
<form action="/admin/ban_domain" method="post">
|
||||||
<input type="hidden" name="formkey" value="{{v.formkey}}">
|
<input type="hidden" name="formkey" value="{{v.formkey}}">
|
||||||
<input type="hidden" name="domain" value="{{domain_name}}">
|
<input type="hidden" name="domain" value="{{domain_name}}">
|
||||||
<label for="reason_select">Ban reason</label>
|
<label for="reason_select">Ban reason</label>
|
||||||
<select id="reason_select" class="form-control" name="reason" onchange="$('#ban-submit').prop('disabled', false)">
|
<select id="reason_select" class="form-control" name="reason" onchange="$('#ban-submit').prop('disabled', false)">
|
||||||
<option value="0">---Select Ban Reason---</option>
|
<option value="0">---Select Ban Reason---</option>
|
||||||
{% for i in reasons %}
|
{% for i in reasons %}
|
||||||
<option value="{{i}}"{% if i==domain.reason %} selected{% endif %}>{{reasons[i]}}</option>
|
<option value="{{i}}"{% if i==domain.reason %} selected{% endif %}>{{reasons[i]}}</option>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</select>
|
</select>
|
||||||
<input type="submit" class="btn btn-primary" value="Ban {{domain_name}}" disabled>
|
<input id="ban-submit" type="submit" class="btn btn-primary" value="Ban {{domain_name}}" disabled>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
Loading…
Add table
Add a link
Reference in a new issue