DirectorJobForm: allow to choose time period

This commit is contained in:
Thomas Gelf 2016-06-17 14:23:34 +02:00
parent 8ac5d954e9
commit b5fddd60fe
1 changed files with 18 additions and 0 deletions

View File

@ -48,6 +48,24 @@ class DirectorJobForm extends DirectorObjectForm
'value' => $jobClass::getSuggestedRunInterval($this) 'value' => $jobClass::getSuggestedRunInterval($this)
)); ));
$periods = $this->db->enumTimeperiods();
if (!empty($periods)) {
$this->addElement(
'select',
'timeperiod_id',
array(
'label' => $this->translate('Time period'),
'description' => $this->translate(
'The name of a time period within this job should be active.'
. ' Supports only simple time periods (weekday and multiple'
. ' time definitions)'
),
'multiOptions' => $this->optionalEnum($periods),
)
);
}
$this->addElement('text', 'job_name', array( $this->addElement('text', 'job_name', array(
'label' => $this->translate('Job name'), 'label' => $this->translate('Job name'),
'description' => $this->translate( 'description' => $this->translate(