[Checkins] SVN: z3ext.layoutform/trunk/
Nikolay Kim
fafhrd at datacom.kz
Wed Dec 17 14:17:54 EST 2008
Log message for revision 94156:
Changed:
U z3ext.layoutform/trunk/CHANGES.txt
U z3ext.layoutform/trunk/src/z3ext/layoutform/add.py
U z3ext.layoutform/trunk/src/z3ext/layoutform/edit.py
U z3ext.layoutform/trunk/src/z3ext/layoutform/interfaces.py
U z3ext.layoutform/trunk/src/z3ext/layoutform/subform.py
-=-
Modified: z3ext.layoutform/trunk/CHANGES.txt
===================================================================
--- z3ext.layoutform/trunk/CHANGES.txt 2008-12-17 17:37:20 UTC (rev 94155)
+++ z3ext.layoutform/trunk/CHANGES.txt 2008-12-17 19:17:54 UTC (rev 94156)
@@ -9,7 +9,9 @@
- Fixed 'formError' status message
+- Use button.handler instead of buttonAndHandler
+
1.2.8 (2008-11-21)
------------------
Modified: z3ext.layoutform/trunk/src/z3ext/layoutform/add.py
===================================================================
--- z3ext.layoutform/trunk/src/z3ext/layoutform/add.py 2008-12-17 17:37:20 UTC (rev 94155)
+++ z3ext.layoutform/trunk/src/z3ext/layoutform/add.py 2008-12-17 19:17:54 UTC (rev 94156)
@@ -25,7 +25,7 @@
from z3ext.statusmessage.interfaces import IStatusMessage
from form import PageletForm
-from interfaces import _, IPageletAddForm, IAddButton, ICancelButton
+from interfaces import _, IPageletAddForm, IAddAction, ICancelAction
from zope.proxy import removeAllProxies
@@ -40,7 +40,7 @@
formCancelMessage = _(u'Action has been canceled.')
- @button.buttonAndHandler(_(u'Add'), name='add', provides=IAddButton)
+ @button.buttonAndHandler(_(u'Add'), name='add', provides=IAddAction)
def handleAdd(self, action):
data, errors = self.extractData()
@@ -56,7 +56,7 @@
self.redirect(self.nextURL())
@button.buttonAndHandler(
- _(u'Cancel'), name='cancel', provides=ICancelButton)
+ _(u'Cancel'), name='cancel', provides=ICancelAction)
def handleCancel(self, action):
self._finishedAdd = True
self.redirect(self.cancelURL())
Modified: z3ext.layoutform/trunk/src/z3ext/layoutform/edit.py
===================================================================
--- z3ext.layoutform/trunk/src/z3ext/layoutform/edit.py 2008-12-17 17:37:20 UTC (rev 94155)
+++ z3ext.layoutform/trunk/src/z3ext/layoutform/edit.py 2008-12-17 19:17:54 UTC (rev 94156)
@@ -25,14 +25,14 @@
from z3ext.statusmessage.interfaces import IStatusMessage
from form import PageletForm
-from interfaces import _, IPageletEditForm, ISaveButton
+from interfaces import _, IPageletEditForm, ISaveAction
class PageletEditForm(PageletForm, form.EditForm):
interface.implements(IPageletEditForm)
@button.buttonAndHandler(
- _(u'Save'), name='save', provides=ISaveButton)
+ _(u'Save'), name='save', provides=ISaveAction)
def handleApply(self, action):
data, errors = self.extractData()
if errors:
Modified: z3ext.layoutform/trunk/src/z3ext/layoutform/interfaces.py
===================================================================
--- z3ext.layoutform/trunk/src/z3ext/layoutform/interfaces.py 2008-12-17 17:37:20 UTC (rev 94155)
+++ z3ext.layoutform/trunk/src/z3ext/layoutform/interfaces.py 2008-12-17 19:17:54 UTC (rev 94156)
@@ -17,12 +17,24 @@
"""
from zope import interface, schema
from zope.i18nmessageid import MessageFactory
-from z3c.form.interfaces import IFormLayer, IButton
+from z3c.form.interfaces import IFormLayer
from z3ext.layout.interfaces import IPagelet
_ = MessageFactory('z3ext.layoutform')
+class IAddAction(interface.Interface):
+ """ add action """
+
+
+class ISaveAction(interface.Interface):
+ """ save action """
+
+
+class ICancelAction(interface.Interface):
+ """ cancel action """
+
+
class ILayoutFormLayer(IFormLayer):
""" browser layer """
@@ -99,13 +111,13 @@
"""Update form after manager form updated."""
-class IAddButton(IButton):
+class IAddButton(IAddAction):
""" add button """
-class ISaveButton(IButton):
+class ISaveButton(ISaveAction):
""" save button """
-class ICancelButton(IButton):
+class ICancelButton(ICancelAction):
""" cancel button """
Modified: z3ext.layoutform/trunk/src/z3ext/layoutform/subform.py
===================================================================
--- z3ext.layoutform/trunk/src/z3ext/layoutform/subform.py 2008-12-17 17:37:20 UTC (rev 94155)
+++ z3ext.layoutform/trunk/src/z3ext/layoutform/subform.py 2008-12-17 19:17:54 UTC (rev 94156)
@@ -26,7 +26,7 @@
from utils import applyChanges
from form import PageletBaseForm
-from interfaces import _, IPageletEditSubForm, IPageletSubform, ISaveButton
+from interfaces import _, IPageletEditSubForm, IPageletSubform, ISaveAction
class PageletEditSubForm(subform.EditSubForm, PageletBaseForm):
@@ -38,7 +38,7 @@
render = PageletBaseForm.render
__call__ = PageletBaseForm.__call__
- @button.handler(ISaveButton)
+ @button.handler(ISaveAction)
def handleApply(self, action):
data, errors = self.extractData()
if errors:
More information about the Checkins
mailing list