diff options
| author | Alexis Metaireau <alexis@notmyidea.org> | 2017-02-15 20:42:48 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-02-15 20:42:48 +0100 |
| commit | 3dd7c67ecf5e2c5d21ec387bbd82e0fa3b90ad5b (patch) | |
| tree | f15a0a568faf6ea5e0c14abcef274f0c658c4b3f /budget/templates/forms.html | |
| parent | bb5ad597f5b1f20e741be0b8ac1f54c1538df4a3 (diff) | |
| parent | 57596b5f46555b2163c849c83f97ac5d779d9b25 (diff) | |
| download | ihatemoney-mirror-3dd7c67ecf5e2c5d21ec387bbd82e0fa3b90ad5b.zip ihatemoney-mirror-3dd7c67ecf5e2c5d21ec387bbd82e0fa3b90ad5b.tar.gz ihatemoney-mirror-3dd7c67ecf5e2c5d21ec387bbd82e0fa3b90ad5b.tar.bz2 | |
Merge pull request #172 from JocelynDelalande/jd-bootstrap-4
WIP: Upgrade to bootstrap 4
Diffstat (limited to 'budget/templates/forms.html')
| -rw-r--r-- | budget/templates/forms.html | 28 |
1 files changed, 18 insertions, 10 deletions
diff --git a/budget/templates/forms.html b/budget/templates/forms.html index 07e5b3d..af24fe2 100644 --- a/budget/templates/forms.html +++ b/budget/templates/forms.html @@ -1,9 +1,13 @@ -{% macro input(field, multiple=False, class=None) -%} - <div class="control-group"> +{% macro input(field, multiple=False, class='form-control', inline=False) -%} + <div class="form-group{% if inline %} row{% endif %}"> {% if field.type != "SubmitField" %} - {{ field.label(class="control-label") }} + {% if inline %} + {{ field.label(class="col-3") }} + {% else %} + {{ field.label() }} + {% endif %} {% endif %} - <div class="controls"> + <div class="controls{% if inline %} col-9{% endif %}"> {% if multiple == True %} {{ field(multiple=True, class=class) }} {% else %} @@ -77,11 +81,11 @@ {% if title %}<legend>{% if edit %}{{ _("Edit this bill") }} {% else %}{{ _("Add a bill") }} {% endif %}</legend>{% endif %} {% include "display_errors.html" %} {{ form.hidden_tag() }} - {{ input(form.date, class="datepicker") }} - {{ input(form.what) }} - {{ input(form.payer) }} - {{ input(form.amount) }} - {{ input(form.payed_for) }} + {{ input(form.date, class="form-control datepicker", inline=True) }} + {{ input(form.what, inline=True) }} + {{ input(form.payer, inline=True, class="form-control custom-select") }} + {{ input(form.amount, inline=True) }} + {{ input(form.payed_for, inline=True, class="form-check-input") }} </fieldset> <div class="actions"> {{ form.submit(class="btn btn-primary") }} @@ -92,7 +96,11 @@ {% macro add_member(form) %} {{ form.hidden_tag() }} -{{ form.name(placeholder=_("Type user name here")) }}<button class="btn">{{ _("Add") }}</button> + <div class="input-group"> + <label class="sr-only" for="name">_("Type user name here")</label> + {{ form.name(placeholder=_("Type user name here"), class="form-control") }} + <button class=" input-group-addon btn">{{ _("Add") }}</button> + </div> {% endmacro %} {% macro edit_member(form, title=True) %} |
