Code

Do not display inherit options when in ogroup context
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 19 Nov 2007 14:24:55 +0000 (14:24 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 19 Nov 2007 14:24:55 +0000 (14:24 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@7816 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/systems/class_workstationStartup.inc
plugins/admin/systems/workstationStartup.tpl

index 4105b26bc8406b8ae0b42113f16901975e833dc9..e9c5144fd59e99c090c28a119416d1fe3390c387 100644 (file)
@@ -103,7 +103,7 @@ class workstartup extends plugin
         $this->gotoLdapServers[] = preg_replace("/^[0-9]*:/","",$value);
       }
     }
-    if(!count($this->gotoLdapServers)){ 
+    if(!count($this->gotoLdapServers) && $this->member_of_ogroup){ 
       $this->gotoLdap_inherit = TRUE;
     }
 
@@ -325,7 +325,9 @@ class workstartup extends plugin
     $this->orig_dn= $this->dn;
 
     /* Handle inheritance value "default" */
-    $this->gotoBootKernels= array("default-inherited" => '['._("inherited").']');
+    if ($this->member_of_ogroup){
+      $this->gotoBootKernels= array("default-inherited" => '['._("inherited").']'); 
+    }
 
     /* Load hardware list */
     if ($this->member_of_ogroup){
@@ -677,6 +679,8 @@ class workstartup extends plugin
       $smarty->assign($name."ACL",$this->getacl($name));
     } 
 
+    $smarty->assign("member_of_ogroup",$this->member_of_ogroup);
+
     /* In this section server shares will be defined
      * A user can select one of the given shares and a mount point
      *  and attach this combination to his setup.
index f68115942273bb9eeda1fc5a6b3e0da88d9c6ff4..d69b2ec72cc986a47af1c137db8ae046a95b239e 100644 (file)
     <tr>
      <td colspan="2" style='vertical-align:top;padding-top:3px;'><LABEL for="gotoLdapServer">{t}LDAP server{/t}</LABEL>
 {render acl=$gotoLdapServerACL}
+{if $member_of_ogroup}
 (<input type='checkbox' name='gotoLdap_inherit' {if $gotoLdap_inherit} checked {/if} value="1"
        onClick="document.mainform.submit();" class='center'>
 &nbsp;{t}inherit from group{/t})
 {if !$JS}
        <input type='image' src="images/list_reload.png" alt='{t}Reload{/t}' class='center'>
 {/if}
+{/if}
 {/render}
 {render acl=$gotoLdapServerACL_inherit}
          {$gotoLdapServers}