Back to index

plone3  3.1.7
Public Member Functions | Public Attributes | Static Public Attributes
plone.app.portlets.browser.formhelper.EditForm Class Reference
Inheritance diagram for plone.app.portlets.browser.formhelper.EditForm:
Inheritance graph
[legend]
Collaboration diagram for plone.app.portlets.browser.formhelper.EditForm:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def __call__
def referer
def nextURL
def handle_save_action
def handle_cancel_action

Public Attributes

 status

Static Public Attributes

tuple form_name = _(u"Modify portlet")
 condition = form.haveInputWidgets,
string name = u'save'
 validator = null_validator,

Detailed Description

An edit form for portlets.

Definition at line 114 of file formhelper.py.


Member Function Documentation

Definition at line 122 of file formhelper.py.

00122 
00123     def __call__(self):
00124         IPortletPermissionChecker(aq_parent(aq_inner(self.context)))()
00125         return super(EditForm, self).__call__()
    

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 157 of file formhelper.py.

00157 
00158     def handle_cancel_action(self, action, data):
00159         nextURL = self.nextURL()
00160         if nextURL:
00161             self.request.response.redirect(self.nextURL())
00162         return ''

Here is the call graph for this function:

Definition at line 142 of file formhelper.py.

00142 
00143     def handle_save_action(self, action, data):
00144         if form.applyChanges(self.context, self.form_fields, data, self.adapters):
00145             zope.event.notify(zope.lifecycleevent.ObjectModifiedEvent(self.context))
00146             self.status = "Changes saved"
00147         else:
00148             self.status = "No changes"
00149             
00150         nextURL = self.nextURL()
00151         if nextURL:
00152             self.request.response.redirect(self.nextURL())
00153         return ''
            

Here is the call graph for this function:

Definition at line 129 of file formhelper.py.

00129 
00130     def nextURL(self):
00131         referer = self.request.form.get('referer')
00132         if referer:
00133             return referer
00134         else:    
00135             portlet = aq_inner(self.context)
00136             context = aq_parent(portlet)
00137             url = str(getMultiAdapter((context, self.request), name=u"absolute_url"))
00138             return url + '/@@manage-portlets'
    

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 126 of file formhelper.py.

00126 
00127     def referer(self):
00128         return self.request.get('referer', '')


Member Data Documentation

Definition at line 140 of file formhelper.py.

tuple plone.app.portlets.browser.formhelper.EditForm.form_name = _(u"Modify portlet") [static]

Definition at line 120 of file formhelper.py.

Definition at line 141 of file formhelper.py.

Definition at line 145 of file formhelper.py.

Definition at line 155 of file formhelper.py.


The documentation for this class was generated from the following file: