Back to index

plone3  3.1.7
Public Member Functions | Public Attributes | Static Public Attributes | Private Member Functions
plone.app.controlpanel.form.ControlPanelForm Class Reference
Inheritance diagram for plone.app.controlpanel.form.ControlPanelForm:
Inheritance graph
[legend]
Collaboration diagram for plone.app.controlpanel.form.ControlPanelForm:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def handle_edit_action
def handle_cancel_action
def setUpWidgets
def is_fieldsets

Public Attributes

 status
 adapters
 widgets

Static Public Attributes

 validator = null_validator,
string name = u'cancel'

Private Member Functions

def _on_save

Detailed Description

A simple form to be used as a basis for control panel screens.

Definition at line 29 of file form.py.


Member Function Documentation

def plone.app.controlpanel.form.ControlPanelForm._on_save (   self,
  data = None 
) [private]

Definition at line 56 of file form.py.

00056 
00057     def _on_save(self, data=None):
00058         pass

Here is the caller graph for this function:

Reimplemented in plone.app.controlpanel.ram.RAMCacheControlPanel.

Definition at line 48 of file form.py.

00048 
00049     def handle_cancel_action(self, action, data):
00050         IStatusMessage(self.request).addStatusMessage(_("Changes canceled."),
00051                                                       type="info")
00052         url = getMultiAdapter((self.context, self.request),
00053                               name='absolute_url')()
00054         self.request.response.redirect(url + '/plone_control_panel')
00055         return ''
        

Here is the call graph for this function:

Reimplemented in plone.app.controlpanel.ram.RAMCacheControlPanel.

Definition at line 35 of file form.py.

00035 
00036     def handle_edit_action(self, action, data):
00037         CheckAuthenticator(self.request)
00038         if form.applyChanges(self.context, self.form_fields, data,
00039                              self.adapters):
00040             self.status = _("Changes saved.")
00041             notify(ConfigurationChangedEvent(self, data))
00042             self._on_save(data)
00043         else:
00044             self.status = _("No changes made.")

Here is the call graph for this function:

Definition at line 36 of file form.py.

00036 
00037     def is_fieldsets(self):
00038         # We need to be able to test for non-fieldsets in templates.
00039         return IFormFieldsets.providedBy(self.form_fields)
00040 

Here is the caller graph for this function:

def plone.fieldsets.form.FieldsetsEditForm.setUpWidgets (   self,
  ignore_request = False 
) [inherited]

Definition at line 13 of file form.py.

00013 
00014     def setUpWidgets(self, ignore_request=False):
00015         # First part is copied from zope.formlib.form.EditForm licensed under
00016         # the ZPL 2.1
00017         self.adapters = {}
00018         # In order to support fieldsets, we need to setup the widgets on all
00019         # the fieldsets as well.
00020         if self.is_fieldsets():
00021             self.widgets = None
00022             for fieldset in self.form_fields.fieldsets:
00023                 fieldset.widgets = form.setUpEditWidgets(
00024                     fieldset, self.prefix, self.context, self.request,
00025                     adapters=self.adapters, ignore_request=ignore_request
00026                     )
00027                 if self.widgets is None:
00028                     self.widgets = fieldset.widgets
00029                 else:
00030                     self.widgets += fieldset.widgets
00031         else:
00032             self.widgets = form.setUpEditWidgets(
00033                 self.form_fields, self.prefix, self.context, self.request,
00034                 adapters=self.adapters, ignore_request=ignore_request
00035                 )


Member Data Documentation

Definition at line 16 of file form.py.

Reimplemented in plone.app.controlpanel.ram.RAMCacheControlPanel.

Definition at line 47 of file form.py.

Reimplemented in plone.app.controlpanel.ram.RAMCacheControlPanel.

Definition at line 39 of file form.py.

Reimplemented in plone.app.controlpanel.ram.RAMCacheControlPanel.

Definition at line 46 of file form.py.

Definition at line 20 of file form.py.


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