src/pyams_zmi/zmi/site.py
changeset 82 e87f21d6127b
parent 72 9d4c93d34778
child 85 71863b99d12c
equal deleted inserted replaced
81:2c9c43b12a69 82:e87f21d6127b
   160         return field.Fields(get_configuration_interface(content)).omit('__name__')
   160         return field.Fields(get_configuration_interface(content)).omit('__name__')
   161 
   161 
   162     def getContent(self):
   162     def getContent(self):
   163         return IBackOfficeConfiguration(self.context)
   163         return IBackOfficeConfiguration(self.context)
   164 
   164 
   165     def updateWidgets(self, prefix=None):
       
   166         super(BackOfficePropertiesEditForm, self).updateWidgets(prefix)
       
   167         if 'login_header' in self.widgets:
       
   168             self.widgets['login_header'].widget_css_class = 'textarea'
       
   169         if 'login_footer' in self.widgets:
       
   170             self.widgets['login_footer'].widget_css_class = 'textarea'
       
   171 
       
   172 
   165 
   173 @view_config(name='back-office-properties.json', context=ISiteRoot, request_type=IPyAMSLayer,
   166 @view_config(name='back-office-properties.json', context=ISiteRoot, request_type=IPyAMSLayer,
   174              permission=MANAGE_SYSTEM_PERMISSION, renderer='json', xhr=True)
   167              permission=MANAGE_SYSTEM_PERMISSION, renderer='json', xhr=True)
   175 class BackOfficePropertiesAJAXEditForm(AJAXEditForm, BackOfficePropertiesEditForm):
   168 class BackOfficePropertiesAJAXEditForm(AJAXEditForm, BackOfficePropertiesEditForm):
   176     """Back-office properties edit form, JSON renderer"""
   169     """Back-office properties edit form, JSON renderer"""