src/pyams_i18n/zmi/negotiator.py
changeset 1 c62b53e70d9d
parent 0 9c21b8e2ba46
child 17 fa883acc1f55
equal deleted inserted replaced
0:9c21b8e2ba46 1:c62b53e70d9d
    31 
    31 
    32 @pagelet_config(name='properties.html', context=INegotiator, layer=IPyAMSLayer, permission='system.view')
    32 @pagelet_config(name='properties.html', context=INegotiator, layer=IPyAMSLayer, permission='system.view')
    33 class NegotiatorPropertiesEditForm(AdminDialogEditForm):
    33 class NegotiatorPropertiesEditForm(AdminDialogEditForm):
    34     """Negotiator properties edit form"""
    34     """Negotiator properties edit form"""
    35 
    35 
    36     legend = _("Update languages negotiator properties")
       
    37     fields = field.Fields(INegotiator)
       
    38     ajax_handler = 'properties.json'
       
    39 
       
    40     @property
    36     @property
    41     def title(self):
    37     def title(self):
    42         return self.context.__name__
    38         return self.context.__name__
       
    39 
       
    40     legend = _("Update languages negotiator properties")
       
    41 
       
    42     fields = field.Fields(INegotiator)
       
    43     ajax_handler = 'properties.json'
       
    44     edit_permission = 'system.manage'
    43 
    45 
    44     def updateWidgets(self, prefix=None):
    46     def updateWidgets(self, prefix=None):
    45         super(NegotiatorPropertiesEditForm, self).updateWidgets()
    47         super(NegotiatorPropertiesEditForm, self).updateWidgets()
    46         self.widgets['server_language'].addClass('select2')
    48         self.widgets['server_language'].addClass('select2')
    47         self.widgets['policy'].addClass('select2')
    49         self.widgets['policy'].addClass('select2')