From 286213026982435e6e87cdbbd5dddcd80e925b91 Mon Sep 17 00:00:00 2001 From: Jocelyn Delalande Date: Wed, 1 Feb 2017 19:41:55 +0100 Subject: Adapt to bootstrap 4 forms - Adapt to BS4 class names and hierarchy - Redesign some forms to have the label above the input (mobile-friendly) - For the remaining inline form (add bill), use the grid, as BS no longer provides inline form alignment helpers --- budget/forms.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'budget/forms.py') diff --git a/budget/forms.py b/budget/forms.py index 77a5ec2..adf3de7 100644 --- a/budget/forms.py +++ b/budget/forms.py @@ -19,14 +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) - html.append(u'

%s | %s

'% (_("Select all"), _("Select none"))) + html.append(u'

%s | %s

'% (_("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) -- cgit v1.1