diff --git a/budget/forms.py b/budget/forms.py index 4a810de..f243c39 100644 --- a/budget/forms.py +++ b/budget/forms.py @@ -19,16 +19,14 @@ def select_multi_checkbox(field, ul_class='', **kwargs): choice_id = u'toggleField' js_function = u'toggle();' options = dict(kwargs, id=choice_id, onclick=js_function) - label = _("Select All/None") - html.append(u'
' - % (choice_id, ' ' % html_params(**options), label)) + html.append(u''% (_("Select all"), _("Select none"))) for value, label, checked in field.iter_choices(): choice_id = u'%s-%s' % (field_id, value) options = dict(kwargs, name=field.name, value=value, id=choice_id) if checked: options['checked'] = 'checked' - html.append(u'' + html.append(u'' % (choice_id, ' ' % html_params(**options), label)) html.append(u'') return u''.join(html) @@ -189,6 +187,6 @@ class InviteForm(Form): class CreateArchiveForm(Form): - start_date = DateField(_("Start date"), validators=[Required(), ]) - end_date = DateField(_("End date"), validators=[Required(), ]) - name = TextField(_("Name for this archive (optional)")) + name = TextField(_("Name for this archive (optional)"), validators=[]) + start_date = DateField(_("Start date"), validators=[Required()]) + end_date = DateField(_("End date"), validators=[Required()], default=datetime.now) diff --git a/budget/static/css/main.css b/budget/static/css/main.css index c3c8ed9..3274241 100644 --- a/budget/static/css/main.css +++ b/budget/static/css/main.css @@ -189,6 +189,10 @@ tr.payer_line .balance-name{ position: absolute; } +.modal-body { + max-height:455px; +} + /* Fluid Offsets for Boostrap */ .row-fluid > [class*="span"]:not([class*="offset"]):first-child{margin-left:0;} diff --git a/budget/static/js/ihatemoney.js b/budget/static/js/ihatemoney.js index 6a813b9..24e82b7 100644 --- a/budget/static/js/ihatemoney.js +++ b/budget/static/js/ihatemoney.js @@ -1,17 +1,18 @@ - // Add a script to select all or non of the checkboxes in the add_bill form - function toggle() + // Add scripts to select all or non of the checkboxes in the add_bill form +function selectall() { var els = document.getElementsByName('payed_for'); for(var i =0;i{{ _("Project") }} | {{ _("Number of members") }} | {{ _("Number of bills") }} | {{_("Newest bill")}} | {{_("Oldest bill")}} | ||
---|---|---|---|---|---|---|
{{ project.name }} | {{ project.members | count }} | {{ project.get_bills().count() }} | -{% if project.has_bills() %} -{{ project.get_bills().all()[0].date }} | -{{ project.get_bills().all()[-1].date }} | -{% else %} -- | -{% endif %} - |
{{ project.name }} | {{ project.members | count }} | {{ project.get_bills().count() }} | + {% if project.has_bills() %} +{{ project.get_bills().all()[0].date }} | +{{ project.get_bills().all()[-1].date }} | + {% else %} ++ | + {% endif %} + |