update user/settings

master
DjVinnii 3 years ago
parent 6b3170cb4c
commit deca6e0c4a

@ -64,18 +64,18 @@
</form> </form>
{% endmacro %} {% endmacro %}
{% macro box(title=None, theme="primary", header=True) %} {% macro card(title=None, theme="primary", header=True) %}
<div class="row"> <div class="row">
<div class="col-lg-12"> <div class="col-lg-12">
<div class="box box-{{ theme }}"> <div class="card card-outline card-{{ theme }}">
{% if header %} {% if header %}
<div class="box-header"> <div class="card-header">
{% if title %} {% if title %}
<h3 class="box-title">{{ title }}</h3> <h3 class="card-title">{{ title }}</h3>
{% endif %} {% endif %}
</div> </div>
{% endif %} {% endif %}
<div class="box-body"> <div class="card-body">
{{ caller() }} {{ caller() }}
</div> </div>
</div> </div>

@ -12,18 +12,18 @@
<form class="form" method="post" role="form"> <form class="form" method="post" role="form">
{{ form.hidden_tag() }} {{ form.hidden_tag() }}
{% call macros.box(title=_("Displayed name")) %} {% call macros.card(title=_("Displayed name")) %}
{{ macros.form_field(form.displayed_name) }} {{ macros.form_field(form.displayed_name) }}
{% endcall %} {% endcall %}
{% call macros.box(title=_("Antispam")) %} {% call macros.card(title=_("Antispam")) %}
{{ macros.form_field(form.spam_enabled) }} {{ macros.form_field(form.spam_enabled) }}
{{ macros.form_field(form.spam_threshold, step=1, max=100, {{ macros.form_field(form.spam_threshold, step=1, max=100,
prepend='<span class="input-group-addon"><span id="threshold">'+form.spam_threshold.data.__str__()+'</span>&nbsp;/&nbsp;100</span>', prepend='<span class="input-group-addon"><span id="threshold">'+form.spam_threshold.data.__str__()+'</span>&nbsp;/&nbsp;100</span>',
oninput='$("#threshold").text(this.value);') }} oninput='$("#threshold").text(this.value);') }}
{% endcall %} {% endcall %}
{% call macros.box(title=_("Auto-forward")) %} {% call macros.card(title=_("Auto-forward")) %}
{{ macros.form_field(form.forward_enabled, {{ macros.form_field(form.forward_enabled,
onchange="if(this.checked){$('#forward_destination,#forward_keep').removeAttr('disabled')} onchange="if(this.checked){$('#forward_destination,#forward_keep').removeAttr('disabled')}
else{$('#forward_destination,#forward_keep').attr('disabled', '')}") }} else{$('#forward_destination,#forward_keep').attr('disabled', '')}") }}

Loading…
Cancel
Save