src/pyams_content/shared/blog/zmi/manager.py
changeset 601 5c16e7815b69
parent 591 b694d5667d17
child 956 a8723fffbaf6
equal deleted inserted replaced
600:33811e279b1d 601:5c16e7815b69
   184     edit_permission = MANAGE_SITE_PERMISSION
   184     edit_permission = MANAGE_SITE_PERMISSION
   185 
   185 
   186     def updateWidgets(self, prefix=None):
   186     def updateWidgets(self, prefix=None):
   187         super(BlogManagerWorkflowPublicationEditForm, self).updateWidgets(prefix)
   187         super(BlogManagerWorkflowPublicationEditForm, self).updateWidgets(prefix)
   188         if 'publication_effective_date' in self.widgets:
   188         if 'publication_effective_date' in self.widgets:
   189             widget = self.widgets['publication_effective_date']
   189             pub_info = IWorkflowPublicationInfo(self.context)
   190             if not widget.value:
   190             if pub_info.publication_effective_date is None:
   191                 widget.value = tztime(datetime.utcnow()).strftime('%d/%m/%y %H:%M')
   191                 self.widgets['publication_effective_date'].value = tztime(datetime.utcnow()).strftime('%d/%m/%y %H:%M')