From: hickert Date: Wed, 7 Sep 2005 13:20:02 +0000 (+0000) Subject: Added other classes for Hooks Variables Templates X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=7d95e41f245135d80276144e08fef00ed502042d;p=gosa.git Added other classes for Hooks Variables Templates git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@1317 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/admin/FAI/class_faiManagement.inc b/plugins/admin/FAI/class_faiManagement.inc index fb6681453..3f38e2a9a 100644 --- a/plugins/admin/FAI/class_faiManagement.inc +++ b/plugins/admin/FAI/class_faiManagement.inc @@ -18,6 +18,9 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ require "tabsPartition.inc"; +require "tabsVariable.inc"; +require "tabsHook.inc"; +require "tabsTemplate.inc"; require "tabsScript.inc"; class faiManagement extends plugin @@ -198,7 +201,7 @@ class faiManagement extends plugin $entry = $this->objects[$s_entry]; $a_setup = ( $this->get_type($entry)); - + $this->dn = $entry['dn']; $this->dialog= new $a_setup[0]($this->config, $this->config->data['TABS'][$a_setup[2]],$this->dn); @@ -505,6 +508,15 @@ class faiManagement extends plugin if(in_array("FAIscript",$array['objectClass'])){ return(array("tabsScript","faiScript","FAISCRIPTTABS")); } + if(in_array("FAItemplate",$array['objectClass'])){ + return(array("tabsTemplate","faiTemplate","FAITEMPLATETABS")); + } + if(in_array("FAIhook",$array['objectClass'])){ + return(array("tabsHook","faiHook","FAIHOOKTABS")); + } + if(in_array("FAIvariable",$array['objectClass'])){ + return(array("tabsVariable","faiVariable","FAIVARIABLETABS")); + } } } diff --git a/plugins/admin/FAI/faiHook.tpl b/plugins/admin/FAI/faiHook.tpl new file mode 100644 index 000000000..e7ac45b21 --- /dev/null +++ b/plugins/admin/FAI/faiHook.tpl @@ -0,0 +1,35 @@ +

{t}FAI script set{/t} +

+ + + + + + + + + +
+ {t}Name{/t} + + +
+ {t}Description{/t} + + +
+
+
+

{t}Already defined scripts{/t}

+ + + + +
+
+ + + +
diff --git a/plugins/admin/FAI/faiHookEntry.tpl b/plugins/admin/FAI/faiHookEntry.tpl new file mode 100644 index 000000000..6a4ed396f --- /dev/null +++ b/plugins/admin/FAI/faiHookEntry.tpl @@ -0,0 +1,44 @@ +

{t}FAI script set{/t} +

+ + + + + + + + + + +
+ {t}Name{/t} + + +
+ {t}Description{/t} + + +
+

 

+
+

{t}Script{/t}

+ + + + + + + +
+ +
+ +
+
+

 

+
+
+ + +
+ diff --git a/plugins/admin/FAI/faiTemplate.tpl b/plugins/admin/FAI/faiTemplate.tpl new file mode 100644 index 000000000..e7ac45b21 --- /dev/null +++ b/plugins/admin/FAI/faiTemplate.tpl @@ -0,0 +1,35 @@ +

{t}FAI script set{/t} +

+ + + + + + + + + +
+ {t}Name{/t} + + +
+ {t}Description{/t} + + +
+
+
+

{t}Already defined scripts{/t}

+ + + + +
+
+ + + +
diff --git a/plugins/admin/FAI/faiTemplateEntry.tpl b/plugins/admin/FAI/faiTemplateEntry.tpl new file mode 100644 index 000000000..6a4ed396f --- /dev/null +++ b/plugins/admin/FAI/faiTemplateEntry.tpl @@ -0,0 +1,44 @@ +

{t}FAI script set{/t} +

+ + + + + + + + + + +
+ {t}Name{/t} + + +
+ {t}Description{/t} + + +
+

 

+
+

{t}Script{/t}

+ + + + + + + +
+ +
+ +
+
+

 

+
+
+ + +
+ diff --git a/plugins/admin/FAI/faiVariable.tpl b/plugins/admin/FAI/faiVariable.tpl new file mode 100644 index 000000000..e7ac45b21 --- /dev/null +++ b/plugins/admin/FAI/faiVariable.tpl @@ -0,0 +1,35 @@ +

