diff --git a/plugins/admin/fai/class_faiPartitionTable.inc b/plugins/admin/fai/class_faiPartitionTable.inc
index e306340590ebaf6c99cb13896888ae8eb40287a1..96b4adc2201e1acf5a6b0ddc52b01fd1c30a531c 100644 (file)
var $base = "";
var $release = "";
var $copy_paste_mode = false;
+ var $cut_paste_mode = false;
- var $CopyPasteVars = array("disks","FAIstate");
+ var $CopyPasteVars = array("disks");
function faiPartitionTable ($config, $dn= NULL)
{
$message= plugin::check();
/* If this is a new script, check if a script with this name already exists */
- if(!empty($this->release) && $this->copy_paste_mode){
+ if(!empty($this->release) && ($this->copy_paste_mode || $this->cut_paste_mode) ){
/* Check if current name is already used for fai scripts in selected release */
$dn = 'cn='.$this->cn.",ou=disk,".$this->release;
}
$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: