rDrama/drama/templates/admin/banned_domains.html

42 lines
1.2 KiB
HTML

{% extends "default.html" %}
{% block title %}
<title>Banned Domains</title>
{% endblock %}
{% block content %}
<table class="table table-striped mb-5">
<thead class="bg-primary text-white">
<tr>
<th style="font-weight:bold;">Domain</th>
<th style="font-weight:bold;">Ban reason</th>
</tr>
</thead>
{% for domain in domains %}
<tr>
<td style="font-weight:bold;">{{domain}}</td>
<td>{{domain.reason_text}}</td>
</tr>
{% endfor %}
</table>
<form action="/admin/ban_domain" method="post">
<input type="hidden" name="formkey" value="{{v.formkey}}">
<input type="hidden" name="domain" value="{{domain_name}}">
<input name="domain" placeholder="domain" required>
<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 %}