diff --git a/budget/templates/forms.html b/budget/templates/forms.html index 08b8970..5c6a40e 100644 --- a/budget/templates/forms.html +++ b/budget/templates/forms.html @@ -72,10 +72,10 @@ {% endmacro %} -{% macro add_bill(form, edit=False) %} +{% macro add_bill(form, edit=False, title=True) %}
- {% if edit %}{{ _("Edit this bill") }} {% else %}{{ _("Add a bill") }} {% endif %} + {% if title %}{% if edit %}{{ _("Edit this bill") }} {% else %}{{ _("Add a bill") }} {% endif %}{% endif %} {% include "display_errors.html" %} {{ form.hidden_tag() }} {{ input(form.date, class="datepicker") }} diff --git a/budget/templates/list_bills.html b/budget/templates/list_bills.html index c6eeb02..59692d5 100644 --- a/budget/templates/list_bills.html +++ b/budget/templates/list_bills.html @@ -3,6 +3,7 @@ {% block title %}- {{ g.project.name }}{% endblock %} {% block head %} + {% if g.lang != "en" %} {% endif %} @@ -17,26 +18,9 @@ $("#table_overflow").height( $("#sidebar").height()-120 ); }); - // display the form when clicking on the "add bill" button - var show_form = function(){ - $('#bill-form').slideDown(100); - $("#hide-bill-form").show(); - $("#new-bill").hide(); - return false; - } - - // and provide a mechanism to hide it back - var hide_form = function(){ - $("#bill-form").slideUp(100); - $("#new-bill").show(); - $("#hide-bill-form").hide(); - return false; - } - - $('#new-bill').click(show_form); - $('#empty-new-bill').click(show_form); - $('#hide-bill-form').click(hide_form); - $('#cancel-form').click(hide_form); + $('#cancel-form').click(function(){ + $('#bill-form').modal('hide'); + }); // ask for confirmation before removing an user $('.action').each(function(){ @@ -111,12 +95,17 @@ {% block content %}
{{ _("The project identifier is") }} {{ g.project.id }}, {{ _("remember it!") }}
- {{ _("Add a new bill") }} +{{ _("Add a new bill") }} - {% if bills.count() > 0 %} @@ -130,12 +119,8 @@ {% endfor %}
{{ bill.owers|join(', ', 'name') }} {{ "%0.2f"|format(bill.amount) }} ({{ "%0.2f"|format(bill.pay_each()) }} {{ _("each") }}) - - - - - - + {{ _('edit') }} + {{ _('delete') }}