index 4ec220be551b28193731719c6d999a5d3af27071..334bd988dc6e3c55e51552274d5b63439a1b3155 100644 (file)
/* Cut & paste
*/
if($this->cutCurrent){
- $this->current->save();
- $this->dialogOpen =false;
- $this->Clear();
+
+ if(isset($_POST['PerformCopyPaste'])){
+ $msgs = $this->check();
+ if(count ($msgs) ){
+ foreach( $msgs as $msg){
+ print_red($msg);
+ }
+ }else{
+ $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)));
+ }
/* Copy & paste
*/
}
}else{
$this->current->save();
+ $this->lastdn = $this->current->dn;
$this->dialogOpen =false;
$this->Clear();
}
}
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)));
}
}
$Copy_Paste.= "<input type='image' name='editPaste' class='center'
src='".$img."' alt='"._("Paste")."' title='".$this->GetCurrentDn()."'> ";
}else{
- $Copy_Paste.= "<img class='center' src='images/cant_editpaste.png' alt='"._("Can't paste")."'> ";
+ $Copy_Paste.= "<img class='center' src='images/cant_editpaste.png' alt=\""._("Can't paste")."\"> ";
}
return ($Copy_Paste);