Code

* Code cleanup for non pre-defined ttag variable
[gosa.git] / include / class_CopyPasteHandler.inc
index 4ec220be551b28193731719c6d999a5d3af27071..aba5e3208a3e1976722044ce7c416f4f8b51b2f1 100644 (file)
@@ -124,10 +124,18 @@ class CopyPasteHandler {
     /* Cut & paste
      */
     if($this->cutCurrent){
-      $this->current->save();
-      $this->dialogOpen =false;
-      $this->Clear();
 
+      $msgs = $this->check();  
+      if(count ($msgs) ){
+        foreach( $msgs as $msg){
+          print_red($msg);
+        }
+        $this->dialogOpen =false;
+      }else{
+        $this->current->save();
+        $this->dialogOpen =false;
+        $this->Clear();
+      }
       /* Copy & paste
        */
     }else{
@@ -139,6 +147,7 @@ class CopyPasteHandler {
           }
         }else{
           $this->current->save();
+          $this->lastdn = $this->current->dn;
           $this->dialogOpen =false;
           $this->Clear();
         }
@@ -215,7 +224,7 @@ class CopyPasteHandler {
       $Copy_Paste.= "<input type='image' name='editPaste' class='center'
         src='".$img."' alt='"._("Paste")."' title='".$this->GetCurrentDn()."'>&nbsp;";
     }else{
-      $Copy_Paste.= "<img class='center' src='images/cant_editpaste.png' alt='"._("Can't paste")."'>&nbsp;";
+      $Copy_Paste.= "<img class='center' src='images/cant_editpaste.png' alt=\""._("Can't paste")."\" >&nbsp;";
     }
 
     return ($Copy_Paste);