[icinga-checkins] icinga.org: icingaweb2-module-director/master: DirectorObjectForm: new helper method for disabled

git at icinga.org git at icinga.org
Wed Feb 17 20:01:03 CET 2016


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

Author: Thomas Gelf <thomas at gelf.net>
Date:   Wed Feb 17 20:00:18 2016 +0100

DirectorObjectForm: new helper method for disabled

---

 library/Director/Web/Form/DirectorObjectForm.php |   14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/library/Director/Web/Form/DirectorObjectForm.php b/library/Director/Web/Form/DirectorObjectForm.php
index a9aa6ff..d485b5a 100644
--- a/library/Director/Web/Form/DirectorObjectForm.php
+++ b/library/Director/Web/Form/DirectorObjectForm.php
@@ -848,6 +848,20 @@ abstract class DirectorObjectForm extends QuickForm
         return $this;
     }
 
+    protected function addDisabledElement()
+    {
+        $this->addBoolean(
+            'disabled',
+            array(
+                'label'       => $this->translate('Disabled'),
+                'description' => $this->translate('Disabled objects will not be deployes')
+            ),
+            'n'
+        );
+
+        return $this;
+    }
+
     protected function addCheckCommandElements()
     {
         $this->addElement('select', 'check_command_id', array(



More information about the icinga-checkins mailing list