An attempt to rebase leftypol software on vichan.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

84 lines
2.5 KiB

{% if post and board %}
{% set action = '?/' ~ board ~ '/warning/' ~ post %}
{% else %}
{% set action = '?/warning' %}
{% endif %}
{% if reasons %}
<script type="text/javascript">
$(document).ready(function(){
{% for key, reason in reasons %}
var data_{{ key }} = '{"reason":"{{ reason|escape('js') }}","message":"{{ reason|escape('js') }}"}';
$('#reason-selector-id-{{ key }}').click(function() { populateFormJQuery('#warning-form-id', $.parseJSON(data_{{ key }})); });
{% endfor %}
});
</script>
{% endif %}
<form action="{{ action }}" method="post" id="warning-form-id">
<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 %}
<table>
<tr>
<th>
<label for="ip">{% trans 'IP' %}</label>
</th>
<td>
{% if not hide_ip %}
<input type="text" name="ip" id="ip" size="30" maxlength="40" value="{{ ip|e }}">
{% else %}
<em>{% trans 'hidden' %}</em>
{% 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="message">{% trans 'Message' %}</label>
</th>
<td>
<input type="checkbox" id="public_message" name="public_message"{% if config.mod.check_warning_message %} checked{% endif %}>
<input type="text" name="message" id="message" size="35" maxlength="200" value="{{ config.mod.default_warning_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>
<td></td>
<td><input name="new_warning" type="submit" value="{% trans 'New Warning' %}"></td>
</tr>
</table>
</form>
{% if reasons %}
<center>
<h3>Predefined Reasons:</h3>
<table class="warning-reason-table">
<tr id="reason-selector-heading">
<th><b>Reason</b></th>
</tr>
{% for key, reason in reasons %}
<tr id="reason-selector-id-{{ key }}">
<td>{{ reason|e }}</td>
</tr>
{% endfor %}
</table>
</center>
{% endif %}