src/pyams_content/component/paragraph/zmi/milestone.py
changeset 1232 d61066e2bb63
parent 1127 a76066afc55b
child 1243 837612af4dc3
equal deleted inserted replaced
1231:20fbc5f350d1 1232:d61066e2bb63
   317     icon_css_class = 'fa fa-fw fa-arrow-h'
   317     icon_css_class = 'fa fa-fw fa-arrow-h'
   318 
   318 
   319     fields = field.Fields(IMilestone).omit('__parent__', '__name__', 'visible')
   319     fields = field.Fields(IMilestone).omit('__parent__', '__name__', 'visible')
   320     edit_permission = MANAGE_CONTENT_PERMISSION
   320     edit_permission = MANAGE_CONTENT_PERMISSION
   321 
   321 
       
   322     def updateWidgets(self, prefix=None):
       
   323         super(MilestoneAddForm, self).updateWidgets(prefix)
       
   324         if 'label' in self.widgets:
       
   325             self.widgets['label'].widget_css_class = 'input height-100'
       
   326 
   322     def create(self, data):
   327     def create(self, data):
   323         return Milestone()
   328         return Milestone()
   324 
   329 
   325     def add(self, object):
   330     def add(self, object):
   326         IMilestoneContainer(self.context).append(object)
   331         IMilestoneContainer(self.context).append(object)
   343     legend = _("Edit milestone properties")
   348     legend = _("Edit milestone properties")
   344     icon_css_class = 'fa fa-fw fa-arrows-h'
   349     icon_css_class = 'fa fa-fw fa-arrows-h'
   345 
   350 
   346     fields = field.Fields(IMilestone).omit('__parent__', '__name__', 'visible')
   351     fields = field.Fields(IMilestone).omit('__parent__', '__name__', 'visible')
   347     edit_permission = MANAGE_CONTENT_PERMISSION
   352     edit_permission = MANAGE_CONTENT_PERMISSION
       
   353 
       
   354     def updateWidgets(self, prefix=None):
       
   355         super(MilestonePropertiesEditForm, self).updateWidgets(prefix)
       
   356         if 'label' in self.widgets:
       
   357             self.widgets['label'].widget_css_class = 'input height-100'
   348 
   358 
   349     def get_ajax_output(self, changes):
   359     def get_ajax_output(self, changes):
   350         output = super(self.__class__, self).get_ajax_output(changes)
   360         output = super(self.__class__, self).get_ajax_output(changes)
   351         if changes:
   361         if changes:
   352             target = get_parent(self.context, IMilestoneContainerTarget)
   362             target = get_parent(self.context, IMilestoneContainerTarget)