aboutsummaryrefslogtreecommitdiff
path: root/budget/forms.py
diff options
context:
space:
mode:
Diffstat (limited to 'budget/forms.py')
-rw-r--r--budget/forms.py22
1 files changed, 0 insertions, 22 deletions
diff --git a/budget/forms.py b/budget/forms.py
index ac181ec..c2455da 100644
--- a/budget/forms.py
+++ b/budget/forms.py
@@ -10,28 +10,6 @@ from datetime import datetime
from jinja2 import Markup
from utils import slugify
-
-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_="inputs-list")]
-
- choice_id = u'toggleField'
- js_function = u'toggle();'
- options = dict(kwargs, id=choice_id, onclick=js_function)
- html.append(u'<p><a href="#" id="selectall" onclick="selectall()">%s</a> | <a href="#" 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'<p class="form-check"><label for="%s" class="form-check-label">%s<span>%s</span></label></p>'
- % (choice_id, '<input %s /> ' % html_params(**options), label))
- html.append(u'</ul>')
- return u''.join(html)
-
-
def get_billform_for(project, set_default=True, **kwargs):
"""Return an instance of BillForm configured for a particular project.