[Mpuls-commits] r519 - in wasko/trunk: . waskaweb/controllers waskaweb/lib
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Tue Jun 2 09:43:23 CEST 2009
Author: torsten
Date: 2009-06-02 09:43:23 +0200 (Tue, 02 Jun 2009)
New Revision: 519
Modified:
wasko/trunk/ChangeLog.txt
wasko/trunk/waskaweb/controllers/caselifetime.py
wasko/trunk/waskaweb/lib/validators.py
Log:
Fixed issue142
Modified: wasko/trunk/ChangeLog.txt
===================================================================
--- wasko/trunk/ChangeLog.txt 2009-05-27 08:36:33 UTC (rev 518)
+++ wasko/trunk/ChangeLog.txt 2009-06-02 07:43:23 UTC (rev 519)
@@ -1,3 +1,11 @@
+2009-06-02 Torsten Irlaender <torsten.irlaender at intevation.de>
+
+ Fixed issue142
+
+ * waskaweb/controllers/caselifetime.py,
+ waskaweb/lib/validators.py: Do "not" check formvalues if "Antrag ist
+ abgelehnt"
+
2009-05-27 Sascha L. Teichmann <sascha.teichmann at intevation.de>
Fixed issue247
Modified: wasko/trunk/waskaweb/controllers/caselifetime.py
===================================================================
--- wasko/trunk/waskaweb/controllers/caselifetime.py 2009-05-27 08:36:33 UTC (rev 518)
+++ wasko/trunk/waskaweb/controllers/caselifetime.py 2009-06-02 07:43:23 UTC (rev 519)
@@ -9,7 +9,7 @@
from waskaweb.model.case import CaseFactory
from waskaweb.model.logbook import Logbook, LogbookEntry
from waskaweb.model.casedocument import DataSaveException
-from waskaweb.lib.validators import ExtraTimeFormValidator1, ExtraTimeFormValidator2, ReopenFormValidator1, ReopenFormValidator2, RenewFormValidator
+from waskaweb.lib.validators import ExtraTimeFormValidator1, ExtraTimeFormValidator2, ReopenFormValidator1, ReopenFormValidator1abgel, ReopenFormValidator2, ReopenFormValidator2abgel, RenewFormValidator
from waskaweb.model.datapage import DataExtractor
from waskaweb.model.data import WidgetCollector
@@ -468,12 +468,19 @@
form_errors = {}
if c.num_wiederaufnahme < 1:
- validator = ReopenFormValidator1()
+ if request.params.get('cm_wiederauf_genehm_1') == '0':
+ validator = ReopenFormValidator1abgel()
+ else:
+ validator = ReopenFormValidator1()
else:
- validator = ReopenFormValidator2()
+ if request.params.get('cm_wiederauf_genehm_2') == '0':
+ validator = ReopenFormValidator2abgel()
+ else:
+ validator = ReopenFormValidator2()
try:
form_result = validator.to_python(request.params)
+ print form_result
session['lifetimeparams'] = form_result
session.save()
try:
Modified: wasko/trunk/waskaweb/lib/validators.py
===================================================================
--- wasko/trunk/waskaweb/lib/validators.py 2009-05-27 08:36:33 UTC (rev 518)
+++ wasko/trunk/waskaweb/lib/validators.py 2009-06-02 07:43:23 UTC (rev 519)
@@ -434,6 +434,14 @@
cm_wiederauf_datum_bis_1 = DateCheck(not_empty=True)
anmerkungen = formencode.validators.String(not_empty=True)
+class ReopenFormValidator1abgel(BaseFormValidator):
+ allow_extra_fields = True
+ filter_extra_fields = True
+ cm_wiederauf_genehm_1 = formencode.validators.String()
+ cm_wiederauf_genehm_datum_1 = formencode.validators.String()
+ cm_wiederauf_datum_bis_1 = formencode.validators.String()
+ anmerkungen = formencode.validators.String()
+
class ReopenFormValidator2(BaseFormValidator):
allow_extra_fields = True
filter_extra_fields = True
@@ -441,6 +449,13 @@
cm_wiederauf_datum_bis_2 = DateCheck(not_empty=True)
anmerkungen = formencode.validators.String(not_empty=True)
+class ReopenFormValidator2abgel(BaseFormValidator):
+ allow_extra_fields = True
+ filter_extra_fields = True
+ cm_wiederauf_genehm_2 = formencode.validators.String()
+ cm_wiederauf_datum_bis_2 = formencode.validators.String()
+ anmerkungen = formencode.validators.String()
+
class WiederaufnahmeCaseForm(BaseFormValidator):
cm_dok_datum_beendigung = DateCheck(not_empty=True)
cm_dok_end_verm = formencode.validators.String()
More information about the Mpuls-commits
mailing list