Code

Updated posix plugin/template
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 9 Jul 2008 07:23:57 +0000 (07:23 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 9 Jul 2008 07:23:57 +0000 (07:23 +0000)
-Updated posix onClick action for "Force UID/GID" checkbox.

git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11570 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/plugins/personal/posix/class_posixAccount.inc
gosa-core/plugins/personal/posix/generic.tpl

index 55c9d944edae25bd4c409dcada852dc83355cf5b..8a3971073415f14d7bab3b264fc2989e8495fb57 100644 (file)
@@ -557,8 +557,17 @@ class posixAccount extends plugin
       }
       $smarty->assign("force_ids", "");
     }
-    
 
+    /* Create onClick="" action string for the "Force UID/GID" option 
+     */
+    $onClickIDS ="";
+    if(preg_match("/w/",$this->getacl("uidNumber",$SkipWrite))){
+      $onClickIDS .= "changeState('uidNumber');";
+    }
+    if(preg_match("/w/",$this->getacl("gidNumber",$SkipWrite))){
+      $onClickIDS .= "changeState('gidNumber');";
+    }
+    $smarty->assign("onClickIDS", $onClickIDS);
     $smarty->assign("force_idsACL", $this->getacl("uidNumber",$SkipWrite).$this->getacl("gidNumber",$SkipWrite));
 
     foreach(array("primaryGroup","trustmode","activate_shadowWarning","activate_shadowInactive","activate_shadowMin","activate_shadowMax","activate_shadowExpire","mustchangepassword") as $val){
index 18c69ad97760b1a868f87a2cea319f1b9dd74a9d..eccc8bd17858e04cc478bdc5b92bef61529b3436 100644 (file)
@@ -45,7 +45,8 @@
     <tr>
      <td>
 {render acl=$force_idsACL}
-      <input id="force_ids" type=checkbox name="force_ids" value="1" {$force_ids} onclick="changeState('uidNumber'); changeState('gidNumber');">
+      <input id="force_ids" type=checkbox name="force_ids" value="1" {$force_ids} 
+                       onclick="{$onClickIDS}">
 {/render}
                                        </td>
                                        <td>