Code

Hide 'Toggle remove flag' when editing freezed package lists
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 5 Sep 2006 10:47:06 +0000 (10:47 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 5 Sep 2006 10:47:06 +0000 (10:47 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@4595 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/fai/class_faiPackage.inc
plugins/admin/fai/faiPackage.tpl

index c91282532bf8c2fbeb9251b61fc629022e843f04..4591201beef8d0536c70a981b03f056e1970713b 100644 (file)
@@ -282,16 +282,18 @@ class faiPackage extends plugin
     }
 
     /* Configuration dialog open*/
-    if((isset($_POST['Markpkg']))&&(isset($_POST['usedPackages']))&&(!empty($_POST['usedPackages']))){
-      foreach($_POST['usedPackages'] as $pkg){
-        if (isset($this->usedPackages[$pkg])){
-          unset($this->usedPackages[$pkg]);
-          if (preg_match('/^-/', $pkg)){
-            $pkg= preg_replace('/^-/', '', $pkg);
-          } else {
-            $pkg= preg_replace('/^/', '-', $pkg);
+    if($this->FAIstate != "freeze"){
+      if((isset($_POST['Markpkg']))&&(isset($_POST['usedPackages']))&&(!empty($_POST['usedPackages']))){
+        foreach($_POST['usedPackages'] as $pkg){
+          if (isset($this->usedPackages[$pkg])){
+            unset($this->usedPackages[$pkg]);
+            if (preg_match('/^-/', $pkg)){
+              $pkg= preg_replace('/^-/', '', $pkg);
+            } else {
+              $pkg= preg_replace('/^/', '-', $pkg);
+            }
+            $this->usedPackages[$pkg]= $pkg;
           }
-          $this->usedPackages[$pkg]= $pkg;
         }
       }
     }
index 40c13313449725ec40d48aefcee36734627af23b..388c1e84852d261a19ca5dcc6d2a118f6df578e6 100644 (file)
@@ -71,7 +71,7 @@
                        <input type="submit" name="Addpkg" value="{t}Add{/t}" {$OptionsACL} {$cnACL}>
                        <input type="submit" name="Delpkg" value="{t}Remove{/t}"  {$OptionsACL} {$cnACL}>
                        <input type="submit" name="Conpkg" value="{t}Configure{/t}"  {$OptionsACL} >
-                       <input type="submit" name="Markpkg" value="{t}Toggle remove flag{/t}"  {$OptionsACL} >
+                       <input type="submit" name="Markpkg" value="{t}Toggle remove flag{/t}"  {$OptionsACL} {$cnACL}>
                </td>
        </tr>
 </table>