summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 5329a4a)
raw | patch | inline | side by side (parent: 5329a4a)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 7 Sep 2005 13:20:02 +0000 (13:20 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 7 Sep 2005 13:20:02 +0000 (13:20 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@1317 594d385d-05f5-0310-b6e9-bd551577e9d8
plugins/admin/FAI/class_faiManagement.inc | patch | blob | history | |
plugins/admin/FAI/faiHook.tpl | [new file with mode: 0644] | patch | blob |
plugins/admin/FAI/faiHookEntry.tpl | [new file with mode: 0644] | patch | blob |
plugins/admin/FAI/faiTemplate.tpl | [new file with mode: 0644] | patch | blob |
plugins/admin/FAI/faiTemplateEntry.tpl | [new file with mode: 0644] | patch | blob |
plugins/admin/FAI/faiVariable.tpl | [new file with mode: 0644] | patch | blob |
plugins/admin/FAI/faiVariableEntry.tpl | [new file with mode: 0644] | patch | blob |
plugins/admin/FAI/tabsHook.inc | [new file with mode: 0644] | patch | blob |
plugins/admin/FAI/tabsTemplate.inc | [new file with mode: 0644] | patch | blob |
plugins/admin/FAI/tabsVariable.inc | [new file with mode: 0644] | patch | blob |
index fb6681453ae5af620be262157bb2cf1f2f3bc202..3f38e2a9abdaa26d858ca79115ce3acd38edeaa3 100644 (file)
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
$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);
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
--- /dev/null
@@ -0,0 +1,35 @@
+<h2>{t}FAI script set{/t}
+<br><br>
+<table>
+ <tr>
+ <td>
+ {t}Name{/t}
+ </td>
+ <td>
+ <input value="{$cn}" disabled>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ {t}Description{/t}
+ </td>
+ <td>
+ <input value="{$description}" {$description} name="description">
+ </td>
+ </tr>
+</table>
+<br>
+<br>
+<h2>{t}Already defined scripts{/t}</h2>
+<table width="100%">
+ <tr>
+ <td>
+ <select name="SubObject" title="{t}Choose a script to delete or edit{/t}" style="width:450px;height:250px;" multiple>
+ {html_options values=$SubObjectKeys output=$SubObjects}
+ </select><br>
+ <input type="submit" name="AddSubObject" value="{t}Add{/t}">
+ <input type="submit" name="EditSubObject" value="{t}Edit{/t}">
+ <input type="submit" name="DelSubObject" value="{t}Delete{/t}">
+ </td>
+ </tr>
+</table>
diff --git a/plugins/admin/FAI/faiHookEntry.tpl b/plugins/admin/FAI/faiHookEntry.tpl
--- /dev/null
@@ -0,0 +1,44 @@
+<h2>{t}FAI script set{/t}
+<br><br>
+<input type="hidden" name="SubObjectFormSubmitted" value="1">
+<table>
+ <tr>
+ <td>
+ {t}Name{/t}
+ </td>
+ <td>
+ <input value="{$Object_cn}" name="Object_cn">
+ </td>
+ </tr>
+ <tr>
+ <td>
+ {t}Description{/t}
+ </td>
+ <td>
+ <input value="{$Object_description}" name="Object_description">
+ </td>
+ </tr>
+</table>
+<p class="seperator"> </p>
+<br>
+<h2>{t}Script{/t}</h2>
+<table width="100%">
+ <tr>
+ <td>
+ <input type="text" name="Object_FAIscript" value="{$Object_FAIscript}">
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <input type="text" name="Object_FAItask" value="{$Object_FAItask}">
+ </td>
+ </tr>
+</table>
+<br>
+<p class="seperator"> </p>
+<br>
+<div style="align:right;" align="right">
+ <input type="submit" value="{t}Save{/t}" name="SaveSubObject">
+ <input type="submit" value="{t}Abort{/t}" name="CancelSubObject">
+</div>
+
diff --git a/plugins/admin/FAI/faiTemplate.tpl b/plugins/admin/FAI/faiTemplate.tpl
--- /dev/null
@@ -0,0 +1,35 @@
+<h2>{t}FAI script set{/t}
+<br><br>
+<table>
+ <tr>
+ <td>
+ {t}Name{/t}
+ </td>
+ <td>
+ <input value="{$cn}" disabled>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ {t}Description{/t}
+ </td>
+ <td>
+ <input value="{$description}" {$description} name="description">
+ </td>
+ </tr>
+</table>
+<br>
+<br>
+<h2>{t}Already defined scripts{/t}</h2>
+<table width="100%">
+ <tr>
+ <td>
+ <select name="SubObject" title="{t}Choose a script to delete or edit{/t}" style="width:450px;height:250px;" multiple>
+ {html_options values=$SubObjectKeys output=$SubObjects}
+ </select><br>
+ <input type="submit" name="AddSubObject" value="{t}Add{/t}">
+ <input type="submit" name="EditSubObject" value="{t}Edit{/t}">
+ <input type="submit" name="DelSubObject" value="{t}Delete{/t}">
+ </td>
+ </tr>
+</table>
diff --git a/plugins/admin/FAI/faiTemplateEntry.tpl b/plugins/admin/FAI/faiTemplateEntry.tpl
--- /dev/null
@@ -0,0 +1,44 @@
+<h2>{t}FAI script set{/t}
+<br><br>
+<input type="hidden" name="SubObjectFormSubmitted" value="1">
+<table>
+ <tr>
+ <td>
+ {t}Name{/t}
+ </td>
+ <td>
+ <input value="{$Object_cn}" name="Object_cn">
+ </td>
+ </tr>
+ <tr>
+ <td>
+ {t}Description{/t}
+ </td>
+ <td>
+ <input value="{$Object_description}" name="Object_description">
+ </td>
+ </tr>
+</table>
+<p class="seperator"> </p>
+<br>
+<h2>{t}Script{/t}</h2>
+<table width="100%">
+ <tr>
+ <td>
+ <input type="text" name="Object_FAIscript" value="{$Object_FAIscript}">
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <input type="text" name="Object_FAItask" value="{$Object_FAItask}">
+ </td>
+ </tr>
+</table>
+<br>
+<p class="seperator"> </p>
+<br>
+<div style="align:right;" align="right">
+ <input type="submit" value="{t}Save{/t}" name="SaveSubObject">
+ <input type="submit" value="{t}Abort{/t}" name="CancelSubObject">
+</div>
+
diff --git a/plugins/admin/FAI/faiVariable.tpl b/plugins/admin/FAI/faiVariable.tpl
--- /dev/null
@@ -0,0 +1,35 @@
+<h2>{t}FAI script set{/t}
+<br><br>
+<table>
+ <tr>
+ <td>
+ {t}Name{/t}
+ </td>
+ <td>
+ <input value="{$cn}" disabled>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ {t}Description{/t}
+ </td>
+ <td>
+ <input value="{$description}" {$description} name="description">
+ </td>
+ </tr>
+</table>
+<br>
+<br>
+<h2>{t}Already defined scripts{/t}</h2>
+<table width="100%">
+ <tr>
+ <td>
+ <select name="SubObject" title="{t}Choose a script to delete or edit{/t}" style="width:450px;height:250px;" multiple>
+ {html_options values=$SubObjectKeys output=$SubObjects}
+ </select><br>
+ <input type="submit" name="AddSubObject" value="{t}Add{/t}">
+ <input type="submit" name="EditSubObject" value="{t}Edit{/t}">
+ <input type="submit" name="DelSubObject" value="{t}Delete{/t}">
+ </td>
+ </tr>
+</table>
diff --git a/plugins/admin/FAI/faiVariableEntry.tpl b/plugins/admin/FAI/faiVariableEntry.tpl
--- /dev/null
@@ -0,0 +1,44 @@
+<h2>{t}FAI script set{/t}
+<br><br>
+<input type="hidden" name="SubObjectFormSubmitted" value="1">
+<table>
+ <tr>
+ <td>
+ {t}Name{/t}
+ </td>
+ <td>
+ <input value="{$Object_cn}" name="Object_cn">
+ </td>
+ </tr>
+ <tr>
+ <td>
+ {t}Description{/t}
+ </td>
+ <td>
+ <input value="{$Object_description}" name="Object_description">
+ </td>
+ </tr>
+</table>
+<p class="seperator"> </p>
+<br>
+<h2>{t}Script{/t}</h2>
+<table width="100%">
+ <tr>
+ <td>
+ <input type="text" name="Object_FAIscript" value="{$Object_FAIscript}">
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <input type="text" name="Object_FAItask" value="{$Object_FAItask}">
+ </td>
+ </tr>
+</table>
+<br>
+<p class="seperator"> </p>
+<br>
+<div style="align:right;" align="right">
+ <input type="submit" value="{t}Save{/t}" name="SaveSubObject">
+ <input type="submit" value="{t}Abort{/t}" name="CancelSubObject">
+</div>
+
diff --git a/plugins/admin/FAI/tabsHook.inc b/plugins/admin/FAI/tabsHook.inc
--- /dev/null
@@ -0,0 +1,42 @@
+<?php
+
+class tabsHook extends tabs
+{
+ var $base= "";
+
+ function tabsHook($config, $data, $dn)
+ {
+ tabs::tabs($config, $data, $dn);
+ }
+
+ function check()
+ {
+ return (tabs::check(TRUE));
+ }
+
+
+ function save()
+ {
+ $baseobject= $this->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
--- /dev/null
@@ -0,0 +1,42 @@
+<?php
+
+class tabsTemplate extends tabs
+{
+ var $base= "";
+
+ function tabsTemplate($config, $data, $dn)
+ {
+ tabs::tabs($config, $data, $dn);
+ }
+
+ function check()
+ {
+ return (tabs::check(TRUE));
+ }
+
+
+ function save()
+ {
+ $baseobject= $this->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
--- /dev/null
@@ -0,0 +1,42 @@
+<?php
+
+class tabsVariable extends tabs
+{
+ var $base= "";
+
+ function tabsVariable($config, $data, $dn)
+ {
+ tabs::tabs($config, $data, $dn);
+ }
+
+ function check()
+ {
+ return (tabs::check(TRUE));
+ }
+
+
+ function save()
+ {
+ $baseobject= $this->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);
+ }
+
+}
+
+?>