2012-04-20 07:37:48 -04:00
|
|
|
{% if post and board %}
|
|
|
|
{% set action = '?/' ~ board ~ '/ban/' ~ post %}
|
|
|
|
{% else %}
|
|
|
|
{% set action = '?/ban' %}
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
<form action="{{ action }}" method="post">
|
2012-08-27 01:19:05 -04:00
|
|
|
<input type="hidden" name="token" value="{{ token }}">
|
2012-04-12 19:29:08 -04:00
|
|
|
{% if redirect %}
|
|
|
|
<input type="hidden" name="redirect" value="{{ redirect|e }}">
|
|
|
|
{% endif %}
|
2012-04-20 07:37:48 -04:00
|
|
|
{% if post and board %}
|
|
|
|
<input type="hidden" name="delete" value="{% if delete %}1{% else %}0{% endif %}">
|
|
|
|
{% endif %}
|
2015-05-10 08:22:53 -04:00
|
|
|
{% if thread %}
|
|
|
|
<input type="hidden" name="thread" value="{{ thread }}">
|
|
|
|
{% endif %}
|
2012-04-12 19:29:08 -04:00
|
|
|
|
|
|
|
<table>
|
2012-04-20 07:37:48 -04:00
|
|
|
|
2012-04-12 19:29:08 -04:00
|
|
|
<tr>
|
|
|
|
<th>
|
2012-05-05 11:33:10 -04:00
|
|
|
<label for="ip">{% trans 'IP' %} <span class="unimportant">{% trans '(or subnet)' %}</span></label>
|
2012-04-12 19:29:08 -04:00
|
|
|
</th>
|
|
|
|
<td>
|
2012-04-20 07:37:48 -04:00
|
|
|
{% if not hide_ip %}
|
2016-05-06 10:53:28 -04:00
|
|
|
<input type="text" name="ip" id="ip" size="30" maxlength="40" value="{{ ip|e }}">
|
2012-04-20 07:37:48 -04:00
|
|
|
{% else %}
|
2012-05-05 11:33:10 -04:00
|
|
|
<em>{% trans 'hidden' %}</em>
|
2012-04-20 07:37:48 -04:00
|
|
|
{% endif %}
|
2012-04-12 19:29:08 -04:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<th>
|
2012-05-05 11:33:10 -04:00
|
|
|
<label for="reason">{% trans 'Reason' %}</label>
|
2012-04-12 19:29:08 -04:00
|
|
|
</th>
|
|
|
|
<td>
|
|
|
|
<textarea name="reason" id="reason" rows="5" cols="30">{{ reason|e }}</textarea>
|
|
|
|
</td>
|
|
|
|
</tr>
|
2012-04-20 07:37:48 -04:00
|
|
|
{% if post and board and not delete %}
|
|
|
|
<tr>
|
|
|
|
<th>
|
2012-05-05 11:33:10 -04:00
|
|
|
<label for="reason">{% trans 'Message' %}</label>
|
2012-04-20 07:37:48 -04:00
|
|
|
</th>
|
|
|
|
<td>
|
2013-07-22 17:51:13 -04:00
|
|
|
<input type="checkbox" id="public_message" name="public_message"{% if config.mod.check_ban_message %} checked{% endif %}>
|
2012-04-20 07:37:48 -04:00
|
|
|
<input type="text" name="message" id="message" size="35" maxlength="200" value="{{ config.mod.default_ban_message|e }}">
|
2012-05-05 11:33:10 -04:00
|
|
|
<span class="unimportant">({% trans 'public; attached to post' %})</span>
|
2012-04-20 07:37:48 -04:00
|
|
|
<script type="text/javascript">
|
2013-07-22 17:51:13 -04:00
|
|
|
document.getElementById('message').disabled = !document.getElementById('public_message').checked;
|
2012-04-20 07:37:48 -04:00
|
|
|
document.getElementById('public_message').onchange = function() {
|
|
|
|
document.getElementById('message').disabled = !this.checked;
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
{% endif %}
|
2012-04-12 19:29:08 -04:00
|
|
|
<tr>
|
|
|
|
<th>
|
2012-05-05 11:33:10 -04:00
|
|
|
<label for="length">{% trans 'Length' %}</label>
|
2012-04-12 19:29:08 -04:00
|
|
|
</th>
|
|
|
|
<td>
|
|
|
|
<input type="text" name="length" id="length" size="20" maxlength="40">
|
|
|
|
<span class="unimportant">(eg. "2d1h30m" or "2 days")</span></td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
2012-05-05 11:33:10 -04:00
|
|
|
<th>{% trans 'Board' %}</th>
|
2012-04-12 19:29:08 -04:00
|
|
|
<td>
|
|
|
|
<ul style="list-style:none;padding:2px 5px">
|
|
|
|
<li>
|
|
|
|
<input type="radio" name="board" value="*" id="ban-allboards" checked>
|
|
|
|
<label style="display:inline" for="ban-allboards">
|
2012-05-05 11:33:10 -04:00
|
|
|
<em>{% trans 'all boards' %}</em>
|
2012-04-12 19:29:08 -04:00
|
|
|
</label>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
{% for board in boards %}
|
|
|
|
<li>
|
|
|
|
<input type="radio" name="board" value="{{ board.uri }}" id="ban-board-{{ board.uri }}">
|
|
|
|
<label style="display:inline" for="ban-board-{{ board.uri }}">
|
2012-05-05 11:33:10 -04:00
|
|
|
{{ config.board_abbreviation|sprintf(board.uri) }} - {{ board.title|e }}
|
2012-04-12 19:29:08 -04:00
|
|
|
</label>
|
|
|
|
</li>
|
|
|
|
{% endfor %}
|
|
|
|
</ul>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td></td>
|
2012-05-05 11:33:10 -04:00
|
|
|
<td><input name="new_ban" type="submit" value="{% trans 'New Ban' %}"></td>
|
2012-04-12 19:29:08 -04:00
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
</form>
|
|
|
|
|