src/pyams_content/shared/site/zmi/container.py
changeset 600 33811e279b1d
parent 591 b694d5667d17
child 730 8a9dd03f95ac
equal deleted inserted replaced
599:7f97d8cae72e 600:33811e279b1d
   135     edit_permission = MANAGE_SITE_PERMISSION
   135     edit_permission = MANAGE_SITE_PERMISSION
   136 
   136 
   137     def updateWidgets(self, prefix=None):
   137     def updateWidgets(self, prefix=None):
   138         super(SiteContainerWorkflowPublicationEditForm, self).updateWidgets(prefix)
   138         super(SiteContainerWorkflowPublicationEditForm, self).updateWidgets(prefix)
   139         if 'publication_effective_date' in self.widgets:
   139         if 'publication_effective_date' in self.widgets:
   140             widget = self.widgets['publication_effective_date']
   140             pub_info = IWorkflowPublicationInfo(self.context)
   141             if not widget.value:
   141             if pub_info.publication_effective_date is None:
   142                 widget.value = tztime(datetime.utcnow()).strftime('%d/%m/%y %H:%M')
   142                 self.widgets['publication_effective_date'].value = tztime(datetime.utcnow()).strftime('%d/%m/%y %H:%M')
   143 
   143 
   144     def get_ajax_output(self, changes):
   144     def get_ajax_output(self, changes):
   145         output = super(self.__class__, self).get_ajax_output(changes)
   145         output = super(self.__class__, self).get_ajax_output(changes)
   146         if changes:
   146         if changes:
   147             info = IWorkflowPublicationInfo(self.context, None)
   147             info = IWorkflowPublicationInfo(self.context, None)