From 36d6e72dc2582e4ace0a5f76faf9bc73d5e6bd03 Mon Sep 17 00:00:00 2001 From: hickert Date: Fri, 15 Jun 2007 07:58:49 +0000 Subject: [PATCH] Updated printer Copy & Paste git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@6600 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/admin/systems/class_printGeneric.inc | 42 +++++++++++++++++++- plugins/admin/systems/paste_generic.tpl | 10 +++++ 2 files changed, 51 insertions(+), 1 deletion(-) diff --git a/plugins/admin/systems/class_printGeneric.inc b/plugins/admin/systems/class_printGeneric.inc index 2dfbc4cd4..48c23aade 100644 --- a/plugins/admin/systems/class_printGeneric.inc +++ b/plugins/admin/systems/class_printGeneric.inc @@ -981,9 +981,49 @@ class printgeneric extends plugin } return(TRUE); } -} + /* Display generic part for server copy & paste */ + function getCopyDialog() + { + $vars = array("cn"); + $smarty = get_smarty(); + $smarty->assign("cn" ,$this->cn); + $smarty->assign("object","printer"); + $str = $smarty->fetch(get_template_path("paste_generic.tpl",TRUE)); + $ret = array(); + $ret['string'] = $str; + $ret['status'] = ""; + return($ret); + } + + + function saveCopyDialog() + { + if(isset($_POST['cn'])){ + $this->cn = $_POST['cn']; + } + } + + function PrepareForCopyPaste($source) + { + plugin::PrepareForCopyPaste($source); + if(isset($source['macAddress'][0])){ + $this->netConfigDNS->macAddress = $source['macAddress'][0]; + } + if(isset($source['ipHostNumber'][0])){ + $this->netConfigDNS->ipHostNumber = $source['ipHostNumber'][0]; + } + + $source_o = new printgeneric($this->config,$source['dn'],NULL,$this->parent); + foreach($this->attributes as $attr){ + $this->$attr = $source_o->$attr; + } + $this->member = $source_o -> member; + + $this->gotoPrinterPPD = ""; + } +} // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler: ?> diff --git a/plugins/admin/systems/paste_generic.tpl b/plugins/admin/systems/paste_generic.tpl index 2f7ae1060..56fd5d733 100644 --- a/plugins/admin/systems/paste_generic.tpl +++ b/plugins/admin/systems/paste_generic.tpl @@ -28,3 +28,13 @@ {/if} +{if $object == "printer"} + + + + + +
{$must} + +
+{/if} -- 2.30.2