diff options
| author | Alexis Metaireau <alexis@notmyidea.org> | 2011-08-21 01:42:10 +0200 |
|---|---|---|
| committer | Alexis Metaireau <alexis@notmyidea.org> | 2011-08-21 01:42:10 +0200 |
| commit | 7d60bee0ef5a38e6765b9bb51ae7e200157591a0 (patch) | |
| tree | 5437408338e576c339bc402e029cc67589982191 /budget/forms.py | |
| parent | 95fb9bbbfd0636766bb94a6bffdf67deb1172a12 (diff) | |
| download | ihatemoney-mirror-7d60bee0ef5a38e6765b9bb51ae7e200157591a0.zip ihatemoney-mirror-7d60bee0ef5a38e6765b9bb51ae7e200157591a0.tar.gz ihatemoney-mirror-7d60bee0ef5a38e6765b9bb51ae7e200157591a0.tar.bz2 | |
Re-design (Fixes #19)
Diffstat (limited to 'budget/forms.py')
| -rw-r--r-- | budget/forms.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/budget/forms.py b/budget/forms.py index fe14288..51da01f 100644 --- a/budget/forms.py +++ b/budget/forms.py @@ -7,14 +7,13 @@ from datetime import datetime def select_multi_checkbox(field, ul_class='', **kwargs): kwargs.setdefault('type', 'checkbox') field_id = kwargs.pop('id', field.id) - html = [u'<ul %s>' % html_params(id=field_id, class_=ul_class)] + html = [u'<ul %s>' % html_params(id=field_id, class_="inputs-list")] 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><input %s /> ' % html_params(**options)) - html.append(u'<label for="%s">%s</label></li>' % (choice_id, label)) + html.append(u'<li><label for="%s">%s<span>%s</span></label></li>' % (choice_id, '<input %s /> ' % html_params(**options), label)) html.append(u'</ul>') return u''.join(html) |
