Browse Source

fix email logic and add nonoko setting to selectbox

Changes it so that if the user is mod and they can bypass fields, "email" will show up just fine. If not, "email" will become an options field, like on 4chan. The options field will show up for anybody if hide_email is set to true.
Nonoko will be in the selectbox if always_noko is set to true.
main
RealAngeleno 10 months ago
committed by -
parent
commit
bd8b76a41f
  1. 9
      templates/post_form.html

9
templates/post_form.html

@ -21,19 +21,20 @@
</tr>{% endif %}
{% if not config.field_disable_email or (mod and post.mod|hasPermission(config.mod.bypass_field_disable, board.uri)) %}<tr>
<th>
{% if config.field_email_selectbox %}
<label for="email_selectbox">{% trans %}Options{% endtrans %}</label>
{% if (mod and not post.mod|hasPermission(config.mod.bypass_field_disable, board.uri) and config.field_email_selectbox) or (not mod and config.field_email_selectbox) or (config.hide_email) %}
<label for="email_selectbox">{% trans %}Options{% endtrans %}
{% else %}
<label for="email">{% trans %}Email{% endtrans %}</label>
<label for="email">{% trans %}Email{% endtrans %}
{% endif %}
{{ antibot.html() }}
</th>
<td>
{% if config.field_email_selectbox %}
{% if (mod and not post.mod|hasPermission(config.mod.bypass_field_disable, board.uri) and config.field_email_selectbox) or (not mod and config.field_email_selectbox) %}
<select name="email" id="email_selectbox" autocomplete="off">
<option value=""></option>
<option value="sage">sage</option>
{% if not config.always_noko %}<option value="noko">noko</option>{% endif %}
{% if config.always_noko %}<option value="nonoko">nonoko</option>{% endif %}
</select>
{% else %}
<input type="text" name="email" id="email" size="25" maxlength="30" autocomplete="off">

Loading…
Cancel
Save