entities/__init__.py
branchtls-sprint
changeset 1010 73591b2ffeb4
parent 940 15dcdc863965
child 1013 948a3882c94a
equal deleted inserted replaced
1009:bcd0c3ae1935 1010:73591b2ffeb4
   414     def use_fckeditor(self, attr):
   414     def use_fckeditor(self, attr):
   415         """return True if fckeditor should be used to edit entity's attribute named
   415         """return True if fckeditor should be used to edit entity's attribute named
   416         `attr`, according to user preferences
   416         `attr`, according to user preferences
   417         """
   417         """
   418         req = self.req
   418         req = self.req
   419         if req.property_value('ui.fckeditor') and self.has_format(attr):
   419         if self.config.fckeditor_installed() and req.property_value('ui.fckeditor') and self.has_format(attr):
   420             if self.has_eid() or '%s_format' % attr in self:
   420             if self.has_eid() or '%s_format' % attr in self:
   421                 return self.format(attr) == 'text/html'
   421                 return self.format(attr) == 'text/html'
   422             return req.property_value('ui.default-text-format') == 'text/html'
   422             return req.property_value('ui.default-text-format') == 'text/html'
   423         return False
   423         return False
   424 
   424