Code

Added some additional infos for copy & paste
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 22 Nov 2006 09:01:17 +0000 (09:01 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 22 Nov 2006 09:01:17 +0000 (09:01 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@5187 594d385d-05f5-0310-b6e9-bd551577e9d8

ihtml/themes/default/copyPasteDialog.tpl
include/class_CopyPasteHandler.inc

index 075d52ed212f6a3099360bb9cd8ebfce4fd30d9f..28159d5f371d66642b0f90c60b8aed61bf2638fe 100644 (file)
@@ -1,8 +1,14 @@
-{t}Copy & paste wizard{/t}</h2>
+<h2>{t}Copy & paste wizard{/t}</h2>
 
+<b>{$message}</b>
+<br>
+<br>
 {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}
        <br>
+{t}Remeber that some properties like taken snapshots will not be copied!{/t}&nbsp;
+{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}
+
        <p class='seperator'>&nbsp;</p>
        <br>
        {$AttributesToFix}
index 78cfb746bd115f9cad1961e131ac60ffe6bc6fdd..446c7f244a0633b70108b4b235ec0ad7aff49183 100644 (file)
@@ -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","&nbsp;");
+        $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)));
       }
     }