summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: b25ba7a)
raw | patch | inline | side by side (parent: b25ba7a)
author | psc <psc@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 29 Mar 2010 10:34:38 +0000 (10:34 +0000) | ||
committer | psc <psc@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 29 Mar 2010 10:34:38 +0000 (10:34 +0000) |
When creating a printer via a workstation use a different
formular name for the printer description, otherwise the
description conflicts with the workstation description.
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.6-lhm@17346 594d385d-05f5-0310-b6e9-bd551577e9d8
formular name for the printer description, otherwise the
description conflicts with the workstation description.
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.6-lhm@17346 594d385d-05f5-0310-b6e9-bd551577e9d8
trunk/gosa-plugins/goto/admin/systems/goto/class_printGeneric.inc | patch | blob | history | |
trunk/gosa-plugins/goto/admin/systems/goto/printer.tpl | patch | blob | history |
diff --git a/trunk/gosa-plugins/goto/admin/systems/goto/class_printGeneric.inc b/trunk/gosa-plugins/goto/admin/systems/goto/class_printGeneric.inc
index 17e92cdd65236f95966931e0104add894db9bb5e..97820940f162e7759ac82e3bb59e10c580fea1d2 100644 (file)
var $cn = "";
var $l = "";
var $description = "";
+ var $printer_description = "";
var $labeledURI = "";
var $gotoPrinterPPD = "";
var $initial_PPD = "";
}
$this->orig_cn = $this->cn;
$this->orig_base = $this->base;
+
+ if (!preg_match('/Printer/i', $this->BelongsTo)) {
+ $this->printer_description = $this->description;
+ }
}
function set_acl_base($base)
/* Assign attributes */
foreach ($this->attributes as $attr){
- $smarty->assign("$attr", $this->$attr);
+ $smarty->assign("$attr", $this->$attr);
+ }
+
+ if (!preg_match("/Printer/", $this->BelongsTo)) {
+ $smarty->assign("printer_description", $this->printer_description);
}
if(isset($_POST['AddUser'])){
if(is_object($this->netConfigDNS)){
$this->netConfigDNS->save_object();
}
+
+ if (!isset($_POST['edit_cancel']) && isset($_POST['printer_description'])) {
+ $this->printer_description = get_post('printer_description');
+ }
/* Set new base if allowed */
$tmp = $this->get_allowed_bases();
if(preg_match("/workstation/i",$this->BelongsTo)){
$this->dn= preg_replace("/".preg_quote(get_ou('workstationRDN'), '/')."/",get_ou('printerRDN'),$this->dn);
}
-
+
if(!$this->is_account) return;
if(isset($this->parent->by_object['workgeneric'])){
if($this->parent->by_object['workgeneric']->cn == "wdefault"){
$this->attrs= $attrs;
}
+ if (!empty($this->printer_description)) {
+ $this->attrs['description'] = $this->printer_description;
+ }
+
/* Append printer user
*/
$this->attrs['gotoUserPrinter']=array();
diff --git a/trunk/gosa-plugins/goto/admin/systems/goto/printer.tpl b/trunk/gosa-plugins/goto/admin/systems/goto/printer.tpl
index b384ac4b0f4dec76fcac3f68a891913badccb87e..bf432cefd4f0a9e3bd793bbc8ef6d169d8e15fea 100644 (file)
<td><LABEL for="description">{t}Description{/t}</LABEL></td>
<td>
{render acl=$descriptionACL}
- <input id="description" name="description" size=25 maxlength=80 value="{$description}">
+ <input id="printer_description" name="printer_description" size=25 maxlength=80 value="{$printer_description}">
{/render}
</td>
</tr>