DirectorJobForm: allow to choose time period
This commit is contained in:
parent
8ac5d954e9
commit
b5fddd60fe
|
@ -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(
|
||||||
|
|
Loading…
Reference in New Issue