From f4129a621f5a92a0439ec5e1ff22089e7ed0966d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Wed, 18 Jul 2018 09:24:49 +0200 Subject: [PATCH] workflows: improve wording of automatic global actions (#25176) --- wcs/admin/workflows.py | 2 +- wcs/workflows.py | 14 +++++++++----- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/wcs/admin/workflows.py b/wcs/admin/workflows.py index e7dd2c05..c408d215 100644 --- a/wcs/admin/workflows.py +++ b/wcs/admin/workflows.py @@ -1267,7 +1267,7 @@ class GlobalActionPage(WorkflowStatusPage): def get_new_trigger_form(self): form = Form(enctype='multipart/form-data', action='newtrigger') available_triggers = [ - ('timeout', _('Timeout')), + ('timeout', _('Automatic')), ('manual', _('Manual')), ] form.add(SingleSelectWidget, 'type', title=_('Type'), diff --git a/wcs/workflows.py b/wcs/workflows.py index cd997f97..90074e5e 100644 --- a/wcs/workflows.py +++ b/wcs/workflows.py @@ -1005,16 +1005,16 @@ class WorkflowGlobalActionTimeoutTrigger(WorkflowGlobalActionTrigger): def render_as_line(self): if self.properly_configured(): - return _('Timeout, %(timeout)s, relative to: %(anchor)s') % { + return _('Automatic, %(timeout)s, relative to: %(anchor)s') % { 'anchor': self.get_anchor_labels().get(self.anchor).lower(), 'timeout': _('%s days') % self.timeout} else: - return _('Timeout (not configured)') + return _('Automatic (not configured)') def form(self, workflow): form = Form(enctype='multipart/form-data') options = self.get_anchor_labels().items() - form.add(SingleSelectWidget, 'anchor', title=_('Anchor'), + form.add(SingleSelectWidget, 'anchor', title=_('Reference Date'), options=options, value=self.anchor, required=True, attrs={'data-dynamic-display-parent': 'true'}) @@ -1037,11 +1037,15 @@ class WorkflowGlobalActionTimeoutTrigger(WorkflowGlobalActionTrigger): 'data-dynamic-display-value': _('Latest arrival in status')} ) - form.add(ValidatedStringWidget, 'timeout', title=_('Timeout'), + form.add(ValidatedStringWidget, 'timeout', title=_('Delay (in days)'), value=self.timeout, regex=r'^-?\d+$', required=True, - hint=_('Number of days, relative to anchor point.')) + hint=_(''' + Number of days relative to the reference date. If the + reference date is computed from an expression, a negative + delay is accepted to trigger the action before the + date.''')) return form -- 2.18.0