1
0
mirror of https://github.com/Mailu/Mailu.git synced 2024-12-14 10:53:30 +02:00

Fix pre- and append styling

This commit is contained in:
DjVinnii 2021-04-01 18:30:13 +02:00
parent e963e7495d
commit 51346c4860
8 changed files with 13 additions and 10 deletions

View File

@ -12,7 +12,7 @@
{% call macros.card() %} {% call macros.card() %}
<form class="form" method="post" role="form"> <form class="form" method="post" role="form">
{{ form.hidden_tag() }} {{ form.hidden_tag() }}
{{ macros.form_field(form.localpart, append='<span class="input-group-addon">@'+domain.name+'</span>') }} {{ macros.form_field(form.localpart, append='<span class="input-group-text">@'+domain.name+'</span>') }}
{{ macros.form_field(form.wildcard) }} {{ macros.form_field(form.wildcard) }}
{{ macros.form_field(form.destination, class_='mailselect') }} {{ macros.form_field(form.destination, class_='mailselect') }}
{{ macros.form_field(form.comment) }} {{ macros.form_field(form.comment) }}

View File

@ -1,3 +1,5 @@
<!--TODO add translations for: configure your client, Incoming mail and Outgoing mail-->
{% extends "base.html" %} {% extends "base.html" %}
{% block title %} {% block title %}

View File

@ -11,7 +11,7 @@
{{ macros.form_field(form.name) }} {{ macros.form_field(form.name) }}
{{ macros.form_fields((form.max_users, form.max_aliases)) }} {{ macros.form_fields((form.max_users, form.max_aliases)) }}
{{ macros.form_field(form.max_quota_bytes, step=1000000000, max=50000000000, {{ macros.form_field(form.max_quota_bytes, step=1000000000, max=50000000000,
prepend='<span class="input-group-addon"><span id="quota">'+((form.max_quota_bytes.data//1000000000).__str__() if form.max_quota_bytes.data else '∞')+'</span> GiB</span>', prepend='<span class="input-group-text"><span id="quota">'+((form.max_quota_bytes.data//1000000000).__str__() if form.max_quota_bytes.data else '∞')+'</span> GiB</span>',
oninput='$("#quota").text(this.value == 0 ? "∞" : this.value/1000000000);') }} oninput='$("#quota").text(this.value == 0 ? "∞" : this.value/1000000000);') }}
{{ macros.form_field(form.signup_enabled) }} {{ macros.form_field(form.signup_enabled) }}
{{ macros.form_field(form.comment) }} {{ macros.form_field(form.comment) }}

View File

@ -24,7 +24,7 @@
{% call macros.card() %} {% call macros.card() %}
{% if form.localpart %} {% if form.localpart %}
{{ macros.form_fields((form.localpart, form.name), append='<span class="input-group-addon">@</span>') }} {{ macros.form_fields((form.localpart, form.name), append='<span class="input-group-text">@</span>') }}
{{ macros.form_fields((form.pw, form.pw2)) }} {{ macros.form_fields((form.pw, form.pw2)) }}
{% else %} {% else %}
{{ macros.form_field(form.name) }} {{ macros.form_field(form.name) }}

View File

@ -37,9 +37,10 @@
{{ field.label if label else '' }} {{ field.label if label else '' }}
{% else %} {% else %}
{{ field.label if label else '' }}{{ form_field_errors(field) }} {{ field.label if label else '' }}{{ form_field_errors(field) }}
{% if prepend or append %}<div class="input-group">{% endif %} {% if prepend %}<div class="input-group-prepend">{% endif %}
{{ prepend|safe }}{{ field(class_="form-control " + class_, **kwargs) }}{{ append|safe }} {% if append %}<div class="input-group-text">{% endif %}
{% if prepend or append %}</div>{% endif %} {{ prepend|safe }}{{ field(class_="form-control " + class_, **kwargs) }}{{ append|safe }}
{% if prepend or append %}</div>{% endif %}
{% endif %} {% endif %}
{% endmacro %} {% endmacro %}

View File

@ -13,7 +13,7 @@
{{ form.hidden_tag() }} {{ form.hidden_tag() }}
{% call macros.card(_("General")) %} {% call macros.card(_("General")) %}
{{ macros.form_field(form.localpart, append='<span class="input-group-addon">@'+domain.name+'</span>') }} {{ macros.form_field(form.localpart, append='<span class="input-group-text">@'+domain.name+'</span>') }}
{{ macros.form_fields((form.pw, form.pw2)) }} {{ macros.form_fields((form.pw, form.pw2)) }}
{{ macros.form_field(form.displayed_name) }} {{ macros.form_field(form.displayed_name) }}
{{ macros.form_field(form.comment) }} {{ macros.form_field(form.comment) }}
@ -22,7 +22,7 @@
{% call macros.card(_("Features and quotas"), theme="success") %} {% call macros.card(_("Features and quotas"), theme="success") %}
{{ macros.form_field(form.quota_bytes, step=1000000000, max=(max_quota_bytes or domain.max_quota_bytes or 50000000000), {{ macros.form_field(form.quota_bytes, step=1000000000, max=(max_quota_bytes or domain.max_quota_bytes or 50000000000),
prepend='<span class="input-group-addon"><span id="quota">'+((form.quota_bytes.data//1000000000).__str__() if form.quota_bytes.data else '∞')+'</span> GiB</span>', prepend='<span class="input-group-text"><span id="quota">'+((form.quota_bytes.data//1000000000).__str__() if form.quota_bytes.data else '∞')+'</span> GiB</span>',
oninput='$("#quota").text(this.value == 0 ? "∞" : this.value/1000000000);') }} oninput='$("#quota").text(this.value == 0 ? "∞" : this.value/1000000000);') }}
{{ macros.form_field(form.enable_imap) }} {{ macros.form_field(form.enable_imap) }}
{{ macros.form_field(form.enable_pop) }} {{ macros.form_field(form.enable_pop) }}

View File

@ -19,7 +19,7 @@
{% call macros.card(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-text"><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 %}

View File

@ -12,7 +12,7 @@
<form class="form" method="post" role="form"> <form class="form" method="post" role="form">
{{ form.hidden_tag() }} {{ form.hidden_tag() }}
{% call macros.card() %} {% call macros.card() %}
{{ macros.form_field(form.localpart, append='<span class="input-group-addon">@'+domain.name+'</span>') }} {{ macros.form_field(form.localpart, append='<span class="input-group-text">@'+domain.name+'</span>') }}
{{ macros.form_fields((form.pw, form.pw2)) }} {{ macros.form_fields((form.pw, form.pw2)) }}
{% if form.captcha %} {% if form.captcha %}
{{ macros.form_field(form.captcha) }} {{ macros.form_field(form.captcha) }}