2012-04-20 13:37:48 +02:00
{% if post and board %}
{% set action = '?/' ~ board ~ '/ban/' ~ post %}
{% else %}
{% set action = '?/ban' %}
{% endif %}
< form action = "{{ action }}" method = "post" >
2012-08-27 07:19:05 +02:00
< input type = "hidden" name = "token" value = "{{ token }}" >
2012-04-13 01:29:08 +02:00
{% if redirect %}
< input type = "hidden" name = "redirect" value = "{{ redirect|e }}" >
{% endif %}
2012-04-20 13:37:48 +02:00
{% if post and board %}
< input type = "hidden" name = "delete" value = "{% if delete %}1{% else %}0{% endif %}" >
{% endif %}
2015-02-17 01:42:31 +01:00
{% 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 %}
2012-04-13 01:29:08 +02:00
< table >
2012-04-20 13:37:48 +02:00
2012-04-13 01:29:08 +02:00
< tr >
< th >
2012-05-05 17:33:10 +02:00
< label for = "ip" > {% trans 'IP' %} < span class = "unimportant" > {% trans '(or subnet)' %}< / span > < / label >
2012-04-13 01:29:08 +02:00
< / th >
< td >
2012-04-20 13:37:48 +02:00
{% if not hide_ip %}
< input type = "text" name = "ip" id = "ip" size = "30" maxlength = "40" value = "{{ ip }}" >
{% else %}
2015-03-06 11:00:03 +01:00
{{ ip|less_ip(board) }}
2014-10-10 03:39:37 +02:00
< select name = "range" >
< option value = "" > no range ban< / option >
{% for i in range(29, 12) %}
2015-04-21 16:11:46 +02:00
< option value = "/{{i}}" > /{{i}} (covers {{2**(32-i)}} addresses)< / option >
2014-10-10 03:39:37 +02:00
{% endfor %}
< / select >
2012-04-20 13:37:48 +02:00
{% endif %}
2015-04-21 16:11:46 +02:00
< p class = "unimportant hint" > {% trans %}Be careful with range bans. The bigger the range, the more likely it will affect users you didn't intend.{% endtrans %}< / p >
2012-04-13 01:29:08 +02:00
< / td >
< / tr >
< tr >
< th >
2012-05-05 17:33:10 +02:00
< label for = "reason" > {% trans 'Reason' %}< / label >
2012-04-13 01:29:08 +02:00
< / th >
< td >
< textarea name = "reason" id = "reason" rows = "5" cols = "30" > {{ reason|e }}< / textarea >
< / td >
< / tr >
2012-04-20 13:37:48 +02:00
{% if post and board and not delete %}
< tr >
< th >
2012-05-05 17:33:10 +02:00
< label for = "reason" > {% trans 'Message' %}< / label >
2012-04-20 13:37:48 +02:00
< / th >
< td >
2013-07-22 23:51:13 +02:00
< input type = "checkbox" id = "public_message" name = "public_message" { % if config . mod . check_ban_message % } checked { % endif % } >
2012-04-20 13:37:48 +02:00
< input type = "text" name = "message" id = "message" size = "35" maxlength = "200" value = "{{ config.mod.default_ban_message|e }}" >
2012-05-05 17:33:10 +02:00
< span class = "unimportant" > ({% trans 'public; attached to post' %})< / span >
2012-04-20 13:37:48 +02:00
< script type = "text/javascript" >
2013-07-22 23:51:13 +02:00
document.getElementById('message').disabled = !document.getElementById('public_message').checked;
2012-04-20 13:37:48 +02:00
document.getElementById('public_message').onchange = function() {
document.getElementById('message').disabled = !this.checked;
}
< / script >
< / td >
< / tr >
{% endif %}
2012-04-13 01:29:08 +02:00
< tr >
< th >
2012-05-05 17:33:10 +02:00
< label for = "length" > {% trans 'Length' %}< / label >
2012-04-13 01:29:08 +02: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 17:33:10 +02:00
< th > {% trans 'Board' %}< / th >
2012-04-13 01:29:08 +02:00
< td >
< ul style = "list-style:none;padding:2px 5px" >
2013-10-25 03:20:23 +02:00
{% if mod.boards[0] == '*' %}
2012-04-13 01:29:08 +02:00
< li >
2015-08-20 04:47:35 +02:00
< input type = "radio" name = "board" value = "*" id = "ban-allboards" >
2012-04-13 01:29:08 +02:00
< label style = "display:inline" for = "ban-allboards" >
2012-05-05 17:33:10 +02:00
< em > {% trans 'all boards' %}< / em >
2012-04-13 01:29:08 +02:00
< / label >
< / li >
2013-10-25 03:20:23 +02:00
{% endif %}
2012-04-13 01:29:08 +02:00
{% for board in boards %}
2015-08-20 04:47:35 +02:00
{% if board.uri in mod.boards %}
2012-04-13 01:29:08 +02:00
< li >
2013-10-25 03:20:23 +02:00
< input type = "radio" name = "board" value = "{{ board.uri }}" id = "ban-board-{{ board.uri }}" { % if board . uri = = mod . boards [ 0 ] % } checked { % endif % } >
2012-04-13 01:29:08 +02:00
< label style = "display:inline" for = "ban-board-{{ board.uri }}" >
2012-05-05 17:33:10 +02:00
{{ config.board_abbreviation|sprintf(board.uri) }} - {{ board.title|e }}
2012-04-13 01:29:08 +02:00
< / label >
< / li >
2015-08-20 04:47:35 +02:00
{% endif %}
2012-04-13 01:29:08 +02:00
{% endfor %}
2015-08-20 04:47:35 +02:00
{% if mod.boards[0] == '*' %}
< li >
< input type = "radio" name = "board" value = "{{ board }}" > /{{ board }}/
< / li >
{% endif %}
2012-04-13 01:29:08 +02:00
< / ul >
< / td >
< / tr >
< tr >
< td > < / td >
2012-05-05 17:33:10 +02:00
< td > < input name = "new_ban" type = "submit" value = "{% trans 'New Ban' %}" > < / td >
2012-04-13 01:29:08 +02:00
< / tr >
< / table >
< / form >