summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 1a44b91)
raw | patch | inline | side by side (parent: 1a44b91)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 2 Sep 2005 13:55:37 +0000 (13:55 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 2 Sep 2005 13:55:37 +0000 (13:55 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@1309 594d385d-05f5-0310-b6e9-bd551577e9d8
plugins/admin/systems/class_printGeneric.inc | patch | blob | history | |
plugins/admin/systems/printer.tpl | patch | blob | history |
diff --git a/plugins/admin/systems/class_printGeneric.inc b/plugins/admin/systems/class_printGeneric.inc
index 28c81aac41d883ca50cca244646e60d658a87f5e..a25df8639065b1d0151015eabae7ec8901ab3c5b 100644 (file)
var $AdminMember ="";
var $AdminMembers =array();
var $AdminMemberKeys =array();
-
+
+ var $is_terminalBased = false;
+
var $member =array();
var $strings = "";
var $type = "";
}
}
}
+
+ $ldap->search("(&(cn=".$this->cn.")(|(objectClass=gotoTerminal)(objectClass=gotoWorkstation)))",array("cn","objectClass"));
+ if($attrs = $ldap->fetch()){
+ if(in_array("gotoTerminal",$attrs['objectClass'])){
+ $this->is_terminalBased = "Terminal";
+ }else{
+ $this->is_terminalBased = "Workstation";
+ }
+ }
+
+
+
}
function execute()
asort($userlist);
asort($adminlist);
-
+ if($this->is_terminalBased){
+ if($this->is_terminalBased == "Terminal"){
+ $smarty->assign("desc" ,sprintf(_("This printer belongs to terminal %s. You can't rename this printer."),$this->cn));
+ }else{
+ $smarty->assign("desc" ,sprintf(_("This printer belongs to workstation %s. You can't rename this printer."),$this->cn));
+ }
+ $smarty->assign("cnACL" ," disabled ");
+ }else{
+ $smarty->assign("desc" ,_(""));
+ }
$smarty->assign("UserMember" ,$this->UserMember);
$smarty->assign("UserMembers" ,$userlist);
$smarty->assign("UserMemberKeys",array_flip($userlist));
index c04020c5f086d3652f00160f403a096e5cc545d4..9b58d29a3b9bc42df959584b7589212805159eac 100644 (file)
{if $is_terminal ne 'true'}
<h2>{t}General{/t}</h2>
<table summary="">
+ <tr>
+ <td colspan=2>
+ {$desc}
+ </td>
+ </tr>
<tr>
<td><LABEL for="cn" >{t}Printer name{/t}</LABEL>{$must}</td>
- <td><input name="cn" id="cn" size=20 maxlength=60 value="{$cn}"></td>
+ <td><input name="cn" id="cn" size=20 maxlength=60 value="{$cn}" {$cnACL}></td>
</tr>
<tr>
<td><LABEL for="description">{t}Description{/t}</LABEL></td>
</tr>
</table>
</td>
- <td>
+ <td valign="top">
<table summary="">
<tr>
<td colspan=2> </td>