summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 2752598)
raw | patch | inline | side by side (parent: 2752598)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 7 Aug 2009 08:41:59 +0000 (08:41 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 7 Aug 2009 08:41:59 +0000 (08:41 +0000) |
-Do not allow to edit the new style partitions when they are freezed
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@13996 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@13996 594d385d-05f5-0310-b6e9-bd551577e9d8
diff --git a/gosa-plugins/fai/admin/fai/class_faiDiskEntry.inc b/gosa-plugins/fai/admin/fai/class_faiDiskEntry.inc
index 577a2365b24f8d01fffbdccb24921f571d3d282b..2975fe0c072e775c4b5a5458488982ee4985dfee 100644 (file)
$opt =array(
"string" => "<i>".preg_replace('/, $/',"",$opt)."</i>");
- $action =array(
- "string" => "<input type='image' src='images/lists/edit.png' name='EditPartition_".$key."'>".
- "<input type='image' src='images/lists/trash.png' name='RemovePartition_".$key."'>",
- "attach" => "style='width:40px; border-right: 0px;'");
+ if(!preg_match("/freeze/", $this->FAIstate)){
+ $action =array(
+ "string" => "<input type='image' src='images/lists/edit.png' name='EditPartition_".$key."'>".
+ "<input type='image' src='images/lists/trash.png' name='RemovePartition_".$key."'>",
+ "attach" => "style='width:40px; border-right: 0px;'");
+ }else{
+ $action =array(
+ "string" => "<input type='image' src='images/lists/edit.png' name='EditPartition_".$key."'>",
+ "attach" => "style='width:40px; border-right: 0px;'");
+ }
+
+
if($this->FAIdiskType == "lvm"){
$fields = array($cn,$desc,$mntp,$opt,$size, $action);
diff --git a/gosa-plugins/fai/admin/fai/class_faiPartition.inc b/gosa-plugins/fai/admin/fai/class_faiPartition.inc
index e0ecbd3b240734165a7c59753df4eb0f57b3cb5e..a6b5ed8ffea2dbcb23cc802a8f1c6330e78a2b00 100644 (file)
$smarty->assign("FAIfsTypes", $FAIfsTypes);
$smarty->assign("cn", $this->cn);
+ $smarty->assign("freeze", preg_match("/freeze/i",$this->parent->FAIstate));
$smarty->assign("plist",$this->getRaidlist());
$smarty->assign("physicalPartitionList",$this->getPartitionlist());
diff --git a/gosa-plugins/fai/admin/fai/class_faiPartitionTable.inc b/gosa-plugins/fai/admin/fai/class_faiPartitionTable.inc
index d40bb8215330344e46dbcd65b9678da14fa1fba0..4f3c269aa214ae452a51a27464217b276671c6db 100644 (file)
}
/* New Listhandling */
- if (!preg_match("/freeze/i", $this->FAIstate)){
- foreach($_POST as $name => $value){
- if(preg_match("/^edit_[^_]*_/",$name)){
- $s_entry = preg_replace("/^edit_/","",$name);
- $s_entry = base64_decode(preg_replace("/_.*/","",$s_entry));
- $s_action = "edit";
- break;
- }
- if(preg_match("/^delete_[^_]*_/",$name)){
- $s_entry = preg_replace("/^delete_/","",$name);
- $s_entry = base64_decode(preg_replace("/_.*/","",$s_entry));
- $s_action = "remove";
- break;
- }
+ foreach($_POST as $name => $value){
+ if(preg_match("/^edit_[^_]*_/",$name)){
+ $s_entry = preg_replace("/^edit_/","",$name);
+ $s_entry = base64_decode(preg_replace("/_.*/","",$s_entry));
+ $s_action = "edit";
+ break;
+ }
+ if (!preg_match("/freeze/i", $this->FAIstate) && preg_match("/^delete_[^_]*_/",$name)){
+ $s_entry = preg_replace("/^delete_/","",$name);
+ $s_entry = base64_decode(preg_replace("/_.*/","",$s_entry));
+ $s_action = "remove";
+ break;
}
}
if($disk['status'] != "delete"){
$act .= "<input type='image' src='images/lists/edit.png' name='edit_%s' title='"._("edit")."' alt='"._("edit")."'>";
- if(preg_match("/d/",$acl)){
+ if(preg_match("/d/",$acl) && !preg_match("/freeze/", $this->FAIstate)){
$act .="<input type='image' src='images/lists/trash.png' name='delete_%s' title='"._("delete")."' alt='"._("delete")."'>";
}
diff --git a/gosa-plugins/fai/admin/fai/faiPartition.tpl b/gosa-plugins/fai/admin/fai/faiPartition.tpl
index fc2da49fd6af24b7f63582bb039767e1e5896c3d..7e63d61c1193101708a7702624f7100c532560b5 100644 (file)
<input type='hidden' name='faiPartition' value='1'>
<p class='seperator'> </p>
<div style='text-align:right; width:100%; padding:5px'>
+ {if !$freeze}
<input type='submit' name='PartitionSave' value='{msgPool type=okButton}'>
+ {/if}
<input type='submit' name='PartitionCancel' value='{msgPool type=cancelButton}'>
</div>