From: hickert Date: Tue, 12 Jun 2007 13:43:15 +0000 (+0000) Subject: Added system copy & paste X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=a7a6fae70124e82871ea33c7205e033b81a3c5a4;p=gosa.git Added system copy & paste git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@6573 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/include/class_acl.inc b/include/class_acl.inc index 999a20b95..85ed63162 100644 --- a/include/class_acl.inc +++ b/include/class_acl.inc @@ -961,6 +961,16 @@ class acl extends plugin return FALSE; } + + function PrepareForCopyPaste($source) + { + plugin::PrepareForCopyPaste($source); + + $dn = $source['dn']; + $acl_c = new acl($this->config, $this->parent,$dn); + $this->gosaAclEntry = $acl_c->gosaAclEntry; + } + function save() { diff --git a/plugins/admin/systems/class_servGeneric.inc b/plugins/admin/systems/class_servGeneric.inc index bc04c77a7..ee00a7a34 100644 --- a/plugins/admin/systems/class_servGeneric.inc +++ b/plugins/admin/systems/class_servGeneric.inc @@ -369,6 +369,44 @@ class servgeneric extends plugin } + /* Display generic part for server copy & paste */ + function getCopyDialog() + { + $vars = array("cn"); + + $smarty = get_smarty(); + $smarty->assign("cn" ,$this->cn); + $smarty->assign("object","server"); + $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->macAddress = $source['ipHostNumber'][0]; + } + + } + + + /* Return plugin informations for acl handling */ function plInfo() { diff --git a/plugins/admin/systems/paste_generic.tpl b/plugins/admin/systems/paste_generic.tpl new file mode 100644 index 000000000..0a6f06643 --- /dev/null +++ b/plugins/admin/systems/paste_generic.tpl @@ -0,0 +1,10 @@ +{if $object == "server"} + + + + + +
{$must} + +
+{/if}