From bbd4a1a838bf7bf3c42617cbdcfd7189dec771a4 Mon Sep 17 00:00:00 2001 From: "A.Avenel" Date: Tue, 20 Nov 2012 23:33:32 +0100 Subject: Cosmetic changes for "add a bill" panel --- budget/forms.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'budget/forms.py') diff --git a/budget/forms.py b/budget/forms.py index 4a810de..5d7c18b 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'

    %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 From 8b114c5718e332553a3bb9718c707365f7ab5a0a Mon Sep 17 00:00:00 2001 From: "A.Avenel" Date: Mon, 26 Nov 2012 21:52:25 +0100 Subject: update for "create archive" interface --- budget/forms.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'budget/forms.py') diff --git a/budget/forms.py b/budget/forms.py index 5d7c18b..f243c39 100644 --- a/budget/forms.py +++ b/budget/forms.py @@ -187,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) -- cgit v1.1 From bfea4e436fbe3126949785eff66aef901f6e2f65 Mon Sep 17 00:00:00 2001 From: "A.Avenel" Date: Mon, 18 Feb 2013 19:18:49 +0100 Subject: update for flask 0.9 --- 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 f243c39..9b11085 100644 --- a/budget/forms.py +++ b/budget/forms.py @@ -1,7 +1,7 @@ -from flaskext.wtf import DateField, DecimalField, Email, Form, PasswordField, \ +from flask.ext.wtf import DateField, DecimalField, Email, Form, PasswordField, \ Required, SelectField, SelectMultipleField, SubmitField, TextAreaField, \ TextField, ValidationError -from flaskext.babel import lazy_gettext as _ +from flask.ext.babel import lazy_gettext as _ from flask import request from wtforms.widgets import html_params -- cgit v1.1