From: hickert Date: Tue, 21 Nov 2006 07:32:04 +0000 (+0000) Subject: Added "cn" to Copy & Paste dialog for copied fai objects. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=d71f6f636232cf977dacefd8336844f4423d98a8;p=gosa.git Added "cn" to Copy & Paste dialog for copied fai objects. git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@5169 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/admin/fai/class_faiHook.inc b/plugins/admin/fai/class_faiHook.inc index 2d6e6f94a..50f398e59 100644 --- a/plugins/admin/fai/class_faiHook.inc +++ b/plugins/admin/fai/class_faiHook.inc @@ -527,6 +527,28 @@ class faiHook extends plugin $this->handle_object_tagging($sub_dn, $this->gosaUnitTag); } } + + /* return copy & paste dialog + */ + function getCopyDialog() + { + /* Ask for cn */ + $smarty = get_smarty(); + $smarty->assign("cn" ,$this->cn); + $str = $smarty->fetch(get_template_path("paste_fai_object.tpl",TRUE)); + $ret = array(); + $ret['string'] = $str; + $ret['status'] = ""; + return($ret); + } + + /* Get posted cn */ + function saveCopyDialog() + { + if(isset($_POST['cn'])){ + $this->cn = $_POST['cn']; + } + } } // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler: diff --git a/plugins/admin/fai/class_faiPackage.inc b/plugins/admin/fai/class_faiPackage.inc index 27faa1c58..28897efac 100644 --- a/plugins/admin/fai/class_faiPackage.inc +++ b/plugins/admin/fai/class_faiPackage.inc @@ -561,10 +561,28 @@ class faiPackage extends plugin $this->handle_object_tagging($pkgdn, $this->gosaUnitTag); } } + } + + /* return copy & paste dialog + */ + function getCopyDialog() + { + /* Ask for cn */ + $smarty = get_smarty(); + $smarty->assign("cn" ,$this->cn); + $str = $smarty->fetch(get_template_path("paste_fai_object.tpl",TRUE)); + $ret = array(); + $ret['string'] = $str; + $ret['status'] = ""; + return($ret); + } - - - + /* Get posted cn */ + function saveCopyDialog() + { + if(isset($_POST['cn'])){ + $this->cn = $_POST['cn']; + } } } diff --git a/plugins/admin/fai/class_faiPartitionTable.inc b/plugins/admin/fai/class_faiPartitionTable.inc index e30634059..3376d600e 100644 --- a/plugins/admin/fai/class_faiPartitionTable.inc +++ b/plugins/admin/fai/class_faiPartitionTable.inc @@ -540,6 +540,29 @@ class faiPartitionTable extends plugin } $this->handle_post_events("add"); } + + + /* return copy & paste dialog + */ + function getCopyDialog() + { + /* Ask for cn */ + $smarty = get_smarty(); + $smarty->assign("cn" ,$this->cn); + $str = $smarty->fetch(get_template_path("paste_fai_object.tpl",TRUE)); + $ret = array(); + $ret['string'] = $str; + $ret['status'] = ""; + return($ret); + } + + /* Get posted cn */ + function saveCopyDialog() + { + if(isset($_POST['cn'])){ + $this->cn = $_POST['cn']; + } + } } // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler: diff --git a/plugins/admin/fai/class_faiProfile.inc b/plugins/admin/fai/class_faiProfile.inc index 69af93981..6befbbdfd 100644 --- a/plugins/admin/fai/class_faiProfile.inc +++ b/plugins/admin/fai/class_faiProfile.inc @@ -466,6 +466,29 @@ class faiProfile extends plugin $this->handle_object_tagging(); show_ldap_error($ldap->get_error()); } + + + /* return copy & paste dialog + */ + function getCopyDialog() + { + /* Ask for cn */ + $smarty = get_smarty(); + $smarty->assign("cn" ,$this->cn); + $str = $smarty->fetch(get_template_path("paste_fai_object.tpl",TRUE)); + $ret = array(); + $ret['string'] = $str; + $ret['status'] = ""; + return($ret); + } + + /* Get posted cn */ + function saveCopyDialog() + { + if(isset($_POST['cn'])){ + $this->cn = $_POST['cn']; + } + } } // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler: diff --git a/plugins/admin/fai/class_faiScript.inc b/plugins/admin/fai/class_faiScript.inc index c8337c4a1..e70a40456 100644 --- a/plugins/admin/fai/class_faiScript.inc +++ b/plugins/admin/fai/class_faiScript.inc @@ -498,6 +498,31 @@ class faiScript extends plugin $this->handle_object_tagging($sub_dn, $this->gosaUnitTag); } } + + + /* return copy & paste dialog + */ + function getCopyDialog() + { + /* Ask for cn */ + $smarty = get_smarty(); + $smarty->assign("cn" ,$this->cn); + $str = $smarty->fetch(get_template_path("paste_fai_object.tpl",TRUE)); + $ret = array(); + $ret['string'] = $str; + $ret['status'] = ""; + return($ret); + } + + /* Get posted cn */ + function saveCopyDialog() + { + if(isset($_POST['cn'])){ + $this->cn = $_POST['cn']; + } + } + + } // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler: diff --git a/plugins/admin/fai/class_faiTemplate.inc b/plugins/admin/fai/class_faiTemplate.inc index 3e6ea309d..06945f10c 100644 --- a/plugins/admin/fai/class_faiTemplate.inc +++ b/plugins/admin/fai/class_faiTemplate.inc @@ -488,6 +488,28 @@ class faiTemplate extends plugin $this->handle_object_tagging($sub_dn, $this->gosaUnitTag); } } + + /* return copy & paste dialog + */ + function getCopyDialog() + { + /* Ask for cn */ + $smarty = get_smarty(); + $smarty->assign("cn" ,$this->cn); + $str = $smarty->fetch(get_template_path("paste_fai_object.tpl",TRUE)); + $ret = array(); + $ret['string'] = $str; + $ret['status'] = ""; + return($ret); + } + + /* Get posted cn */ + function saveCopyDialog() + { + if(isset($_POST['cn'])){ + $this->cn = $_POST['cn']; + } + } } // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler: diff --git a/plugins/admin/fai/class_faiVariable.inc b/plugins/admin/fai/class_faiVariable.inc index 83027c7df..39565634a 100644 --- a/plugins/admin/fai/class_faiVariable.inc +++ b/plugins/admin/fai/class_faiVariable.inc @@ -405,6 +405,28 @@ class faiVariable extends plugin $this->handle_object_tagging($sub_dn, $this->gosaUnitTag); } } + + /* return copy & paste dialog + */ + function getCopyDialog() + { + /* Ask for cn */ + $smarty = get_smarty(); + $smarty->assign("cn" ,$this->cn); + $str = $smarty->fetch(get_template_path("paste_fai_object.tpl",TRUE)); + $ret = array(); + $ret['string'] = $str; + $ret['status'] = ""; + return($ret); + } + + /* Get posted cn */ + function saveCopyDialog() + { + if(isset($_POST['cn'])){ + $this->cn = $_POST['cn']; + } + } } // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler: diff --git a/plugins/admin/fai/paste_fai_object.tpl b/plugins/admin/fai/paste_fai_object.tpl new file mode 100644 index 000000000..6562670f6 --- /dev/null +++ b/plugins/admin/fai/paste_fai_object.tpl @@ -0,0 +1 @@ +{t}cn{/t} :