aboutsummaryrefslogtreecommitdiff
path: root/budget/forms.py
diff options
context:
space:
mode:
authorAlexis Metaireau <alexis@notmyidea.org>2013-01-10 15:11:56 -0800
committerAlexis Metaireau <alexis@notmyidea.org>2013-01-10 15:11:56 -0800
commit64385e0fa3139d7392f107c69267e977f72a4d46 (patch)
tree674cc80111db5b92854872c32e0a7815c1ae8871 /budget/forms.py
parent800dcba2c8b26d09c19074d8604c4577d4774600 (diff)
parent8b114c5718e332553a3bb9718c707365f7ab5a0a (diff)
downloadihatemoney-mirror-64385e0fa3139d7392f107c69267e977f72a4d46.zip
ihatemoney-mirror-64385e0fa3139d7392f107c69267e977f72a4d46.tar.gz
ihatemoney-mirror-64385e0fa3139d7392f107c69267e977f72a4d46.tar.bz2
Merge pull request #97 from aavenel/cosmetics
Small changes for UI
Diffstat (limited to 'budget/forms.py')
-rw-r--r--budget/forms.py12
1 files changed, 5 insertions, 7 deletions
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'<li><label for="%s">%s<span>%s</span></label></li>'
- % (choice_id, '<input %s /> ' % html_params(**options), label))
+ html.append(u'<p><a id="selectall" onclick="selectall()">%s</a> | <a id="selectnone" onclick="selectnone()">%s</a></p>'% (_("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'<li><label for="%s">%s<span>%s</span></label></li>'
+ html.append(u'<p><label for="%s">%s<span>%s</span></label></p>'
% (choice_id, '<input %s /> ' % html_params(**options), label))
html.append(u'</ul>')
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)