summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 44f2d23)
raw | patch | inline | side by side (parent: 44f2d23)
author | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 23 May 2006 08:33:13 +0000 (08:33 +0000) | ||
committer | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 23 May 2006 08:33:13 +0000 (08:33 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3503 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 a9630783a4eacac167508d57fbed04bb61fd2e44..860726ad2dc086b476cf338550f11c18ec7226cf 100644 (file)
/* Printer */
var $gotoPrinter = array();// All available Printer, with their configurations
var $gotoPrinterSel = ""; // The selected Printer
+ var $gosaDefaultPrinter = ""; // Default printer
/* Share */
var $gotoShares = array();// Current Share Options
var $attributes = array("uid","gotoProfileServer","gotoProfileFlags",
"gotoXResolution","gotoProfileQuota",
"gotoLogonScripts","gotoLogonScript",
- "gotoPrinter",
+ "gotoPrinter", "gosaDefaultPrinter",
"gotoShares","gotoShare",
"gotoKioskProfile","gotoKioskProfiles",
"gotoHotplugDevice");
}
}
+ if((isset($_POST['gotoPrinterDefault']))&&(isset($_POST['gotoPrinterSel']))&&(!empty($_POST['gotoPrinterSel']))){
+ if ($this->gosaDefaultPrinter == $_POST['gotoPrinterSel'][0]){
+ $this->gosaDefaultPrinter= "";
+ } else {
+ $this->gosaDefaultPrinter= $_POST['gotoPrinterSel'][0];
+ }
+ }
+
$smarty->assign("gotoPrinter",$this->printOutPrinterDevices());
$smarty->assign("gotoPrinterKeys",array_flip($this->printOutPrinterDevices()));
/* Get all Posted vars
* Setup checkboxes
*/
-
-
if(isset($_POST['iamposted'])){
if(isset($_POST['useProfile'])){
$this->gotoProfileFlag_L = false;
}
+ $tmp= $this->gosaDefaultPrinter;
plugin::save_object();
foreach($this->attributes as $s_attr){
if(in_array($s_attr,array("gotoShares","gotoHotplugDevices","gotoPrinter","gotoLogonScripts","uid"))) continue;
$this->$s_attr = false;
}
}
+ $this->gosaDefaultPrinter= $tmp;
}
}
if(is_array($this->gotoPrinter)){
foreach($this->gotoPrinter as $printer){
if($printer['mode'] == "admin"){
- $a_return[$printer['cn'][0]]= $printer['cn'][0]." - "._("Admin");
+ $a_return[$printer['cn'][0]]= $printer['cn'][0]." - "._("Administrator");
}else{
$a_return[$printer['cn'][0]]= $printer['cn'][0];
}
+ if ($printer['cn'][0] == $this->gosaDefaultPrinter){
+ $a_return[$printer['cn'][0]].=" - "._("Default printer");
+ }
}
}
return($a_return);
diff --git a/plugins/personal/environment/environment.tpl b/plugins/personal/environment/environment.tpl
index 4877177b6ef549d5889a1c0a96b470b24ee8ab8a..1af617c146cbb89bec722dbaddf2517884eb2b04 100644 (file)
<br>
<input type="submit" {$gotoPrinterACL} name="gotoPrinterAdd" value="{t}Add{/t}">
<input type="submit" {$gotoPrinterACL} name="gotoPrinterDel" value="{t}Delete{/t}">
- <input type="submit" {$gotoPrinterACL} name="gotoPrinterEdit" value="{t}Admin Toggle{/t}">
+ <input type="submit" {$gotoPrinterACL} name="gotoPrinterEdit" value="{t}Toggle admin{/t}">
+ <input type="submit" {$gotoPrinterACL} name="gotoPrinterDefault" value="{t}Toggle default{/t}">
</td>
</tr>
</table>