[Checkins] SVN: z3c.form/trunk/ - Bug: When an error occurred in
the sub-form, the status message was not set
Stephan Richter
srichter at cosmos.phy.tufts.edu
Tue Sep 4 14:22:18 EDT 2007
Log message for revision 79464:
- Bug: When an error occurred in the sub-form, the status message was not set
correctly. Fixed the code and the incorrect test. Thanks to Markus
Kemmerling for reporting.
Changed:
U z3c.form/trunk/CHANGES.txt
U z3c.form/trunk/src/z3c/form/subform.py
U z3c.form/trunk/src/z3c/form/subform.txt
-=-
Modified: z3c.form/trunk/CHANGES.txt
===================================================================
--- z3c.form/trunk/CHANGES.txt 2007-09-04 18:12:27 UTC (rev 79463)
+++ z3c.form/trunk/CHANGES.txt 2007-09-04 18:22:18 UTC (rev 79464)
@@ -5,6 +5,10 @@
Version 1.7.0 (9/??/2007)
-------------------------
+- Bug: When an error occurred in the sub-form, the status message was not set
+ correctly. Fixed the code and the incorrect test. Thanks to Markus
+ Kemmerling for reporting.
+
- Bug: Several interfaces had the ``self`` argument in the method
signature. Thanks to Markus Kemmerling for reporting.
Modified: z3c.form/trunk/src/z3c/form/subform.py
===================================================================
--- z3c.form/trunk/src/z3c/form/subform.py 2007-09-04 18:12:27 UTC (rev 79463)
+++ z3c.form/trunk/src/z3c/form/subform.py 2007-09-04 18:22:18 UTC (rev 79464)
@@ -39,7 +39,7 @@
def handleApply(self, action):
data, errors = self.widgets.extract()
if errors:
- form.status = self.formErrorsMessage
+ self.status = self.formErrorsMessage
return
content = self.getContent()
changed = form.applyChanges(self, content, data)
Modified: z3c.form/trunk/src/z3c/form/subform.txt
===================================================================
--- z3c.form/trunk/src/z3c/form/subform.txt 2007-09-04 18:12:27 UTC (rev 79463)
+++ z3c.form/trunk/src/z3c/form/subform.txt 2007-09-04 18:22:18 UTC (rev 79464)
@@ -336,7 +336,7 @@
</body>
</html>
-The itnersting part of this setup is that the "Apply" button calls the action
+The interesting part of this setup is that the "Apply" button calls the action
handlers for both, the main and the sub-form:
>>> request = TestRequest(form={
@@ -470,6 +470,7 @@
...
<fieldset>
<legend>Owner</legend>
+ <i>There were some errors.</i>
<ul>
<li>
Name: <div class="error">Constraint not satisfied</div>
More information about the Checkins
mailing list