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

def ATExtensions::widget::smartemail::SmartEmailWidget::EmailMask (   self,
  instance,
  value = None 
)

This method calls the masking method as defined in the
  'emailMask' property of the SmartEmailWidget. If the 
  method can not be found or is not callable it falls back to
  using '(et)' as mask for '@'.

Definition at line 31 of file smartemail.py.

00031                                            :
        """ This method calls the masking method as defined in the
          'emailMask' property of the SmartEmailWidget. If the 
          method can not be found or is not callable it falls back to
          using '(et)' as mask for '@'."""
         
        try :
           val=self.mask
           if type(val) in STRING_TYPES:
                method = getattr(instance, val, None)
                if callable(method):
                    value = method(value)
        except :
           LOG('ATExtensions:', WARNING,
               'There are problems with the emailMask poperty. The script '
               'you state has to be available e.g. in the portal_skins folder.'
               ' It should accept one parameter (the string with the raw '
               'emailaddress) and return a string (the masked emailaddress). '
               'You fall back to standard behavior now.')
           value=value.replace('@','(et)') 
        return value
           
    security.declarePublic('linkToMailForm')      
    def linkToMailForm(self,field,instance):


Generated by  Doxygen 1.6.0   Back to index