summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 4eaa6f4)
raw | patch | inline | side by side (parent: 4eaa6f4)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 21 Nov 2007 08:27:28 +0000 (08:27 +0000) | ||
committer | hickert <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
index 8004e8dad8adac09705b88782c3714bb858f498d..b52a00abf1661071236d0911522f5ef553699e1c 100644 (file)
<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>
diff --git a/plugins/admin/fai/class_faiPartitionTable.inc b/plugins/admin/fai/class_faiPartitionTable.inc
index 52f587e58ae90f1baa6ed13c58d756f7ee097e64..a16ac272b21088f004a679ac29af101e03f806d4 100644 (file)
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
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]);
}
}
}
diff --git a/plugins/admin/fai/class_faiPartitionTableEntry.inc b/plugins/admin/fai/class_faiPartitionTableEntry.inc
index 991ed324dbe24e3de7679eef680a0a57ddfe7047..e8ded4e3a24d7de3defca9177e833ccffedf435a 100644 (file)
$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>";
$str .= "\n</tr>";
}
}
- $str.="</table>";
+
+ if(!empty($str)){
+ $str = "<table summary='' style='width:100%'>".$str."</table>";
+ }
return($str);
}
index a595a0289fd3c5c5b6c6adeec68080d50fdd528f..43741e45c9b277e37b83a84ebb8d27781f2f7f23 100644 (file)
/* 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']."&act=edit&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),
diff --git a/plugins/admin/fai/class_faiScriptEntry.inc b/plugins/admin/fai/class_faiScriptEntry.inc
index 5761751c2257516ca2e836494fd7ea8703bd0ce4..5e162f05dd18bde29a9505682aedbdda4617052e 100644 (file)
}
$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)
<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> </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)
</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)
</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}
<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>