From dd2481ac55bb185222d9c17610d65e2e5931fd62 Mon Sep 17 00:00:00 2001 From: hickert Date: Wed, 22 Nov 2006 09:01:17 +0000 Subject: [PATCH] Added some additional infos for copy & paste git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@5187 594d385d-05f5-0310-b6e9-bd551577e9d8 --- ihtml/themes/default/copyPasteDialog.tpl | 8 +++++++- include/class_CopyPasteHandler.inc | 22 ++++++++++++++++++---- 2 files changed, 25 insertions(+), 5 deletions(-) diff --git a/ihtml/themes/default/copyPasteDialog.tpl b/ihtml/themes/default/copyPasteDialog.tpl index 075d52ed2..28159d5f3 100644 --- a/ihtml/themes/default/copyPasteDialog.tpl +++ b/ihtml/themes/default/copyPasteDialog.tpl @@ -1,8 +1,14 @@ -{t}Copy & paste wizard{/t} +

{t}Copy & paste wizard{/t}

+{$message} +
+
{if $Complete == false} {t}Some values need to be unique in the complete directory while some combinations make no sense. GOsa shows the relevant attributes. Please maintain the values below to fullfill the policies.{/t}
+{t}Remeber that some properties like taken snapshots will not be copied!{/t}  +{t}Or if you copy or cut an entry within GOsa and delete the source object, you may get errors while pasting this object again!{/t} +

 


{$AttributesToFix} diff --git a/include/class_CopyPasteHandler.inc b/include/class_CopyPasteHandler.inc index 78cfb746b..446c7f244 100644 --- a/include/class_CopyPasteHandler.inc +++ b/include/class_CopyPasteHandler.inc @@ -124,10 +124,23 @@ class CopyPasteHandler { /* Cut & paste */ if($this->cutCurrent){ - $this->current->save(); - $this->dialogOpen =false; - $this->Clear(); + if($this->current){ + $smarty = get_smarty(); + $smarty->assign("type","cut"); + $smarty->assign("Complete",false); + $smarty->assign("AttributesToFix"," "); + $smarty->assign("SubDialog",$this->current->SubDialog); + $smarty->assign("objectDN" ,$this->objectdn); + $smarty->assign("message", sprintf(_("You are going to paste the cutted entry '%s'."), $this->objectdn)); + return($smarty->fetch(get_template_path("copyPasteDialog.tpl",FALSE))); + } + + if(isset($_POST['PerformCopyPaste'])){ + $this->current->save(); + $this->dialogOpen =false; + $this->Clear(); + } /* Copy & paste */ }else{ @@ -146,11 +159,12 @@ class CopyPasteHandler { } if($this->current){ $smarty = get_smarty(); + $smarty->assign("type","copy"); $smarty->assign("Complete",false); $smarty->assign("AttributesToFix",$this->generateAttributesToFix()); $smarty->assign("SubDialog",$this->current->SubDialog); $smarty->assign("objectDN" ,$this->objectdn); - $smarty->assign("message", sprintf(_("You are going to copy the entry '%s'."), $this->objectdn)); + $smarty->assign("message", sprintf(_("You are going to paste the copied entry '%s'."), $this->objectdn)); return($smarty->fetch(get_template_path("copyPasteDialog.tpl",FALSE))); } } -- 2.30.2