diff options
| -rw-r--r-- | templates/index.html | 103 | ||||
| -rw-r--r-- | templates/post_form.html | 103 | ||||
| -rw-r--r-- | templates/thread.html | 96 |
3 files changed, 106 insertions, 196 deletions
diff --git a/templates/index.html b/templates/index.html index 3ee2f420..46a1ff99 100644 --- a/templates/index.html +++ b/templates/index.html @@ -32,108 +32,7 @@ <h1>{{ board.url }} - {{ board.name }}</h1>
<div class="title">{% if board.title %}{{ board.title }}{% endif %}<p>{% if mod %}<a href="?/">Return to dashboard</a>{% endif %}</p></div>
-
- <form name="post" onsubmit="return dopost(this);" enctype="multipart/form-data" action="{{ config.post_url }}" method="post">
- {{ hidden_inputs }}
- <input type="hidden" name="board" value="{{ board.uri }}" />
- {% if mod %}<input type="hidden" name="mod" value="1" />{% endif %}
- <table>
- <tr>
- <th>
- {% trans %}Name{% endtrans %}
- </th>
- <td>
- <input type="text" name="name" size="25" maxlength="50" autocomplete="off" />
- </td>
- </tr>
- <tr>
- <th>
- {% trans %}Email{% endtrans %}
- </th>
- <td>
- <input type="text" name="email" size="25" maxlength="40" autocomplete="off" />
- </td>
- </tr>
- <tr>
- <th>
- {% trans %}Subject{% endtrans %}
- </th>
- <td>
- <input style="float:left;" type="text" name="subject" size="25" maxlength="100" autocomplete="off" />
- <input accesskey="s" style="margin-left:2px;" type="submit" name="post" value="{{ config.button_newtopic }}" />{% if config.spoiler_images %} <input id="spoiler" name="spoiler" type="checkbox" /> <label for="spoiler">{% trans %}Spoiler Image{% endtrans %}</label>{% endif %}
- </td>
- </tr>
- <tr>
- <th>
- {% trans %}Comment{% endtrans %}
- </th>
- <td>
- <textarea name="body" id="body" rows="5" cols="35"></textarea>
- </td>
- </tr>
- {% if config.recaptcha %}
- <tr>
- <th>
- {% trans %}Verification{% endtrans %}
- </th>
- <td>
- <script type="text/javascript" src="http://www.google.com/recaptcha/api/challenge?k={{ config.recaptcha_public }}"></script>
- </td>
- </tr>
- {% endif %}
- <tr>
- <th>
- {% trans %}File{% endtrans %}
- </th>
- <td>
- <input type="file" name="file" />
- </td>
- </tr>
- {% if config.enable_embedding %}
- <tr>
- <th>
- {% trans %}Embed{% endtrans %}
- </th>
- <td>
- <input type="text" name="embed" size="30" maxlength="120" autocomplete="off" />
- </td>
- </tr>
- {% endif %}
- {% if mod %}
- <tr>
- <th>
- {% trans %}Flags{% endtrans %}
- </th>
- <td>
- <div>
- <label for="sticky">{% trans %}Sticky{% endtrans %}</label>
- <input title="{% trans %}Sticky{% endtrans %}" type="checkbox" name="sticky" id="sticky" /><br />
- </div>
- <div>
- <label for="lock">{% trans %}Lock{% endtrans %}</label><br />
- <input title="{% trans %}Lock{% endtrans %}" type="checkbox" name="lock" id="lock" />
- </div>
- <div>
- <label for="raw">{% trans %}Raw HTML{% endtrans %}</label><br />
- <input title="{% trans %}Raw HTML{% endtrans %}" type="checkbox" name="raw" id="raw" />
- </div>
- </td>
- </tr>
- {% endif %}
- <tr>
- <th>
- {% trans %}Password{% endtrans %}
- </th>
- <td>
- <input type="password" name="password" size="12" maxlength="18" autocomplete="off" />
- <span class="unimportant">{% trans %}(For file deletion.){% endtrans %}</span>
- </td>
- </tr>
- </table>
- </form>
- <script type="text/javascript">{% raw %}
- rememberStuff();
- {% endraw %}</script>
+ {% include 'post_form.html' %}
{% if config.blotter %}<hr /><div class="blotter">{{ config.blotter }}</div>{% endif %}
<hr />
diff --git a/templates/post_form.html b/templates/post_form.html new file mode 100644 index 00000000..7ef133ed --- /dev/null +++ b/templates/post_form.html @@ -0,0 +1,103 @@ +<form name="post" onsubmit="return dopost(this);" enctype="multipart/form-data" action="{{ config.post_url }}" method="post"> +{{ hidden_inputs }} +{% if id %}<input type="hidden" name="thread" value="{{ id }}" />{% endif %} +<input type="hidden" name="board" value="{{ board.uri }}" /> +{% if mod %}<input type="hidden" name="mod" value="1" />{% endif %} + <table> + <tr> + <th> + {% trans %}Name{% endtrans %} + </th> + <td> + <input type="text" name="name" size="25" maxlength="50" autocomplete="off" /> + </td> + </tr> + <tr> + <th> + {% trans %}Email{% endtrans %} + </th> + <td> + <input type="text" name="email" size="25" maxlength="40" autocomplete="off" /> + </td> + </tr> + <tr> + <th> + {% trans %}Subject{% endtrans %} + </th> + <td> + <input style="float:left;" type="text" name="subject" size="25" maxlength="100" autocomplete="off" /> + <input accesskey="s" style="margin-left:2px;" type="submit" name="post" value="{% if id %}{{ config.button_reply }}{% else %}{{ config.button_newtopic }}{% endif %}" />{% if config.spoiler_images %} <input id="spoiler" name="spoiler" type="checkbox" /> <label for="spoiler">{% trans %}Spoiler Image{% endtrans %}</label>{% endif %} + </td> + </tr> + <tr> + <th> + {% trans %}Comment{% endtrans %} + </th> + <td> + <textarea name="body" id="body" rows="5" cols="35"></textarea> + </td> + </tr> + {% if config.recaptcha %} + <tr> + <th> + {% trans %}Verification{% endtrans %} + </th> + <td> + <script type="text/javascript" src="http://www.google.com/recaptcha/api/challenge?k={{ config.recaptcha_public }}"></script> + </td> + </tr> + {% endif %} + <tr> + <th> + {% trans %}File{% endtrans %} + </th> + <td> + <input type="file" name="file" /> + </td> + </tr> + {% if config.enable_embedding %} + <tr> + <th> + {% trans %}Embed{% endtrans %} + </th> + <td> + <input type="text" name="embed" size="30" maxlength="120" autocomplete="off" /> + </td> + </tr> + {% endif %} + {% if mod %} + <tr> + <th> + {% trans %}Flags{% endtrans %} + </th> + <td> + {% if not id %}<div> + <label for="sticky">{% trans %}Sticky{% endtrans %}</label> + <input title="{% trans %}Sticky{% endtrans %}" type="checkbox" name="sticky" id="sticky" /><br /> + </div>{% endif %} + {% if not id %}<div> + <label for="lock">{% trans %}Lock{% endtrans %}</label><br /> + <input title="{% trans %}Lock{% endtrans %}" type="checkbox" name="lock" id="lock" /> + </div>{% endif %} + {% if true %}<div> + <label for="raw">{% trans %}Raw HTML{% endtrans %}</label><br /> + <input title="{% trans %}Raw HTML{% endtrans %}" type="checkbox" name="raw" id="raw" /> + </div>{% endif %} + </td> + </tr> + {% endif %} + <tr> + <th> + {% trans %}Password{% endtrans %} + </th> + <td> + <input type="password" name="password" size="12" maxlength="18" autocomplete="off" /> + <span class="unimportant">{% trans %}(For file deletion.){% endtrans %}</span> + </td> + </tr> + </table> +</form> + +<script type="text/javascript">{% raw %} + rememberStuff(); +{% endraw %}</script> diff --git a/templates/thread.html b/templates/thread.html index aa97a785..6850130c 100644 --- a/templates/thread.html +++ b/templates/thread.html @@ -33,100 +33,8 @@ <div class="title">{% if board.title %}{{ board.title }}{% endif %}<p>{% if mod %}<a href="?/">Return to dashboard</a>{% endif %}</p></div>
<div class="banner">{% trans %}Posting mode: Reply{% endtrans %} <a rel="directory" class="unimportant" href="{{ return }}">[{% trans %}Return{% endtrans %}]</a></div>
- <form name="post" onsubmit="return dopost(this);" enctype="multipart/form-data" action="{{ config.post_url }}" method="post">
- {{ hidden_inputs }}
- <input type="hidden" name="thread" value="{{ id }}" />
- <input type="hidden" name="board" value="{{ board.uri }}" />
- {% if mod %}<input type="hidden" name="mod" value="1" />{% endif %}
- <table>
- <tr>
- <th>
- {% trans %}Name{% endtrans %}
- </th>
- <td>
- <input type="text" name="name" size="25" maxlength="50" autocomplete="off" />
- </td>
- </tr>
- <tr>
- <th>
- {% trans %}Email{% endtrans %}
- </th>
- <td>
- <input type="text" name="email" size="25" maxlength="40" autocomplete="off" />
- </td>
- </tr>
- <tr>
- <th>
- {% trans %}Subject{% endtrans %}
- </th>
- <td>
- <input style="float:left;" type="text" name="subject" size="25" maxlength="100" autocomplete="off" />
- <input accesskey="s" style="margin-left:2px;" type="submit" name="post" value="{{ config.button_reply }}" />{% if config.spoiler_images %} <input id="spoiler" name="spoiler" type="checkbox" /> <label for="spoiler">{% trans %}Spoiler Image{% endtrans %}</label>{% endif %}
- </td>
- </tr>
- <tr>
- <th>
- {% trans %}Comment{% endtrans %}
- </th>
- <td>
- <textarea name="body" id="body" rows="5" cols="35"></textarea>
- </td>
- </tr>
- {% if config.recaptcha %}
- <tr>
- <th>
- {% trans %}Verification{% endtrans %}
- </th>
- <td>
- <script type="text/javascript" src="http://www.google.com/recaptcha/api/challenge?k={{ config.recaptcha_public }}"></script>
- </td>
- </tr>
- {% endif %}
- <tr>
- <th>
- {% trans %}File{% endtrans %}
- </th>
- <td>
- <input type="file" name="file" />
- </td>
- </tr>
- {% if config.enable_embedding %}
- <tr>
- <th>
- {% trans %}Embed{% endtrans %}
- </th>
- <td>
- <input type="text" name="embed" size="30" maxlength="120" autocomplete="off" />
- </td>
- </tr>
- {% endif %}
- {% if mod %}
- <tr>
- <th>
- {% trans %}Flags{% endtrans %}
- </th>
- <td>
- <div>
- <label for="raw">{% trans %}Raw HTML{% endtrans %}</label><br />
- <input title="Raw HTML" type="checkbox" name="raw" id="raw" />
- </div>
- </td>
- </tr>
- {% endif %}
- <tr>
- <th>
- {% trans %}Password{% endtrans %}
- </th>
- <td>
- <input type="password" name="password" size="12" maxlength="18" autocomplete="off" />
- <span class="unimportant">{% trans %}(For file deletion.){% endtrans %}</span>
- </td>
- </tr>
- </table>
- </form>
- <script type="text/javascript">{% raw %}
- rememberStuff();
- {% endraw %}</script>
+
+ {% include 'post_form.html' %}
{% if config.blotter %}<hr /><div class="blotter">{{ config.blotter }}</div>{% endif %}
<hr />
|
