mirror of
https://github.com/optim-enterprises-bv/Mailu.git
synced 2025-11-01 18:47:52 +00:00
Update the user settings view with a slider
This commit is contained in:
@@ -59,7 +59,7 @@ class UserForm(Form):
|
||||
class UserSettingsForm(Form):
|
||||
displayed_name = fields.StringField('Displayed name')
|
||||
spam_enabled = fields.BooleanField('Enable spam filter')
|
||||
spam_threshold = fields.DecimalField('Spam filter sensitivity')
|
||||
spam_threshold = fields_.IntegerSliderField('Spam filter threshold')
|
||||
submit = fields.SubmitField('Save settings')
|
||||
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{% extends "form.html" %}
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}
|
||||
User settings
|
||||
@@ -7,3 +7,15 @@ User settings
|
||||
{% block subtitle %}
|
||||
{{ user }}
|
||||
{% endblock %}
|
||||
|
||||
{% block box_content %}
|
||||
<form class="form" method="post" role="form">
|
||||
{{ form.hidden_tag() }}
|
||||
{{ macros.form_field(form.displayed_name) }}
|
||||
{{ macros.form_field(form.spam_enabled) }}
|
||||
{{ macros.form_field(form.spam_threshold, step=1, max=15,
|
||||
prepend='<span class="input-group-addon"><span id="threshold">'+(form.spam_threshold.data).__int__().__str__()+'</span> / 15</span>',
|
||||
oninput='$("#threshold").text(this.value);') }}
|
||||
{{ macros.form_field(form.submit) }}
|
||||
</form>
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user