aboutsummaryrefslogtreecommitdiff
path: root/budget/templates/forms.html
diff options
context:
space:
mode:
authorFrédéric Sureau <frederic.sureau@gmail.com>2012-04-05 15:40:09 +0200
committerFrédéric Sureau <frederic.sureau@gmail.com>2012-04-05 15:40:09 +0200
commitbe32a2550ec3b40d393620c301bbaa5bb59d1bc2 (patch)
tree7b23aed90fe5a568dc68a38ad790aed191d56b86 /budget/templates/forms.html
parent870101c237cf75f6984df62a9fa6417c73542d1a (diff)
downloadihatemoney-mirror-be32a2550ec3b40d393620c301bbaa5bb59d1bc2.zip
ihatemoney-mirror-be32a2550ec3b40d393620c301bbaa5bb59d1bc2.tar.gz
ihatemoney-mirror-be32a2550ec3b40d393620c301bbaa5bb59d1bc2.tar.bz2
Update to Boostrap v2.
Remove unused libs (QTip, JQueryUI) and add bootstrap-datepicker which is much lighter.
Diffstat (limited to 'budget/templates/forms.html')
-rw-r--r--budget/templates/forms.html43
1 files changed, 20 insertions, 23 deletions
diff --git a/budget/templates/forms.html b/budget/templates/forms.html
index 10b6e0c..8d15cb8 100644
--- a/budget/templates/forms.html
+++ b/budget/templates/forms.html
@@ -1,30 +1,29 @@
{% macro input(field, multiple=False, class=None) -%}
- <div class="clearfix">
-
- {% if field.type != "SubmitField" %}
- {{ field.label }}
+ <div class="control-group">
+ {% if field.type != "SubmitField" %}
+ {{ field.label(class="control-label") }}
+ {% endif %}
+ <div class="controls">
+ {% if multiple == True %}
+ {{ field(multiple=True, class=class) }}
+ {% else %}
+ {{ field(class=class) | safe }}
+ {% endif %}
+ {% if field.description %}
+ <p class="help-inline">{{ field.description }}</p>
{% endif %}
- <div class="input">
- {% if multiple == True %}
- {{ field(multiple=True, class=class) }}
- {% else %}
- {{ field(class=class) | safe }}
- {% endif %}
- {% if field.description %}
- <span class="help-inline">{{ field.description }}</span>
- {% endif %}
</div>
- </div> <!-- /clearfix -->
+ </div>
{% endmacro %}
{% macro submit(field, cancel=False, home=False) -%}
<div class="actions">
- <button type="submit" class="btn primary">{{ field.name }}</button>
+ <button type="submit" class="btn btn-primary">{{ field.name }}</button>
{% if home %}
<a href="{{ url_for(".remind_password") }}">{{ _("Can't remember the password?") }}</a>
{% endif %}
{% if cancel %}
- <button id="cancel-form" type="reset" class="btn">{{ _("Cancel") }}</button>
+ <button type="reset" class="btn">{{ _("Cancel") }}</button>
{% endif %}
</div>
{% endmacro %}
@@ -66,7 +65,7 @@
{{ input(form.password) }}
{{ input(form.contact_email) }}
<div class="actions">
- <button class="btn primary">{{ _("Edit the project") }}</button>
+ <button class="btn btn-primary">{{ _("Edit the project") }}</button>
<a id="delete-project" style="color:red; margin-left:10px; cursor:pointer; ">{{ _("delete") }}</a>
</div>
@@ -85,24 +84,22 @@
{{ input(form.payed_for) }}
</fieldset>
<div class="actions">
- {{ form.submit(class="btn primary") }}
+ {{ form.submit(class="btn btn-primary") }}
{% if not edit %} {{ form.submit2(class="btn") }}{% endif %}
</div>
{% endmacro %}
{% macro add_member(form) %}
- {{ form.hidden_tag() }}
- {{ form.name(class="menu-input") }}
- <button class="btn">{{ _("Add") }}</button>
-
+{{ form.hidden_tag() }}
+{{ form.name(placeholder=_("Type user name here")) }}<button class="btn">{{ _("Add") }}</button>
{% endmacro %}
{% macro invites(form) %}
{{ form.hidden_tag() }}
{{ input(form.emails) }}
<div class="actions">
- <button class="btn primary">{{ _("Send the invitations") }}</button>
+ <button class="btn btn-primary">{{ _("Send the invitations") }}</button>
<a href="{{ url_for(".list_bills") }}">{{ _("No, thanks") }}</a>
</div>
{% endmacro %}