|
@ -4,7 +4,17 @@ |
|
|
{% set action = '?/ban' %} |
|
|
{% set action = '?/ban' %} |
|
|
{% endif %} |
|
|
{% endif %} |
|
|
|
|
|
|
|
|
<form action="{{ action }}" method="post"> |
|
|
{% if reasons %} |
|
|
|
|
|
<script type="text/javascript"> |
|
|
|
|
|
$(document).ready(function(){ |
|
|
|
|
|
{% for key, reason in reasons %} |
|
|
|
|
|
var data_{{ key }} = '{"reason":"{{ reason.reason|escape('js') }}","message":"{{ reason.reason|escape('js') }}","length":"{{ reason.length|escape('js') }}"}'; |
|
|
|
|
|
$('#reason-selector-id-{{ key }}').click(function() { populateFormJQuery('#ban-form-id', $.parseJSON(data_{{ key }})); }); |
|
|
|
|
|
{% endfor %} |
|
|
|
|
|
}); |
|
|
|
|
|
</script> |
|
|
|
|
|
{% endif %} |
|
|
|
|
|
<form action="{{ action }}" method="post" id="ban-form-id"> |
|
|
<input type="hidden" name="token" value="{{ token }}"> |
|
|
<input type="hidden" name="token" value="{{ token }}"> |
|
|
{% if redirect %} |
|
|
{% if redirect %} |
|
|
<input type="hidden" name="redirect" value="{{ redirect|e }}"> |
|
|
<input type="hidden" name="redirect" value="{{ redirect|e }}"> |
|
@ -41,7 +51,7 @@ |
|
|
{% if post and board and not delete %} |
|
|
{% if post and board and not delete %} |
|
|
<tr> |
|
|
<tr> |
|
|
<th> |
|
|
<th> |
|
|
<label for="reason">{% trans 'Message' %}</label> |
|
|
<label for="message">{% trans 'Message' %}</label> |
|
|
</th> |
|
|
</th> |
|
|
<td> |
|
|
<td> |
|
|
<input type="checkbox" id="public_message" name="public_message"{% if config.mod.check_ban_message %} checked{% endif %}> |
|
|
<input type="checkbox" id="public_message" name="public_message"{% if config.mod.check_ban_message %} checked{% endif %}> |
|
@ -93,3 +103,20 @@ |
|
|
</table> |
|
|
</table> |
|
|
</form> |
|
|
</form> |
|
|
|
|
|
|
|
|
|
|
|
{% if reasons %} |
|
|
|
|
|
<center> |
|
|
|
|
|
<h3>Predefined Reasons:</h3> |
|
|
|
|
|
<table class="ban-reason-table"> |
|
|
|
|
|
<tr id="reason-selector-heading"> |
|
|
|
|
|
<th><b>Length</b></th> |
|
|
|
|
|
<th><b>Reason</b></th> |
|
|
|
|
|
</tr> |
|
|
|
|
|
{% for key, reason in reasons %} |
|
|
|
|
|
<tr id="reason-selector-id-{{ key }}"> |
|
|
|
|
|
<td>{% if not reason.length %}forever{% else %}{{ reason.length|e }}{% endif %}</td> |
|
|
|
|
|
<td>{{ reason.reason|e }}</td> |
|
|
|
|
|
</tr> |
|
|
|
|
|
{% endfor %} |
|
|
|
|
|
</table> |
|
|
|
|
|
</center> |
|
|
|
|
|
{% endif %} |