[Checkins] SVN: megrok.z3cform.layout/trunk/src/megrok/z3cform/layout/ Removed cancel button handlers and directives from megrok.z3cform.layout and moved it to megrok.z3cform.base
Souheil CHELFOUH
souheil at chelfouh.com
Tue Sep 15 04:03:46 EDT 2009
Log message for revision 103991:
Removed cancel button handlers and directives from megrok.z3cform.layout and moved it to megrok.z3cform.base
Changed:
U megrok.z3cform.layout/trunk/src/megrok/z3cform/layout/README.txt
U megrok.z3cform.layout/trunk/src/megrok/z3cform/layout/__init__.py
D megrok.z3cform.layout/trunk/src/megrok/z3cform/layout/directives.py
-=-
Modified: megrok.z3cform.layout/trunk/src/megrok/z3cform/layout/README.txt
===================================================================
--- megrok.z3cform.layout/trunk/src/megrok/z3cform/layout/README.txt 2009-09-15 07:51:45 UTC (rev 103990)
+++ megrok.z3cform.layout/trunk/src/megrok/z3cform/layout/README.txt 2009-09-15 08:03:46 UTC (rev 103991)
@@ -113,34 +113,3 @@
</span>
</div>
</form>
-
-
-As it's a martian directive, it's inherited :
-
- >>> class AnotherForm(Add):
- ... context(Interface)
- ... fields = Fields(IPerson)
-
- >>> grok_component('anotherform', AnotherForm)
- True
-
- >>> anotherform = getMultiAdapter((peter, request), name="anotherform")
- >>> "form.buttons.cancel" in anotherform()
- True
-
-
-If you need to explicitly remove the use of a Cancel button from a
-form, you can remove it by declaring the cancellable directive set to False:
-
- >>> class YetAnotherForm(Add):
- ... context(Interface)
- ... cancellable(False)
- ... fields = Fields(IPerson)
-
- >>> grok_component('yetanotherform', YetAnotherForm)
- True
-
- >>> yetanotherform = getMultiAdapter((peter, request),
- ... name="yetanotherform")
- >>> "form.buttons.cancel" in yetanotherform()
- False
Modified: megrok.z3cform.layout/trunk/src/megrok/z3cform/layout/__init__.py
===================================================================
--- megrok.z3cform.layout/trunk/src/megrok/z3cform/layout/__init__.py 2009-09-15 07:51:45 UTC (rev 103990)
+++ megrok.z3cform.layout/trunk/src/megrok/z3cform/layout/__init__.py 2009-09-15 08:03:46 UTC (rev 103991)
@@ -1,2 +1 @@
from interfaces import *
-from directives import cancellable
Deleted: megrok.z3cform.layout/trunk/src/megrok/z3cform/layout/directives.py
===================================================================
--- megrok.z3cform.layout/trunk/src/megrok/z3cform/layout/directives.py 2009-09-15 07:51:45 UTC (rev 103990)
+++ megrok.z3cform.layout/trunk/src/megrok/z3cform/layout/directives.py 2009-09-15 08:03:46 UTC (rev 103991)
@@ -1,6 +0,0 @@
-import martian
-
-class cancellable(martian.Directive):
- scope = martian.CLASS
- store = martian.ONCE
- default = False
More information about the checkins
mailing list