The version of vichan running on lainchan.org
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.

96 line
2.8KB

  1. {% if post and board %}
  2. {% set action = '?/' ~ board ~ '/ban/' ~ post %}
  3. {% else %}
  4. {% set action = '?/ban' %}
  5. {% endif %}
  6. <form action="{{ action }}" method="post">
  7. <input type="hidden" name="token" value="{{ token }}">
  8. {% if redirect %}
  9. <input type="hidden" name="redirect" value="{{ redirect|e }}">
  10. {% endif %}
  11. {% if post and board %}
  12. <input type="hidden" name="delete" value="{% if delete %}1{% else %}0{% endif %}">
  13. {% endif %}
  14. {% if thread %}
  15. <input type="hidden" name="thread" value="{{ thread }}">
  16. {% endif %}
  17. <table>
  18. <tr>
  19. <th>
  20. <label for="ip">{% trans 'IP' %} <span class="unimportant">{% trans '(or subnet)' %}</span></label>
  21. </th>
  22. <td>
  23. {% if not hide_ip %}
  24. <input type="text" name="ip" id="ip" size="30" maxlength="40" value="{{ ip|e }}">
  25. {% else %}
  26. <em>{% trans 'hidden' %}</em>
  27. {% endif %}
  28. </td>
  29. </tr>
  30. <tr>
  31. <th>
  32. <label for="reason">{% trans 'Reason' %}</label>
  33. </th>
  34. <td>
  35. <textarea name="reason" id="reason" rows="5" cols="30">{{ reason|e }}</textarea>
  36. </td>
  37. </tr>
  38. {% if post and board and not delete %}
  39. <tr>
  40. <th>
  41. <label for="reason">{% trans 'Message' %}</label>
  42. </th>
  43. <td>
  44. <input type="checkbox" id="public_message" name="public_message"{% if config.mod.check_ban_message %} checked{% endif %}>
  45. <input type="text" name="message" id="message" size="35" maxlength="200" value="{{ config.mod.default_ban_message|e }}">
  46. <span class="unimportant">({% trans 'public; attached to post' %})</span>
  47. <script type="text/javascript">
  48. document.getElementById('message').disabled = !document.getElementById('public_message').checked;
  49. document.getElementById('public_message').onchange = function() {
  50. document.getElementById('message').disabled = !this.checked;
  51. }
  52. </script>
  53. </td>
  54. </tr>
  55. {% endif %}
  56. <tr>
  57. <th>
  58. <label for="length">{% trans 'Length' %}</label>
  59. </th>
  60. <td>
  61. <input type="text" name="length" id="length" size="20" maxlength="40">
  62. <span class="unimportant">(eg. "2d1h30m" or "2 days")</span></td>
  63. </tr>
  64. <tr>
  65. <th>{% trans 'Board' %}</th>
  66. <td>
  67. <ul style="list-style:none;padding:2px 5px">
  68. <li>
  69. <input type="radio" name="board" value="*" id="ban-allboards" checked>
  70. <label style="display:inline" for="ban-allboards">
  71. <em>{% trans 'all boards' %}</em>
  72. </label>
  73. </li>
  74. {% for board in boards %}
  75. <li>
  76. <input type="radio" name="board" value="{{ board.uri }}" id="ban-board-{{ board.uri }}">
  77. <label style="display:inline" for="ban-board-{{ board.uri }}">
  78. {{ config.board_abbreviation|sprintf(board.uri) }} - {{ board.title|e }}
  79. </label>
  80. </li>
  81. {% endfor %}
  82. </ul>
  83. </td>
  84. </tr>
  85. <tr>
  86. <td></td>
  87. <td><input name="new_ban" type="submit" value="{% trans 'New Ban' %}"></td>
  88. </tr>
  89. </table>
  90. </form>