[Mpuls-commits] r1994 - wasko/branches/2.0/mpulsweb/lib
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Wed Mar 17 14:29:31 CET 2010
Author: torsten
Date: 2010-03-17 14:29:30 +0100 (Wed, 17 Mar 2010)
New Revision: 1994
Modified:
wasko/branches/2.0/mpulsweb/lib/validators.py
Log:
New CaseBundleValidator
Modified: wasko/branches/2.0/mpulsweb/lib/validators.py
===================================================================
--- wasko/branches/2.0/mpulsweb/lib/validators.py 2010-03-17 11:20:30 UTC (rev 1993)
+++ wasko/branches/2.0/mpulsweb/lib/validators.py 2010-03-17 13:29:30 UTC (rev 1994)
@@ -9,7 +9,7 @@
from formencode import ForEach, All
from formencode.validators import Bool, Int, String, FieldsMatch, StringBoolean, \
DateConverter, DateValidator, TimeConverter, FormValidator, MaxLength, \
- FileUploadKeeper, FieldStorageUploadConverter
+ FileUploadKeeper, FieldStorageUploadConverter, OneOf
from pylons import session, app_globals as g
from pylons.i18n import _
@@ -558,4 +558,10 @@
gender = Int(if_missing='-2')
cm_state = Int(if_missing=None)
+class BundleActionForm(BaseFormValidator):
+ filter_extra_fields = True
+ all_cases = Int(if_missing=0)
+ action = All(String(not_empty=True), OneOf(['no_action']))
+ case_id = ForEach(Int(), convert_to_list=True)
+
# vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8
More information about the Mpuls-commits
mailing list