{t}FAI script set{/t} +

+ + + + + + + + + +
+ {t}Name{/t} + + +
+ {t}Description{/t} + + +
+
+
+

{t}Already defined scripts{/t}

+ + + + +
+
+ + + +
diff --git a/plugins/admin/FAI/faiVariableEntry.tpl b/plugins/admin/FAI/faiVariableEntry.tpl new file mode 100644 index 000000000..6a4ed396f --- /dev/null +++ b/plugins/admin/FAI/faiVariableEntry.tpl @@ -0,0 +1,44 @@ +

{t}FAI script set{/t} +

+ + + + + + + + + + +
+ {t}Name{/t} + + +
+ {t}Description{/t} + + +
+

 

+
+

{t}Script{/t}

+ + + + + + + +
+ +
+ +
+
+

 

+
+
+ + +
+ diff --git a/plugins/admin/FAI/tabsHook.inc b/plugins/admin/FAI/tabsHook.inc new file mode 100644 index 000000000..f438f8236 --- /dev/null +++ b/plugins/admin/FAI/tabsHook.inc @@ -0,0 +1,42 @@ +by_object['faiHook']; + + $new_dn= 'cn='.$baseobject->cn.",ou=hooks,ou=fai,ou=configs,ou=systems,".$_SESSION['config']->current['BASE']; + + if ($this->dn != $new_dn && $this->dn != "new"){ + + /* if( new_dn is subtree of this->dn ) */ + $cnt1 = count(split(",",$this->dn)); + $cnt2 = count(split(",",$new_dn)); + if((strstr($new_dn,$this->dn))&&($cnt1<$cnt2)){ + print_red(_("Try to move tree failed. Destination tree is subtree of source tree.")); + }else{ + $baseobject->recursive_move($this->dn, $new_dn); + } + } + $this->dn= $new_dn; + + tabs::save(TRUE); + } + +} + +?> diff --git a/plugins/admin/FAI/tabsTemplate.inc b/plugins/admin/FAI/tabsTemplate.inc new file mode 100644 index 000000000..ada68ce91 --- /dev/null +++ b/plugins/admin/FAI/tabsTemplate.inc @@ -0,0 +1,42 @@ +by_object['faiTemplate']; + + $new_dn= 'cn='.$baseobject->cn.",ou=templates,ou=fai,ou=configs,ou=systems,".$_SESSION['config']->current['BASE']; + + if ($this->dn != $new_dn && $this->dn != "new"){ + + /* if( new_dn is subtree of this->dn ) */ + $cnt1 = count(split(",",$this->dn)); + $cnt2 = count(split(",",$new_dn)); + if((strstr($new_dn,$this->dn))&&($cnt1<$cnt2)){ + print_red(_("Try to move tree failed. Destination tree is subtree of source tree.")); + }else{ + $baseobject->recursive_move($this->dn, $new_dn); + } + } + $this->dn= $new_dn; + + tabs::save(TRUE); + } + +} + +?> diff --git a/plugins/admin/FAI/tabsVariable.inc b/plugins/admin/FAI/tabsVariable.inc new file mode 100644 index 000000000..86a8851f0 --- /dev/null +++ b/plugins/admin/FAI/tabsVariable.inc @@ -0,0 +1,42 @@ +by_object['faiVariable']; + + $new_dn= 'cn='.$baseobject->cn.",ou=variables,ou=fai,ou=configs,ou=systems,".$_SESSION['config']->current['BASE']; + + if ($this->dn != $new_dn && $this->dn != "new"){ + + /* if( new_dn is subtree of this->dn ) */ + $cnt1 = count(split(",",$this->dn)); + $cnt2 = count(split(",",$new_dn)); + if((strstr($new_dn,$this->dn))&&($cnt1<$cnt2)){ + print_red(_("Try to move tree failed. Destination tree is subtree of source tree.")); + }else{ + $baseobject->recursive_move($this->dn, $new_dn); + } + } + $this->dn= $new_dn; + + tabs::save(TRUE); + } + +} + +?>