Logo Search packages:      
Sourcecode: zope-atseng version File versions  Download package

def ATSchemaEditorNG::SchemaEditor::SchemaEditor::atse_isFieldVisible (   self,
  fieldname,
  mode = 'view',
  schema_id = None 
)

Returns True if the given field is visible
in the given mode. Default is view.

Definition at line 829 of file SchemaEditor.py.

00829                                                                          :
        """
        Returns True if the given field is visible
        in the given mode. Default is view.
        """
        
        if not schema_id:
            schema_id = self.atse_getDefaultSchemaId()
            
        field = self.atse_getField(schema_id, fieldname)
        if hasattr(field.widget, 'visible'):
            visible = field.widget.visible
            if isinstance(visible, int):
                return visible
            if field.widget.visible.get(mode) == 'invisible':
                return False
            else: return True

        # always True if we've found nothing
        return True

    security.declareProtected(ManageSchemaPermission, 'atse_editorCanUpdate')
    def atse_editorCanUpdate(self, portal_type):


Generated by  Doxygen 1.6.0   Back to index