[icinga-checkins] icinga.org: icingaweb2/master: FilterEditor: use new id helper in selectSign

git at icinga.org git at icinga.org
Sun Nov 16 00:38:42 CET 2014


Module: icingaweb2
Branch: master
Commit: e6ded2eb3c6fab97f60a9c440238d22f8321ecf3
URL:    https://git.icinga.org/?p=icingaweb2.git;a=commit;h=e6ded2eb3c6fab97f60a9c440238d22f8321ecf3

Author: Thomas Gelf <thomas at gelf.net>
Date:   Sat Nov 15 23:39:21 2014 +0100

FilterEditor: use new id helper in selectSign

---

 library/Icinga/Web/Widget/FilterEditor.php |    7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/library/Icinga/Web/Widget/FilterEditor.php b/library/Icinga/Web/Widget/FilterEditor.php
index 9f88482..51738d8 100644
--- a/library/Icinga/Web/Widget/FilterEditor.php
+++ b/library/Icinga/Web/Widget/FilterEditor.php
@@ -337,9 +337,8 @@ class FilterEditor extends AbstractWidget
         );
     }
 
-    protected function selectSign($filter)
+    protected function selectSign(Filter $filter = null)
     {
-        $name = 'sign_' . $filter->getId();
         $signs = array(
             '='  => '=',
             '!=' => '!=',
@@ -350,9 +349,9 @@ class FilterEditor extends AbstractWidget
         );
 
         return $this->select(
-            $name,
+            $this->elementId('sign', $filter),
             $signs,
-            $filter->getSign(),
+            $filter === null ? null : $filter->getSign(),
             array('style' => 'width: 4em')
         );
     }



More information about the icinga-checkins mailing list