1
0
mirror of https://github.com/vichan-devel/vichan.git synced 2024-12-01 02:27:24 +01:00
vichan/templates/mod/ban_form.html
2015-03-06 02:00:03 -08:00

106 lines
3.7 KiB
HTML

{% if post and board %}
{% set action = '?/' ~ board ~ '/ban/' ~ post %}
{% else %}
{% set action = '?/ban' %}
{% endif %}
<form action="{{ action }}" method="post">
<input type="hidden" name="token" value="{{ token }}">
{% if redirect %}
<input type="hidden" name="redirect" value="{{ redirect|e }}">
{% endif %}
{% if post and board %}
<input type="hidden" name="delete" value="{% if delete %}1{% else %}0{% endif %}">
{% endif %}
{% if tor %}
<p style="color:red;font-size:2em">Warning! This IP is a Tor exit node. Tor is a global network that allows for truly anonymous posting by obfuscating the user's real IP address. Please do not ban it, all bans on Tor exit nodes are globally undone every week. On 8chan, Tor users are allowed to post five times per CAPTCHA they complete, and image uploads are not allowed. <em>If the global restrictions on Tor users are not enough and you would really like to stop Tor users, there is a setting in your board options. Please think carefully before enabling it.</em></p>
{% endif %}
<table>
<tr>
<th>
<label for="ip">{% trans 'IP' %} <span class="unimportant">{% trans '(or subnet)' %}</span></label>
</th>
<td>
{% if not hide_ip %}
<input type="text" name="ip" id="ip" size="30" maxlength="40" value="{{ ip }}">
{% else %}
{{ ip|less_ip(board) }}&nbsp;
<select name="range">
<option value="">no range ban</option>
{% for i in range(29, 12) %}
<option value="/{{i}}">/{{i}}</option>
{% endfor %}
</select>
{% endif %}
</td>
</tr>
<tr>
<th>
<label for="reason">{% trans 'Reason' %}</label>
</th>
<td>
<textarea name="reason" id="reason" rows="5" cols="30">{{ reason|e }}</textarea>
</td>
</tr>
{% if post and board and not delete %}
<tr>
<th>
<label for="reason">{% trans 'Message' %}</label>
</th>
<td>
<input type="checkbox" id="public_message" name="public_message"{% if config.mod.check_ban_message %} checked{% endif %}>
<input type="text" name="message" id="message" size="35" maxlength="200" value="{{ config.mod.default_ban_message|e }}">
<span class="unimportant">({% trans 'public; attached to post' %})</span>
<script type="text/javascript">
document.getElementById('message').disabled = !document.getElementById('public_message').checked;
document.getElementById('public_message').onchange = function() {
document.getElementById('message').disabled = !this.checked;
}
</script>
</td>
</tr>
{% endif %}
<tr>
<th>
<label for="length">{% trans 'Length' %}</label>
</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>
<th>{% trans 'Board' %}</th>
<td>
<ul style="list-style:none;padding:2px 5px">
{% if mod.boards[0] == '*' %}
<li>
<input type="radio" name="board" value="*" id="ban-allboards" checked>
<label style="display:inline" for="ban-allboards">
<em>{% trans 'all boards' %}</em>
</label>
</li>
{% endif %}
{% for board in boards %}
{% if board.uri in mod.boards or mod.boards[0] == '*' %}
<li>
<input type="radio" name="board" value="{{ board.uri }}" id="ban-board-{{ board.uri }}" {%if board.uri == mod.boards[0]%}checked{%endif%}>
<label style="display:inline" for="ban-board-{{ board.uri }}">
{{ config.board_abbreviation|sprintf(board.uri) }} - {{ board.title|e }}
</label>
</li>
{% endif %}
{% endfor %}
</ul>
</td>
</tr>
<tr>
<td></td>
<td><input name="new_ban" type="submit" value="{% trans 'New Ban' %}"></td>
</tr>
</table>
</form>