[icinga-checkins] icinga.org: icingaweb2-module-director/master: IcingaObjectFieldForm: use default buttons

git at icinga.org git at icinga.org
Sun Feb 28 17:12:39 CET 2016


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

Author: Thomas Gelf <thomas at gelf.net>
Date:   Sun Feb 28 10:51:15 2016 +0100

IcingaObjectFieldForm: use default buttons

---

 application/forms/IcingaObjectFieldForm.php |   15 +++------------
 1 file changed, 3 insertions(+), 12 deletions(-)

diff --git a/application/forms/IcingaObjectFieldForm.php b/application/forms/IcingaObjectFieldForm.php
index 3940814..91d8423 100644
--- a/application/forms/IcingaObjectFieldForm.php
+++ b/application/forms/IcingaObjectFieldForm.php
@@ -46,6 +46,8 @@ class IcingaObjectFieldForm extends DirectorObjectForm
         }
 
         // TODO: think about imported existing vars without fields
+        // TODO: extract vars from command line (-> dummy)
+        // TODO: do not suggest chosen ones
         $argumentVars = array();
         if ($this->icingaObject->supportsArguments()) {
             foreach ($this->icingaObject->arguments() as $arg) {
@@ -117,18 +119,7 @@ class IcingaObjectFieldForm extends DirectorObjectForm
             )
         ));
 
-        if ($this->object === null) {
-            $this->setSubmitLabel(
-                $this->translate('Add new field')
-            );
-        } else {
-            $this->setSubmitLabel(
-                $this->translate('Store')
-            );
-            $this->addElement('submit', 'delete', array(
-                'label' => $this->translate('Delete')
-            ));
-        }
+        $this->setButtons();
     }
 
     protected function onRequest()



More information about the icinga-checkins mailing list