summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 9923a46)
raw | patch | inline | side by side (parent: 9923a46)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 21 Jul 2006 06:21:39 +0000 (06:21 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 21 Jul 2006 06:21:39 +0000 (06:21 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@4269 594d385d-05f5-0310-b6e9-bd551577e9d8
plugins/personal/environment/class_environment.inc | patch | blob | history | |
plugins/personal/environment/environment.tpl | patch | blob | history |
diff --git a/plugins/personal/environment/class_environment.inc b/plugins/personal/environment/class_environment.inc
index 16e1c71575d83c28ad721232c19225cc20121760..547b6dd32721b738ca4307ce70b8bbf4f7e465b4 100644 (file)
}
/* Prepare ACL settings*/
- if(chkacl($this->acl,$s_attr)=="") {
- $smarty->assign($s_attr."ACL","");
- }else{
- $smarty->assign($s_attr."ACL"," disabled ");
- }
-
+ $smarty->assign($s_attr."ACL",$this->getacl($s_attr));
}
/* Is accout enabled | are we editing from usermenu or admin menu
}
/* Prepare ACL settings*/
- if(chkacl($this->acl,$s_attr)=="") {
- $smarty->assign($s_attr."ACL","");
- }else{
- $smarty->assign($s_attr."ACL"," disabled ");
- }
+ $smarty->assign($s_attr."ACL",$this->getacl($s_attr));
}
- foreach(array("gotoHotplugDevice","gotoPrinterSel") as $s_attr){
- if(chkacl($this->acl,$s_attr)=="") {
- $smarty->assign($s_attr."ACL","");
- }else{
- $smarty->assign($s_attr."ACL"," disabled ");
- }
+ foreach(array("gotoHotplugDevice","gotoProfileFlagC","gotoProfileFlagL") as $s_attr){
+ $smarty->assign($s_attr."ACL",$this->getacl($s_attr));
}
if(empty($this->useProfile)){
- $smarty->assign("gotoProfileACL","disabled");
$smarty->assign("useProfileCHK","");
+ $smarty->assign("gotoProfileServerACL" , preg_replace("/w/","",$this->getacl("gotoProfileServer")));
+ $smarty->assign("gotoProfileQuotaACL" , preg_replace("/w/","",$this->getacl("gotoProfileQuota")));
+ $smarty->assign("gotoProfileFlagCACL" , preg_replace("/w/","",$this->getacl("gotoProfileFlagC")));
}else{
- $smarty->assign("gotoProfileACL","");
$smarty->assign("useProfileCHK"," checked ");
}
-
-
- $smarty->assign("useProfileACL","");
- if($this->acl != "#none#"){
- $smarty->assign("useProfileACL","");
- $smarty->assign("gotoProfileFlagCACL"," ");
- $smarty->assign("gotoProfileQuotaACL"," ");
- }else{
- $smarty->assign("gotoProfileFlagCACL"," disabled ");
- $smarty->assign("useProfileACL","disabled");
- $smarty->assign("gotoProfileServer"," disabled ");
- $smarty->assign("gotoProfileQuotaACL"," disabled ");
- }
+
+
+ $smarty->assign("gotoProfileACL", $this->getacl("gotoProfileServer").$this->getacl("gotoProfileQuota"));
/* HANDLE Profile Settings here
* Assign available Quota and resolution settings
}
return($disp);
}
- if($this->acl != "#none#"){
- $smarty->assign("useProfileACL","");
- }else{
- $smarty->assign("gotoProfileFlagCACL"," disabled ");
- $smarty->assign("gotoProfileServerACL"," disabled ");
- $smarty->assign("gotoProfileQuotaACL"," disabled ");
- }
-
- if(!$this->useProfile){
- $smarty->assign("gotoProfileFlagCACL"," disabled ");
- $smarty->assign("gotoProfileServerACL"," disabled ");
- $smarty->assign("gotoProfileQuotaACL"," disabled ");
- }
/* Als smarty vars are set. Get smarty template and generate output */
$display.= $smarty->fetch(get_template_path('environment.tpl', TRUE,dirname(__FILE__)));
}
}
-
- /* Save usersettings to Printer */
- if(chkacl($this->acl,"gotoPrinter")!=""){
- $this->gotoPrinter = array();
- }
-
/* 1. Search all printers that have our uid/cn as member
* 2. Delete this uid/cn from every single entry and save it again.
* 2.1 There are different types of members: Users / Groups, this will be defined in $suffix
$this->attrs['gotoProfileServer']= array();
}
- foreach($this->attributes as $s_attr){
- if(chkacl($this->acl,$s_attr)!="") {
- if(isset($this->attrs[$s_attr])){
- unset($this->attrs[$s_attr]);
- }
- }
- }
-
$ldap->cat ($this->dn, array('dn'));
if ($ldap->fetch()){
$mode= "modify";
diff --git a/plugins/personal/environment/environment.tpl b/plugins/personal/environment/environment.tpl
index 1f7f926ba98e5d0e2784a10315d5c6bb4b992a74..ed4e32a9c99232520b29b83ffe792a25d863136b 100644 (file)
<table summary="{t}Profile managment{/t}">
<tr>
<td style="vertical-align:top">
-{render acl=$ProfileACL}
+{render acl=$gotoProfileACL}
<input class="center" type="checkbox" value="1" {$useProfileCHK} name="useProfile" id="useProfile"
onclick="changeState('gotoProfileServer');changeState('gotoProfileFlagC');changeState('gotoProfileQuota');">
{/render}
<label for="gotoProfileServer">{t}Profil path{/t}</label>
</td>
<td>
-{render acl=$ProfileACL}
+{render acl=$gotoProfileServerACL}
<select id="gotoProfileServer" name="gotoProfileServer">
{html_options values=$gotoProfileServerKeys output=$gotoProfileServers selected=$gotoProfileServer}
<option disabled> </option>
<br>
</td>
<td>
-{render acl=$ProfileACL}
+{render acl=$gotoProfileQuotaACL}
<input type="text" name="gotoProfileQuota" value="{$gotoProfileQuota}" size="6" id="gotoProfileQuota">{t}MB{/t}
{/render}
<br>
<tr>
<td colspan=2>
{render acl=$gotoProfileFlagCACL}
- <input class="center" type="checkbox" name="gotoProfileFlagC" value="C" {$gotoProfileFlagCCHK id="gotoProfileFlagC"}>
+ <input class="center" type="checkbox" name="gotoProfileFlagC" value="C" {$gotoProfileFlagCCHK} id="gotoProfileFlagC">
{/render}
<label for="gotoProfileFlagC">{t}Cache profile localy{/t}</label>
</td>