[icinga-checkins] icinga.org: icingaweb2-module-director/master: DirectorJobForm: use enumJobTypes()

git at icinga.org git at icinga.org
Thu Jun 16 15:09:52 CEST 2016


Module: icingaweb2-module-director
Branch: master
Commit: 61ff51c52b9eae31449fe6f98390765fbab20e51
URL:    https://git.icinga.org/?p=icingaweb2-module-director.git;a=commit;h=61ff51c52b9eae31449fe6f98390765fbab20e51

Author: Thomas Gelf <thomas at gelf.net>
Date:   Thu Jun 16 14:42:02 2016 +0200

DirectorJobForm: use enumJobTypes()

---

 application/forms/DirectorJobForm.php |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/application/forms/DirectorJobForm.php b/application/forms/DirectorJobForm.php
index 51bf36e..e083ada 100644
--- a/application/forms/DirectorJobForm.php
+++ b/application/forms/DirectorJobForm.php
@@ -9,10 +9,12 @@ class DirectorJobForm extends DirectorObjectForm
 {
     public function setup()
     {
+        $jobTypes = $this->enumJobTypes();
+
         $this->addElement('select', 'job_class', array(
             'label'        => $this->translate('Job Type'),
             'required'     => true,
-            'multiOptions' => $this->optionalEnum($this->enumJobTypes()),
+            'multiOptions' => $this->optionalEnum($jobTypes),
             'description'  => $this->translate(
                 'These are different available job types'
             ),



More information about the icinga-checkins mailing list