Code

Added "cn" to Copy & Paste dialog for copied fai objects.
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 21 Nov 2006 07:32:04 +0000 (07:32 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 21 Nov 2006 07:32:04 +0000 (07:32 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@5169 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/fai/class_faiHook.inc
plugins/admin/fai/class_faiPackage.inc
plugins/admin/fai/class_faiPartitionTable.inc
plugins/admin/fai/class_faiProfile.inc
plugins/admin/fai/class_faiScript.inc
plugins/admin/fai/class_faiTemplate.inc
plugins/admin/fai/class_faiVariable.inc
plugins/admin/fai/paste_fai_object.tpl [new file with mode: 0644]

index 2d6e6f94aff16de2f636fd575e61fc5b81fa794e..50f398e590ba4b1ddc3ddb790845942ecc7e82c1 100644 (file)
@@ -527,6 +527,28 @@ class faiHook extends plugin
       $this->handle_object_tagging($sub_dn, $this->gosaUnitTag);
     }
   }
+  
+  /* 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:
index 27faa1c589f4660daae2bb411a861f32b604d598..28897efac401d94173261e4b495c5faf2545aa60 100644 (file)
@@ -561,10 +561,28 @@ class faiPackage extends plugin
         $this->handle_object_tagging($pkgdn, $this->gosaUnitTag);
       }
     }
+  }
+  
+  /* 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'];
+    }
   }
 }
 
index e306340590ebaf6c99cb13896888ae8eb40287a1..3376d600ede748bab48b7f21165728c657943091 100644 (file)
@@ -540,6 +540,29 @@ class faiPartitionTable extends plugin
     }
     $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:
index 69af93981b56e3d03f3d5101091b513a8e828102..6befbbdfd6cec63966b658a43804cd1d3c4be0c3 100644 (file)
@@ -466,6 +466,29 @@ class faiProfile extends plugin
     $this->handle_object_tagging();
     show_ldap_error($ldap->get_error());
   }
+
+  
+  /* 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:
index c8337c4a1572b3cbe4e24edc2547b028413581a0..e70a404564d2f63b0c524e9b89ea5f26a9b6f7ec 100644 (file)
@@ -498,6 +498,31 @@ class faiScript extends plugin
       $this->handle_object_tagging($sub_dn, $this->gosaUnitTag);
     }
   }
+
+  
+  /* 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:
index 3e6ea309d96f2112c934a39b9053dec5aeebe6e0..06945f10c3190a472a9392201e28323d3b6b7ad4 100644 (file)
@@ -488,6 +488,28 @@ class faiTemplate extends plugin
       $this->handle_object_tagging($sub_dn, $this->gosaUnitTag);
     }
   }
+  
+  /* 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:
index 83027c7dfb31307909ea6a1e6dc6f0bb4b2bccca..39565634ae3260dfb449e4314574ff1c68899805 100644 (file)
@@ -405,6 +405,28 @@ class faiVariable extends plugin
       $this->handle_object_tagging($sub_dn, $this->gosaUnitTag);
     }
   }
+  
+  /* 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:
diff --git a/plugins/admin/fai/paste_fai_object.tpl b/plugins/admin/fai/paste_fai_object.tpl
new file mode 100644 (file)
index 0000000..6562670
--- /dev/null
@@ -0,0 +1 @@
+{t}cn{/t} : <input type='text' name='cn' value='{$cn}'>