Back to index

plone3  3.1.7
Public Member Functions | Static Public Attributes | Private Member Functions
CMFDefault.browser.document.DocumentEditView Class Reference
Inheritance diagram for CMFDefault.browser.document.DocumentEditView:
Inheritance graph
[legend]
Collaboration diagram for CMFDefault.browser.document.DocumentEditView:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def setUpWidgets
def handle_validate

Static Public Attributes

tuple form_fields = form.FormFields(IDocumentSchema)

Private Member Functions

def _handle_success

Detailed Description

Edit view for IMutableDocument.

Definition at line 111 of file document.py.


Member Function Documentation

def CMFDefault.browser.document.DocumentEditView._handle_success (   self,
  action,
  data 
) [private]

Definition at line 129 of file document.py.

00129 
00130     def _handle_success(self, action, data):
00131         body = data.get('upload')
00132         if body:
00133             data['text'] = body.decode(self._getDefaultCharset())
00134         changed = super(DocumentEditView, self)._handle_success(action, data)
00135         if changed:
00136             self.context.updateSafetyBelt(data.get('safety_belt'))
00137         return changed

Here is the call graph for this function:

Here is the caller graph for this function:

def CMFDefault.browser.document.DocumentEditView.handle_validate (   self,
  action,
  data 
)

Definition at line 138 of file document.py.

00138 
00139     def handle_validate(self, action, data):
00140         errors = super(DocumentEditView, self).handle_validate(action, data)
00141         if errors:
00142             return errors
00143         safety_belt = self.request.form['form.safety_belt']
00144         if not self.context.isValidSafetyBelt(safety_belt):
00145             return (_(u'Intervening changes from elsewhere detected. Please '
00146                       u'refetch the document and reapply your changes.'),)
00147         # make sure applyChanges doesn't try to update safety_belt
00148         self.request.form['form.safety_belt'] = self.context._safety_belt
00149         return None
def CMFDefault.browser.document.DocumentEditView.setUpWidgets (   self,
  ignore_request = False 
)

Definition at line 120 of file document.py.

00120 
00121     def setUpWidgets(self, ignore_request=False):
00122         super(DocumentEditView,
00123               self).setUpWidgets(ignore_request=ignore_request)
00124         self.widgets['safety_belt'].hide = True
00125         self.widgets['description'].height = 3
00126         self.widgets['text_format'].orientation = 'horizontal'
00127         self.widgets['upload'].displayWidth = 60
00128         self.widgets['text'].height = 20

Here is the call graph for this function:


Member Data Documentation

Definition at line 116 of file document.py.


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