Code

Fixed several w3c errors
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 21 Nov 2007 08:27:28 +0000 (08:27 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 21 Nov 2007 08:27:28 +0000 (08:27 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@7837 594d385d-05f5-0310-b6e9-bd551577e9d8

ihtml/themes/default/headers.tpl
plugins/admin/fai/class_faiPartitionTable.inc
plugins/admin/fai/class_faiPartitionTableEntry.inc
plugins/admin/fai/class_faiScript.inc
plugins/admin/fai/class_faiScriptEntry.inc
plugins/admin/fai/faiPartitionTable.tpl
plugins/admin/fai/faiProfileEntry.tpl
plugins/admin/fai/faiScriptEntry.tpl

index 8004e8dad8adac09705b88782c3714bb858f498d..b52a00abf1661071236d0911522f5ef553699e1c 100644 (file)
@@ -19,6 +19,7 @@
   <style type="text/css">@import url('themes/default/style.css');</style>
   <link rel="shortcut icon" href="favicon.ico">
 
+  <script language="javascript" src="include/events.js" type="text/javascript"></script>
   <script language="javascript" src="include/png.js" type="text/javascript"></script>
   <script language="javascript" src="include/calendar.js" type="text/javascript"></script>
   <script language="javascript" src="include/focus.js" type="text/javascript"></script>
index 52f587e58ae90f1baa6ed13c58d756f7ee097e64..a16ac272b21088f004a679ac29af101e03f806d4 100644 (file)
@@ -158,30 +158,31 @@ class faiPartitionTable extends plugin
 
     if((isset($_POST['EditDisk']))&&(isset($_POST['disks']))){
       $usedDiskNames =array();
-
       $Udisk = $_POST['disks'][0];
-      
-      foreach($this->disks  as $key=>$disk){
-        if($key != $Udisk){
-          $usedDiskNames[]= $key;
+      if(isset($this->disks[$Udisk])){
+
+        foreach($this->disks  as $key=>$disk){
+          if($key != $Udisk){
+            $usedDiskNames[]= $key;
+          }
         }
-      }
-    
-      /* Set object info string, which will be displayed in plugin info line */ 
-      if(isset($this->disks[$Udisk]['dn'])){
-        $_SESSION['objectinfo'] = $this->disks[$Udisk]['dn'];
-        $dn = $this->disks[$Udisk]['dn'];
-      }else{
-        $_SESSION['objectinfo'] = "";
-        $dn = "new";
-      }
 
-      $this->dialog = new faiPartitionTableEntry($this->config,$this->dn,$usedDiskNames,$this->disks[$Udisk]); 
-      $this->dialog->set_acl_base($this->acl_base_for_current_object($dn));
-      $this->dialog->set_acl_category("fai");
-      $this->dialog->FAIstate = $this->FAIstate;
-     
-      $this->is_dialog = true;
+        /* Set object info string, which will be displayed in plugin info line */ 
+        if(isset($this->disks[$Udisk]['dn'])){
+          $_SESSION['objectinfo'] = $this->disks[$Udisk]['dn'];
+          $dn = $this->disks[$Udisk]['dn'];
+        }else{
+          $_SESSION['objectinfo'] = "";
+          $dn = "new";
+        }
+
+        $this->dialog = new faiPartitionTableEntry($this->config,$this->dn,$usedDiskNames,$this->disks[$Udisk]); 
+        $this->dialog->set_acl_base($this->acl_base_for_current_object($dn));
+        $this->dialog->set_acl_category("fai");
+        $this->dialog->FAIstate = $this->FAIstate;
+
+        $this->is_dialog = true;
+      }
     }
 
     /* Edit aborted, close dialog, without saving anything
@@ -240,20 +241,23 @@ class faiPartitionTable extends plugin
     if((isset($_POST['DelDisk']))&&(!empty($_POST['disks']))){
       if($this->FAIstate != "freeze"){
         foreach($_POST['disks'] as $disk) {
-          if($this->disks[$disk]['status']=="edited"){
-            $this->disks[$disk."-delete"]=$this->disks[$disk];
-            unset($this->disks[$disk]);
-            $disk = $disk."-delete";        
-            $this->disks[$disk]['status']="delete";
-            foreach($this->disks[$disk]['partitions'] as $name => $value ){
-              if($value['status']=="edited"){
-                $this->disks[$disk]['partitions'][$name]['status']="delete"; 
-              }else{
-                unset($this->disks[$disk]['partitions'][$name]);
+
+          if(isset($this->disks[$disk])){
+            if($this->disks[$disk]['status']=="edited"){
+              $this->disks[$disk."-delete"]=$this->disks[$disk];
+              unset($this->disks[$disk]);
+              $disk = $disk."-delete";        
+              $this->disks[$disk]['status']="delete";
+              foreach($this->disks[$disk]['partitions'] as $name => $value ){
+                if($value['status']=="edited"){
+                  $this->disks[$disk]['partitions'][$name]['status']="delete"; 
+                }else{
+                  unset($this->disks[$disk]['partitions'][$name]);
+                }
               }
+            }else{
+              unset($this->disks[$disk]);
             }
-          }else{
-            unset($this->disks[$disk]);
           }
         }
       }
index 991ed324dbe24e3de7679eef680a0a57ddfe7047..e8ded4e3a24d7de3defca9177e833ccffedf435a 100644 (file)
@@ -183,7 +183,7 @@ class faiPartitionTableEntry extends plugin
     $FAIfsTypes       = array("ext2","ext3","xfs","swap","reiser","dosfat16","winfat32");
 
     /* Display Header */
-    $str = "<table summary='' style='width:100%'>";
+    $str = "";
     if (count($this->partitions)){
       $str .= "<tr>";
       $str .= "<td><b>"._("Type")."</b></td>";
@@ -298,7 +298,10 @@ class faiPartitionTableEntry extends plugin
         $str .= "\n</tr>";    
       }
     }
-    $str.="</table>";
+    
+    if(!empty($str)){
+      $str = "<table summary='' style='width:100%'>".$str."</table>";
+    }
     return($str);
 
   }
index a595a0289fd3c5c5b6c6adeec68080d50fdd528f..43741e45c9b277e37b83a84ebb8d27781f2f7f23 100644 (file)
@@ -369,7 +369,7 @@ class faiScript extends plugin
       /* Check if we are allowed to view this object */
       $s_acl = $this->ui->get_permissions($dn,"fai/faiScriptEntry","cn")  ;
       if(preg_match("/r/",$s_acl)){
-        $divlist->AddEntry(array( array("string"=>"<a href='?plug=".$_GET['plug']."&act=edit&id=".$key."'>".$name['name']."</a>"),
+        $divlist->AddEntry(array( array("string"=>"<a href='?plug=".$_GET['plug']."&amp;act=edit&amp;id=".$key."'>".$name['name']."</a>"),
               array("string"=>$name['FAIpriority'] , "attach" => "style='width:100px;'"),
               array("string"=>$down , "attach" => "style='width:100px;'"),
               array("string"=>str_replace("%s",base64_encode($key),$act),
index 5761751c2257516ca2e836494fd7ea8703bd0ce4..5e162f05dd18bde29a9505682aedbdda4617052e 100644 (file)
@@ -106,6 +106,11 @@ class faiScriptEntry extends plugin
     }
 
     $smarty->assign("FAIprioritys",$FAIprioritys);
+    if(get_magic_quotes_gpc()){
+      $smarty->assign("FAIscript" , htmlentities(stripslashes($this->FAIscript)));
+    }else{
+      $smarty->assign("FAIscript" , htmlentities($this->FAIscript));
+    }
     $display.= $smarty->fetch(get_template_path('faiScriptEntry.tpl', TRUE));
     return($display);
   }
index 20f6ee197aa6c7a3017dbbbec9e03f80401625ed..f330fe67b1570819044a01560c152243e2286567 100644 (file)
@@ -43,6 +43,7 @@
                                        <td>
                                                <select name="disks[]" title="{t}Choose a disk to delete or edit{/t}" style="width:100%" size="20" id="SubObject" multiple>
                                                        {html_options options=$disks}
+                                                       <option>&nbsp;</option>
                                                </select><br>
 {if $sub_object_is_addable}
                                                <input type="submit" name="AddDisk"     value="{t}Add{/t}"     title="{t}Add{/t}">
index 66616287c138a4a2a426c4fd24e5be8f1e7ba3b9..72e865bea624ab8ed6d0be66ec92065d9e8d3aa5 100644 (file)
@@ -64,7 +64,7 @@
                </div>
        </td>
 </tr>
-</table summary="">
+</table>
 
 <div align="right" style="align:right;">
        <input name="SaveSubObject" value="{t}Apply{/t}" type="submit">
index 78e4db35029d4dedc0a06f549a40c0d9c5059642..36db68c31f8330af2331107ec0e3244ef6e75543 100644 (file)
@@ -40,7 +40,7 @@
                                                </td>
                                                <td>
 {render acl=$FAIpriorityACL}
-                                                   <select name="FAIpriority" title="{t}Choose a priority{/t}">
+                                                   <select id="FAIpriority" name="FAIpriority" title="{t}Choose a priority{/t}">
                                                {html_options options=$FAIprioritys selected=$FAIpriority}
                                        </select>
 {/render}
@@ -60,7 +60,8 @@
     <tr>
         <td>
 {render acl=$FAIscriptACL}
-            <textarea name="FAIscript" style="width:100%;height:300px;" id="FAIscript"  >{$FAIscript}</textarea>
+            <textarea name="FAIscript" style="width:100%;height:300px;" id="FAIscript"  
+                               rows="20" cols="120">{$FAIscript}</textarea>
 {/render}
         </td>
     </tr>