mirror of
https://github.com/vichan-devel/vichan.git
synced 2024-11-23 23:20:57 +01:00
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.
This commit is contained in:
parent
e2a42c67f6
commit
694351baa8
@ -21,15 +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 (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) %}
|
||||
{% trans %}Options{% endtrans %}
|
||||
{% else %}
|
||||
{% 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" size="25" maxlength="40" autocomplete="off">
|
||||
|
Loading…
Reference in New Issue
Block a user