Code

Updated System Selection
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 21 Jan 2010 16:07:39 +0000 (16:07 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 21 Jan 2010 16:07:39 +0000 (16:07 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@15239 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/goto/addons/goto/events/class_EventTargetAddList.inc
gosa-plugins/goto/addons/goto/events/eventTargetSystems-filter.xml

index e0f8e6db060b88f3c1872be145cc44a8168ed5b4..01a1cabe0b58e8f48d2438526967063761d44fb1 100644 (file)
@@ -35,13 +35,13 @@ class EventTargetAddList extends management
         get_ou("workstationRDN"), 
         get_ou('terminalRDN'));
 
-#    // Build filter
-#    if (session::global_is_set(get_class($this)."_filter")){
-#      $filter= session::global_get(get_class($this)."_filter");
-#    } else {
+    // Build filter
+    if (session::global_is_set(get_class($this)."_filter")){
+      $filter= session::global_get(get_class($this)."_filter");
+    } else {
       $filter = new filter(get_template_path("../../addons/goto/events/eventTargetSystems-filter.xml", TRUE));
       $filter->setObjectStorage($this->storagePoints);
-#    }
+    }
     $this->setFilter($filter);
 
     // Build headpage
@@ -51,21 +51,6 @@ class EventTargetAddList extends management
   }
 
   function save_object() {}
-  function Draw(){
-      
-  }
-
-  function execute()
-  {
-    $str = management::execute();
-    $str.= "<p class='separator'>&nbsp;</p>
-      <p style=\"text-align:right\">
-      <input type=submit name=\"SaveMultiSelectWindow\" value=\"".msgPool::okButton()."\">
-      &nbsp; 
-      <input type=submit name=\"CloseMultiSelectWindow\" value=\"".msgPool::cancelButton()."\">
-      </p>";
-    return($str);
-  }
 
   function save()
   {
@@ -78,6 +63,20 @@ class EventTargetAddList extends management
     }
     return($ret);
   }
+
+  function get_selected_targets()
+  {
+    $entries = $this->save();
+    $macs = array();
+    $ldap = $this->config->get_ldap_link();
+    $ldap->cd($this->config->current['BASE']);
+    foreach($entries as $entry){
+      if(isset($entry['macAddress'][0])){
+        $macs[] = $entry['macAddress'][0];
+      }
+    }
+    return($macs);
+  }
 }
 // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
 ?>
index 609dde5d0f95f8dd792c744569a21f73ac1c942e..7aa75de8d11eb9c2bdeac2a130b7c8deb7151df6 100644 (file)
   <element>
     <type>checkbox</type>
     <tag>BYIP</tag>
-    <default>false</default>
+    <default></default>
     <set>__FilterByIP__</set>
     <unset></unset>
   </element>