Code

Updated gotomasses in trunk
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 24 Aug 2007 10:35:02 +0000 (10:35 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 24 Aug 2007 10:35:02 +0000 (10:35 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@7130 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/addons/gotomasses/class_goto_task.inc
plugins/addons/gotomasses/class_gotomasses.inc
plugins/addons/gotomasses/goto_task.tpl

index b905318ff60161dd4fb83ef933d73d49d1af5851..43e72b2d2db51551e6c35a87c165aa5ce8405a70 100644 (file)
@@ -348,7 +348,6 @@ class goto_task extends plugin
   function save_object()
   {
     if(isset($_POST['goto_task_posted'])){
-      plugin::save_object();
 
       if(isset($_POST['configure_dns'])){
         $this->configure_dns = TRUE;
@@ -369,6 +368,7 @@ class goto_task extends plugin
         $this->configure_dhcp = FALSE;
         $this->Section = "\"\"";
       }
+      plugin::save_object();
     }
   }  
 
index 1accb6bf2476f585eba1feda71bb0d3097072280..79bfcbf460026f2684bd0587486b3d0f26e27ab6 100644 (file)
@@ -19,6 +19,7 @@ class gotomasses extends plugin
   var $dialog = FALSE;
   var $ids_to_remove = array();
 
+
   function gotomasses($config, $dn= NULL)
   {
     /* Include config object */
@@ -325,7 +326,7 @@ class gotomasses extends plugin
       $row    = preg_replace('/  */umi'," ",$row);
       $parts  = split(" ",$row);
 
-      if(count($parts) != 8){
+      if(count($parts) != 10){
         print_red(_("Entry broken, skipped."));
       }else{
 
@@ -337,11 +338,16 @@ class gotomasses extends plugin
         $entry['Weekday'] = $parts[4];  
         $entry['Action']  = $parts[5];  
         $entry['OGroup']  = $parts[6];  
+        $entry['Zone']    = $parts[7];  
+        $entry['Section'] = $parts[8];  
         if($entry['Action'] == "initial_install"){
-          $tmp2 = split(";",$parts[7]);
+          $tmp2 = split(";",$parts[9]);
           foreach($tmp2 as $target){
             $tmp = split(",",$target);
-            $entry['Initial_Target'][]  = array("MAC" => $tmp[0],"IP"=>$tmp[1],"NAME" => $tmp[2]);
+            $entry['Initial_Target'][]  = array(
+                          "MAC"     => $tmp[0],
+                          "IP"      => $tmp[1],
+                          "NAME"    => $tmp[2]);
           }
           $entry['Target']  = array();
         }else{
@@ -372,6 +378,8 @@ class gotomasses extends plugin
       }
       $str .= str_pad($task['Action'] ,5," ")." ";
       $str .= str_pad($task['OGroup'] ,5," ")." ";
+      $str .= str_pad($task['Zone']   ,5," ")." ";
+      $str .= str_pad($task['Section'],5," ")." ";
       if($task['Action'] == "initial_install"){
         foreach($task['Initial_Target'] as $target){
           $str .= trim($target['MAC']).",".trim($target['IP']).",".trim($target['NAME']).";";
index 799d910b30901915ba803aa523b8c25b0237740e..36779680c6376b3e37889d6648ef9fa2d814597f 100644 (file)
                                                </select>
                                        </td>
                                </tr>
-                               <tr>
-                                       <td><input class='center' {if $configure_dns} checked {/if} id='configure_dns'
-                                               type='checkbox' name='configure_dns' value='1' onClick="changeState('Zone');">
-                                               <label for='configure_dns'>{t}Configure DNS{/t}</label>
-                                       </td>
-                                       <td>
-                                               <select name="Zone" id="Zone" {if !$configure_dns} disabled {/if}>
-                                                       {html_options options=$Zones selected=$Zone}
-                                               </select>
-                                       </td>
-                               </tr>
-                               <tr>
-                                       <td><input class='center' {if $configure_dhcp} checked {/if} id='configure_dhcp' 
-                                                       type='checkbox' name='configure_dhcp' value='1' onClick="changeState('Section');">
-                                               <label for='configure_dhcp'>{t}Configure DHCP{/t}</label>
-                                       </td>
-                                       <td>
-                                               <select name="Section" id="Section" {if !$configure_dhcp} disabled {/if}>
-                                                       {html_options options=$Sections selected=$Section}
-                                               </select>
-                                       </td>
-                               </tr>
                        </table>
                </td>
                <td style='vertical-align:top'>