Back to index

plone3  3.1.7
Public Member Functions | Public Attributes | Static Public Attributes
plone.app.form.base.EditForm Class Reference
Collaboration diagram for plone.app.form.base.EditForm:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def update
def render
def handle_save_action
def handle_cancel_action

Public Attributes

 widgets
 form_name
 status

Static Public Attributes

 condition = form.haveInputWidgets,
string name = u'save'
 validator = null_validator,

Detailed Description

An edit form with standard Save and Cancel buttons

Definition at line 37 of file base.py.


Member Function Documentation

def plone.app.form.base.EditForm.handle_cancel_action (   self,
  action,
  data 
)

Definition at line 73 of file base.py.

00073 
00074     def handle_cancel_action(self, action, data):
00075         zope.event.notify(EditCancelledEvent(self.context))
00076         url = getMultiAdapter((self.context, self.request), name='absolute_url')()
00077         self.request.response.redirect(url)

Here is the call graph for this function:

def plone.app.form.base.EditForm.handle_save_action (   self,
  action,
  data 
)

Definition at line 58 of file base.py.

00058 
00059     def handle_save_action(self, action, data):
00060         if form.applyChanges(self.context, self.form_fields, data, self.adapters):
00061             zope.event.notify(zope.lifecycleevent.ObjectModifiedEvent(self.context))
00062             zope.event.notify(EditSavedEvent(self.context))
00063             self.status = "Changes saved"
00064         else:
00065             zope.event.notify(EditCancelledEvent(self.context))
00066             self.status = "No changes"
00067             
00068         url = getMultiAdapter((self.context, self.request), name='absolute_url')()
00069         self.request.response.redirect(url)
            

Here is the call graph for this function:

Definition at line 47 of file base.py.

00047 
00048     def render(self):
00049         # If the object is locked, don't show any widgets
00050         lock_info = queryMultiAdapter((self.context, self.request), name="plone_lock_info")
00051         if lock_info is not None and lock_info.is_locked_for_current_user():
00052             self.widgets = form.Widgets([], prefix=self.prefix)
00053             self.form_name = None # hide border
00054         return super(EditForm, self).render()
    

Here is the call graph for this function:

Definition at line 43 of file base.py.

00043 
00044     def update(self):
00045         zope.event.notify(EditBegunEvent(self.context))
00046         super(EditForm, self).update()
        

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

plone.app.form.base.EditForm.condition = form.haveInputWidgets, [static]

Definition at line 56 of file base.py.

Definition at line 52 of file base.py.

string plone.app.form.base.EditForm.name = u'save' [static]

Definition at line 57 of file base.py.

Definition at line 62 of file base.py.

plone.app.form.base.EditForm.validator = null_validator, [static]

Definition at line 71 of file base.py.

Definition at line 51 of file base.py.


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