summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 080bb8e)
raw | patch | inline | side by side (parent: 080bb8e)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 14 Dec 2007 14:19:37 +0000 (14:19 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 14 Dec 2007 14:19:37 +0000 (14:19 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8129 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-core/plugins/personal/environment/class_environment.inc | patch | blob | history | |
gosa-core/plugins/personal/environment/environment.tpl | patch | blob | history |
diff --git a/gosa-core/plugins/personal/environment/class_environment.inc b/gosa-core/plugins/personal/environment/class_environment.inc
index 1e4934514efe0e0eab4f873009d99853b355d2bc..34fe3338534034ca203c5293dd3771fb0dc8ef32 100644 (file)
$smarty->assign("gotoPrinterACL","rw");
}
- if(empty($this->useProfile)){
+
+ $smarty->assign("useProfile",$this->useProfile);
+ if(empty($this->useProfile) && !$this->multiple_support_active){
$smarty->assign("useProfileCHK","");
$smarty->assign("gotoProfileServerACL" , preg_replace("/w/","",$this->getacl("gotoProfileServer",$WriteOnly)));
$smarty->assign("gotoProfileQuotaACL" , preg_replace("/w/","",$this->getacl("gotoProfileQuota",$WriteOnly)));
}
/* Assign used attributes for multiple edit */
- foreach(array("gotoPrinter") as $box){
+ foreach(array("gotoPrinter","kiosk_server","gotoProfileFlagL","gotoXResolution",
+ "useProfile","gotoProfileServer","gotoProfileQuota","gotoProfileFlagC") as $box){
$ubox ="use_".$box;
if(in_array($box,$this->multi_boxes)){
$smarty->assign($ubox,TRUE);
}
}
$this->gotoHotplugDevices = array_values($this->gotoHotplugDevices);
+ $this->gotoHotplugDevices = array_values($tmp);
+ for($i = 0 ; $i < strlen($this->gotoProfileFlags) ; $i ++){
+ $chr = $this->gotoProfileFlags[$i];
+ $name = "gotoProfileFlag".$chr;
+ $this->$name=$chr;
+ }
+$this->update_kiosk_profiles();
+$this->gotoKioskProfile= preg_replace("/^.*\//i","",$this->gotoKioskProfile);
+
+ if((!empty($this->gotoProfileServer))||($this->gotoProfileFlagC=="C")){
+ $this->useProfile = true;
+ }else{
+ $this->useProfile = false;
+ }
+
}
unset($tmp[$name]);
}
}
- $this->gotoHotplugDevices = array_values($tmp);
}
/* Force printer reset */
$ret['add_del_printer_member_was_called'] = TRUE;
}
-
+
+ if(in_array("gotoProfileFlagL",$this->multi_boxes)){
+ $ret['gotoProfileFlagL'] = $this->gotoProfileFlagL;
+ }
+
+ if(in_array("useProfile",$this->multi_boxes)){
+ $ret['useProfile']=$this->useProfile;
+ if(in_array("gotoProfileServer",$this->multi_boxes)){
+ $ret['gotoProfileServer']=$this->gotoProfileServer;
+ }
+ if(in_array("gotoProfileQuota",$this->multi_boxes)){
+ $ret['gotoProfileQuota']=$this->gotoProfileQuota;
+ }
+ if(in_array("gotoProfileFlagC",$this->multi_boxes)){
+ $ret['gotoProfileFlagC'] = $this->gotoProfileFlagC;
+ }
+ }
+ if(in_array("gotoXResolution",$this->multi_boxes)){
+ $ret['gotoXResolution'] = $this->gotoXResolution;
+ }
+ if(in_array("kiosk_server",$this->multi_boxes)){
+ $ret['gotoKioskProfile_Server'] = $this->gotoKioskProfile_Server;
+ $ret['gotoKioskProfile_Profile'] = $this->gotoKioskProfile_Profile;
+ }
return($ret);
}
{
if(isset($_POST['environment_multiple_posted'])){
plugin::multiple_save_object();
- if(isset($_POST['use_gotoPrinter'])){
- $this->multi_boxes[] = "gotoPrinter";
+
+
+ if(isset($_POST['useProfile'])){
+ $this->useProfile = true;
+ }else{
+ $this->useProfile = false;
+ }
+ if(isset($_POST['gotoProfileFlagC'])){
+ $this->gotoProfileFlagC = $_POST['gotoProfileFlagC'];
+ }else{
+ $this->gotoProfileFlagC = false;
+ }
+
+ if(isset($_POST['gotoProfileFlagL'])){
+ $this->gotoProfileFlagL = $_POST['gotoProfileFlagL'];
+ }else{
+ $this->gotoProfileFlagL = false;
+ }
+
+ foreach(array("gotoProfileFlagL","gotoPrinter","kiosk_server","gotoXResolution",
+ "useProfile","gotoProfileServer","gotoProfileQuota","gotoProfileFlagC") as $attr){
+ $uattr = "use_".$attr;
+ if(isset($_POST[$uattr])){
+ $this->multi_boxes[] = $attr;
+ }
}
+ if(isset($_POST['kiosk_server'])){
+ $tmp = $_POST['kiosk_server'];
+ if(isset($this->gotoKioskProfiles['SERVERS'][$tmp])){
+ $this->gotoKioskProfile_Server = $_POST['kiosk_server'];
+ }
+ }
+ if(isset($_POST['kiosk_profile'])){
+ $tmp = $_POST['kiosk_profile'];
+ if(in_array($tmp,$this->gotoKioskProfiles['BY_SERVER'][$this->gotoKioskProfile_Server])){
+ $this->gotoKioskProfile_Profile = $_POST['kiosk_profile'];
+ }
+ }
+
}
}
diff --git a/gosa-core/plugins/personal/environment/environment.tpl b/gosa-core/plugins/personal/environment/environment.tpl
index fa387379e3f1d4842144b83344de4e372edbf98c..d1370f6d198f1d5996dd1f9a353148f0e3c90813 100644 (file)
<table summary="{t}Environment managment settings{/t}" width="100%">
<tr>
<td style="width:50%;border-right:1px solid #B0B0B0;vertical-align:top;">
+
+
+{if $multiple_support}
+
+ {render acl=$gotoProfileACL checkbox=$multiple_support checked=$use_useProfile}
+ <input class="center" type="checkbox" value="1" {if $useProfile} checked {/if} name="useProfile" id="useProfile">{t}Use profile managment{/t}
+ {/render}
+ <br>
+ {render acl=$gotoProfileServerACL checkbox=$multiple_support checked=$use_gotoProfileServer}
+ {t}Profil path{/t}
+ <select id="gotoProfileServer" name="gotoProfileServer">
+ {html_options values=$gotoProfileServerKeys output=$gotoProfileServers selected=$gotoProfileServer}
+ </select>
+ {/render}
+ <br>
+ {render acl=$gotoProfileQuotaACL checkbox=$multiple_support checked=$use_gotoProfileQuota}
+ <input type="text" name="gotoProfileQuota" value="{$gotoProfileQuota}" size="6" id="gotoProfileQuota">{t}MB{/t}
+ {/render}
+ <br>
+ {render acl=$gotoProfileFlagCACL checkbox=$multiple_support checked=$use_gotoProfileFlagC}
+ <input class="center" type="checkbox" name="gotoProfileFlagC" value="C" {$gotoProfileFlagCCHK} id="gotoProfileFlagC">
+ {t}Cache profile localy{/t}
+ {/render}
+
+{else}
+
+
<table summary="{t}Profile managment{/t}">
<tr>
<td style="vertical-align:top">
</td>
</tr>
</table>
+
+{/if}
+
</td>
<td style="vertical-align:top">
</td>
</tr>
<tr>
- <td>
- {t}Server{/t}
- <select name='kiosk_server' id="kiosk_server" onChange='document.mainform.submit();'>
+ <td>
+{if $multiple_support}
+ <input type="checkbox" name="use_kiosk_server" value="1" {if $use_kiosk_server} checked {/if}
+ class="center"
+ onClick="changeState('kiosk_server');
+ changeState('kiosk_profile');">
+{/if}
+ {t}Server{/t}
+ <select name='kiosk_server' id="kiosk_server" onChange='document.mainform.submit();'
+ {if !$use_kiosk_server && $multiple_support} disabled {/if}>
{html_options options=$kiosk_servers selected=$kiosk_server}
</select>
</td>
<td>
{if $kiosk_server != "none"}
{t}Profile{/t}
- <select name='kiosk_profile'>
+ <select name='kiosk_profile' id="kiosk_profile"
+ {if !$use_kiosk_server && $multiple_support} disabled {/if}>
{html_options values=$kiosk_profiles output=$kiosk_profiles selected=$kiosk_profile}
</select>
{else}
<tr>
<td colspan=2>
<br>
-{render acl=$gotoProfileFlagLACL}
- <input type="checkbox" name="gotoProfileFlagL" id="gotoProfileFlagL" value="L" {$gotoProfileFlagLCHK}>
+{render acl=$gotoProfileFlagLACL checkbox=$multiple_support checked=$use_gotoProfileFlagL}
+ <input type="checkbox" name="gotoProfileFlagL" id="gotoProfileFlagL" value="L" {$gotoProfileFlagLCHK} class="center">
{/render}
<label for="gotoProfileFlagL">{t}Resolution changeable during session{/t}</label>
</td>
</tr>
<tr>
<td>
+{if $multiple_support}
+ <input type="checkbox" value="1" class="center" name="use_gotoXResolution"
+ onClick="changeState('gotoXResolution');" {if $use_gotoXResolution} checked {/if}>
+{/if}
<label for="gotoXResolution">{t}Resolution{/t}</label>
</td>
<td>
{render acl=$gotoXResolutionACL}
- <select name="gotoXResolution" id="gotoXResolution">
+ <select name="gotoXResolution" id="gotoXResolution" {if !$use_gotoXResolution && $multiple_support} disabled {/if}>
{html_options values=$gotoXResolutionKeys output=$gotoXResolutions selected=$gotoXResolution}
<option disabled> </option>
</select>