2022-05-04 23:09:46 +00:00
{% extends "default.html" %}
{% block title %}
< title > Banned Domains< / title >
{% endblock %}
{% block content %}
2022-10-20 22:14:25 +00:00
< script >
function unbanDomain(t, domain) {
2022-10-30 15:10:07 +00:00
postToast(t,'/admin/unban_domain/' + domain);
2022-10-20 22:14:25 +00:00
t.parentElement.parentElement.remove();
}
< / script >
2022-10-29 00:38:39 +00:00
< div class = "overflow-x-auto mt-2" >
2022-10-20 22:14:25 +00:00
< table class = "table table-striped mb-5" id = "domains-table" >
< thead class = "bg-primary text-white" >
< tr >
< th > Domain< / th >
< th > Ban reason< / th >
< th > < / th >
< / tr >
< / thead >
< tbody >
{% for domain in banned_domains %}
< tr >
< td > {{domain.domain}}< / td >
< td > {{domain.reason}}< / td >
< td >
2022-10-28 23:35:14 +00:00
< button type = "button" class = "btn btn-danger" onclick = "unbanDomain(this, '{{domain.domain}}')" > Unban< / button >
2022-10-20 22:14:25 +00:00
< / td >
< / tr >
{% endfor %}
< / tbody >
< / table >
< form action = "/admin/ban_domain" method = "post" >
< input type = "hidden" name = "formkey" value = "{{v.formkey}}" >
< input autocomplete = "off" name = "domain" placeholder = "Enter domain here.." class = "form-control" required >
< input autocomplete = "off" name = "reason" placeholder = "Enter ban reason here.." oninput = "document.getElementById('ban-submit').disabled=false" class = "form-control mt-2" >
< input autocomplete = "off" id = "ban-submit" type = "submit" onclick = "disable(this)" class = "btn btn-primary mt-2" value = "Ban domain" disabled >
< / form >
< / div >
{% endblock %}