Code

Template Design
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 8 Sep 2005 06:13:27 +0000 (06:13 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 8 Sep 2005 06:13:27 +0000 (06:13 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@1321 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/FAI/class_faiManagement.inc
plugins/admin/FAI/class_faiTemplate.inc
plugins/admin/FAI/class_faiTemplateEntry.inc
plugins/admin/FAI/class_faiVariableEntry.inc
plugins/admin/FAI/faiHook.tpl
plugins/admin/FAI/faiScript.tpl
plugins/admin/FAI/faiTemplate.tpl
plugins/admin/FAI/faiTemplateEntry.tpl
plugins/admin/FAI/faiVariable.tpl
plugins/admin/FAI/faiVariableEntry.tpl

index 3f38e2a9abdaa26d858ca79115ce3acd38edeaa3..99665d4c18a9f743e05f5b2c98a3bb382bf3b948 100644 (file)
@@ -203,6 +203,7 @@ class faiManagement extends plugin
                        $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);
                        $this->is_dialog = true;
index b9763389740f796ca41e7cf3bfde5c836c91662e..e34fa213dad08424296427369c7e32e2a6796568 100644 (file)
@@ -236,7 +236,7 @@ class faiTemplate extends plugin
       $tmp['objectClass'] = $this->subClasses;
       
       $sub_dn = "cn=".$obj['cn'].",".$this->dn;
+
       if($obj['status'] == "delete"){
         $ldap->cd($sub_dn);
         $ldap->rmdir_recursive($sub_dn);
index 58490b4af28aad5b9c94ab2eddc53b14a06043a3..ca0f879f4383fb396a394924e86bece3c0270537 100644 (file)
@@ -9,15 +9,17 @@ class faiTemplateEntry extends plugin
 
   /* attribute list for save action */
   var $ignore_account= TRUE;
-  var $attributes   = array("Object_cn","Object_description","Object_FAIpriority","Object_FAIscript");
+  var $attributes   = array("Object_cn","Object_description","Object_FAItemplateFile","Object_FAItemplatePath","Object_FAIowner","Object_FAImode");
   var $objectclasses= array();
 
   var $orig_cn              = "";
 
   var $Object_dn            = "";
   var $Object_cn            = "";
-  var $Object_FAIpriority   = "";
-  var $Object_FAIscript     = "";
+  var $Object_FAItemplateFile   = "";
+  var $Object_FAItemplatePath   = "";
+  var $Object_FAIowner     = "";
+  var $Object_FAImode    = "";
   var $Object_description   = "";
   var $Object_status        = "new";
   
index 1b630d491df6d86ce2ac8c6545a7a03ac23be871..01dff1dbbd89da846e58e4f2cc747c0fe5f68385 100644 (file)
@@ -9,15 +9,13 @@ class faiVariableEntry extends plugin
 
   /* attribute list for save action */
   var $ignore_account= TRUE;
-  var $attributes   = array("Object_cn","Object_description","Object_FAIpriority","Object_FAIscript");
+  var $attributes   = array("Object_cn","Object_description","Object_FAIvariableContent");
   var $objectclasses= array();
 
   var $orig_cn              = "";
-
   var $Object_dn            = "";
   var $Object_cn            = "";
-  var $Object_FAIpriority   = "";
-  var $Object_FAIscript     = "";
+  var $Object_FAIvariableContent   = "";
   var $Object_description   = "";
   var $Object_status        = "new";
   
index e7ac45b21c271d8437ec220e86f770574d3259db..c40963328f595acb89a2beebf892eac0d5d44ecf 100644 (file)
@@ -1,35 +1,51 @@
-<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>
+       <tr>
+               <td width="50%" valign="top">
+                               <h2><img alt="" src="images/house.png" align="middle" title="{t}Generic{/t}">&nbsp;{t}Generic{/t}</h2><br>
+                               <table summary="" cellspacing="4">
+                                       <tr>
+                                               <td>
+                                                       <LABEL for="cn">
+                                                       {t}Name{/t}
+                                                       </LABEL>
+                                               </td>
+                                               <td>
+                                                       <input value="{$cn}" disabled id="cn">
+                                               </td>
+                                       </tr>
+                                       <tr>
+                                               <td>
+                                                       <LABEL for="description">
+                                                       {t}Description{/t}{$must}
+                                                       </LABEL>
+                                               </td>
+                                               <td>
+                                                       <input value="{$description}" {$description} name="description" id="description">
+                                               </td>
+                                       </tr>
+                               </table>
+               </td>
+               <td style="border-left: 1px solid rgb(160, 160, 160);">
+                  &nbsp;
+               </td>
+               <td>
+                               <h2><img alt="" src="images/list_ogroup.png" align="middle" title="{t}Objects{/t}">&nbsp;
+                                       <LABEL for="SubObject">
+                                               {t}This bundle contains following objects{/t}
+                                       </LABEL>
+                               </h2><br>
+                               <table width="100%">
+                               <tr>
+                                       <td>
+                                               <select name="SubObject" title="{t}Choose a hook to delete or edit{/t}" style="width:350px;height:120px;" size=10 id="SubObject">
+                                                       {html_options values=$SubObjectKeys output=$SubObjects}
+                                               </select><br>
+                                               <input type="submit" name="AddSubObject"     value="{t}Add{/t}"         title="{t}Add{/t}">
+                                               <input type="submit" name="EditSubObject"    value="{t}Edit{/t}"    title="{t}Edit{/t}">
+                                               <input type="submit" name="DelSubObject"     value="{t}Delete{/t}"  title="{t}Delete{/t}">
+                                       </td>
+                               </tr>
+                               </table>
+               </td>
+       </tr>
 </table>
index e7ac45b21c271d8437ec220e86f770574d3259db..06930ef8811bcdbe0bc5f6ba635b973f266bca00 100644 (file)
@@ -1,35 +1,51 @@
-<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>
+       <tr>
+               <td width="50%" valign="top">
+                               <h2><img alt="" src="images/house.png" align="middle" title="{t}Generic{/t}">&nbsp;{t}Generic{/t}</h2><br>
+                               <table summary="" cellspacing="4">
+                                       <tr>
+                                               <td>
+                                                       <LABEL for="cn">
+                                                       {t}Name{/t}
+                                                       </LABEL>
+                                               </td>
+                                               <td>
+                                                       <input value="{$cn}" disabled id="cn">
+                                               </td>
+                                       </tr>
+                                       <tr>
+                                               <td>
+                                                       <LABEL for="description">
+                                                       {t}Description{/t}{$must}
+                                                       </LABEL>
+                                               </td>
+                                               <td>
+                                                       <input value="{$description}" {$description} name="description" id="description">
+                                               </td>
+                                       </tr>
+                               </table>
+               </td>
+               <td style="border-left: 1px solid rgb(160, 160, 160);">
+                  &nbsp;
+               </td>
+               <td>
+                               <h2><img alt="" src="images/list_ogroup.png" align="middle" title="{t}Objects{/t}">&nbsp;
+                                       <LABEL for="SubObject">
+                                               {t}This bundle contains following objects{/t}
+                                       </LABEL>
+                               </h2><br>
+                               <table width="100%">
+                               <tr>
+                                       <td>
+                                               <select name="SubObject" title="{t}Choose a script to delete or edit{/t}" style="width:350px;height:120px;" size=10 id="SubObject">
+                                                       {html_options values=$SubObjectKeys output=$SubObjects}
+                                               </select><br>
+                                               <input type="submit" name="AddSubObject"     value="{t}Add{/t}"         title="{t}Add{/t}">
+                                               <input type="submit" name="EditSubObject"    value="{t}Edit{/t}"    title="{t}Edit{/t}">
+                                               <input type="submit" name="DelSubObject"     value="{t}Delete{/t}"  title="{t}Delete{/t}">
+                                       </td>
+                               </tr>
+                               </table>
+               </td>
+       </tr>
 </table>
index e7ac45b21c271d8437ec220e86f770574d3259db..1b61132e72c2572a58da123d5330bfc81827647d 100644 (file)
@@ -1,35 +1,51 @@
-<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>
+       <tr>
+               <td width="50%" valign="top">
+                               <h2><img alt="" src="images/house.png" align="middle" title="{t}Generic{/t}">&nbsp;{t}Generic{/t}</h2><br>
+                               <table summary="" cellspacing="4">
+                                       <tr>
+                                               <td>
+                                                       <LABEL for="cn">
+                                                       {t}Name{/t}
+                                                       </LABEL>
+                                               </td>
+                                               <td>
+                                                       <input value="{$cn}" disabled id="cn">
+                                               </td>
+                                       </tr>
+                                       <tr>
+                                               <td>
+                                                       <LABEL for="description">
+                                                       {t}Description{/t}{$must}
+                                                       </LABEL>
+                                               </td>
+                                               <td>
+                                                       <input value="{$description}" {$description} name="description" id="description">
+                                               </td>
+                                       </tr>
+                               </table>
+               </td>
+               <td style="border-left: 1px solid rgb(160, 160, 160);">
+                  &nbsp;
+               </td>
+               <td>
+                               <h2><img alt="" src="images/list_ogroup.png" align="middle" title="{t}Objects{/t}">&nbsp;
+                                       <LABEL for="SubObject">
+                                               {t}This bundle contains following objects{/t}
+                                       </LABEL>
+                               </h2><br>
+                               <table width="100%">
+                               <tr>
+                                       <td>
+                                               <select name="SubObject" title="{t}Choose a template to delete or edit{/t}" style="width:350px;height:120px;" size=10 id="SubObject">
+                                                       {html_options values=$SubObjectKeys output=$SubObjects}
+                                               </select><br>
+                                               <input type="submit" name="AddSubObject"     value="{t}Add{/t}"         title="{t}Add{/t}">
+                                               <input type="submit" name="EditSubObject"    value="{t}Edit{/t}"    title="{t}Edit{/t}">
+                                               <input type="submit" name="DelSubObject"     value="{t}Delete{/t}"  title="{t}Delete{/t}">
+                                       </td>
+                               </tr>
+                               </table>
+               </td>
+       </tr>
 </table>
index 6a4ed396f2b7f7ece55679e218bad8cd84a10e98..0e67301a247b89a30ac138147d8bbddacbce2ab5 100644 (file)
@@ -1,44 +1,81 @@
-<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">&nbsp;</p>
-<br>
-<h2>{t}Script{/t}</h2>
-<table width="100%">
-    <tr>
-        <td>
-               <input type="text" name="Object_FAIscript" value="{$Object_FAIscript}">
+<table width="100%" summary="">
+       <tr>
+               <td valign="top" width="50%">
+                       <h2><img alt="" src="images/house.png" align="middle" title="{t}Generic{/t}">&nbsp;{t}Generic{/t}</h2>
+                               <table>
+                                       <tr>
+                                               <td>
+                                                       {t}Name{/t}&nbsp;{$must}
+                                               </td>
+                                               <td>
+                                                       <input value="{$Object_cn}" name="Object_cn">
+                                               </td>
+                                       </tr>
+                                       <tr>
+                                               <td>
+                                                       {t}Description{/t}&nbsp;{$must}
+                                               </td>
+                                               <td>
+                                                       <input value="{$Object_description}" name="Object_description">
+                                               </td>
+                                       </tr>
+                               </table>
                </td>
-    </tr>
-    <tr>
-        <td>
-               <input type="text" name="Object_FAItask" value="{$Object_FAItask}">
+               <td style="border-left: 1px solid rgb(160, 160, 160);">
+           &nbsp;
+        </td>
+               <td>
+                               <h2><img alt="" src="images/folder.png" align="middle" title="{t}Template attributes{/t}">&nbsp;{t}Template attributes{/t}</h2>
+                               <table width="100%">
+                                       <tr>
+                                               <td>
+                                                       <LABEL for="Object_FAItemplatePath">
+                                                       {t}Path{/t}&nbsp;{$must}
+                                                       </LABEL>
+                                               </td>
+                                               <td>
+                                                       <input type="text" name="Object_FAItemplatePath" value="{$Object_FAItemplatePath}" id="Object_FAItemplatePath">
+                                               </td>
+                                       </tr>
+                                       <tr>
+                                               <td>
+                                                       <LABEL for="Object_FAItemplateFile">
+                                                       {t}File{/t}&nbsp;{$must}
+                                                       </LABEL>
+                                               </td>
+                                               <td>
+                                                       <input type="text" name="Object_FAItemplateFile" value="{$Object_FAItemplateFile}" id="Object_FAItemplateFile">
+                                               </td>
+                                       </tr>
+                                       <tr>
+                                               <td>
+                                                       <LABEL for="Object_FAItemplateEntry">
+                                                       {t}Owner{/t}
+                                                       </LABEL>
+                                               </td>
+                                               <td>
+                                                       <input type="text" name="Object_FAItemplateEntry" value="{$Object_FAIowner}" id="Object_FAIowner">
+                                               </td>
+                                       </tr>
+                                       <tr>
+                                               <td>
+                                                       <LABEL for="Object_FAImode">
+                                                       {t}Mode{/t}
+                                                       </LABEL>
+                                               </td>
+                                               <td>
+                                                       <input type="text" name="Object_FAItemplateEntry" value="{$Object_FAImode}" id="Object_FAImode">
+                                               </td>
+                                       </tr>
+                               </table>
                </td>
-    </tr>
+       </tr>
 </table>
-<br>
 <p class="seperator">&nbsp;</p>
 <br>
 <div style="align:right;" align="right">
-       <input type="submit" value="{t}Save{/t}"        name="SaveSubObject">
+       <input type="submit" value="{t}Save{/t}"        name="SaveSubObject">&nbsp;
        <input type="submit" value="{t}Abort{/t}"       name="CancelSubObject">
 </div>
 
index e7ac45b21c271d8437ec220e86f770574d3259db..6c009f6a2e7400da6a7ac0c373fe69add65c0a56 100644 (file)
@@ -1,35 +1,51 @@
-<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>
+       <tr>
+               <td width="50%" valign="top">
+                               <h2><img alt="" src="images/house.png" align="middle" title="{t}Generic{/t}">&nbsp;{t}Generic{/t}</h2><br>
+                               <table summary="" cellspacing="4">
+                                       <tr>
+                                               <td>
+                                                       <LABEL for="cn">
+                                                       {t}Name{/t}
+                                                       </LABEL>
+                                               </td>
+                                               <td>
+                                                       <input value="{$cn}" disabled id="cn">
+                                               </td>
+                                       </tr>
+                                       <tr>
+                                               <td>
+                                                       <LABEL for="description">
+                                                       {t}Description{/t}{$must}
+                                                       </LABEL>
+                                               </td>
+                                               <td>
+                                                       <input value="{$description}" {$description} name="description" id="description">
+                                               </td>
+                                       </tr>
+                               </table>
+               </td>
+               <td style="border-left: 1px solid rgb(160, 160, 160);">
+                  &nbsp;
+               </td>
+               <td>
+                               <h2><img alt="" src="images/list_ogroup.png" align="middle" title="{t}Objects{/t}">&nbsp;
+                                       <LABEL for="SubObject">
+                                               {t}This bundle contains following objects{/t}
+                                       </LABEL>
+                               </h2><br>
+                               <table width="100%">
+                               <tr>
+                                       <td>
+                                               <select name="SubObject" title="{t}Choose a variable to delete or edit{/t}" style="width:350px;height:120px;" size=10 id="SubObject">
+                                                       {html_options values=$SubObjectKeys output=$SubObjects}
+                                               </select><br>
+                                               <input type="submit" name="AddSubObject"     value="{t}Add{/t}"         title="{t}Add{/t}">
+                                               <input type="submit" name="EditSubObject"    value="{t}Edit{/t}"    title="{t}Edit{/t}">
+                                               <input type="submit" name="DelSubObject"     value="{t}Delete{/t}"  title="{t}Delete{/t}">
+                                       </td>
+                               </tr>
+                               </table>
+               </td>
+       </tr>
 </table>
index 6a4ed396f2b7f7ece55679e218bad8cd84a10e98..97abbe64379deb7143e545ca630d70b90c0a9907 100644 (file)
@@ -1,44 +1,51 @@
-<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">&nbsp;</p>
-<br>
-<h2>{t}Script{/t}</h2>
-<table width="100%">
-    <tr>
-        <td>
-               <input type="text" name="Object_FAIscript" value="{$Object_FAIscript}">
+<table width="100%" summary="">
+       <tr>
+               <td valign="top" width="50%">
+                       <h2><img alt="" src="images/house.png" align="middle" title="{t}Generic{/t}">&nbsp;{t}Generic{/t}</h2>
+                               <table>
+                                       <tr>
+                                               <td>
+                                                       {t}Name{/t}&nbsp;{$must}
+                                               </td>
+                                               <td>
+                                                       <input value="{$Object_cn}" name="Object_cn">
+                                               </td>
+                                       </tr>
+                                       <tr>
+                                               <td>
+                                                       {t}Description{/t}&nbsp;{$must}
+                                               </td>
+                                               <td>
+                                                       <input value="{$Object_description}" name="Object_description">
+                                               </td>
+                                       </tr>
+                               </table>
                </td>
-    </tr>
-    <tr>
-        <td>
-               <input type="text" name="Object_FAItask" value="{$Object_FAItask}">
+               <td style="border-left: 1px solid rgb(160, 160, 160);">
+           &nbsp;
+        </td>
+               <td valign="top">
+                               <h2><img alt="" src="images/false.png" align="middle" title="{t}Variable attributes{/t}">&nbsp;{t}Variable attributes{/t}</h2>
+                               <table width="100%">
+                                       <tr>
+                                               <td>
+                                                       <LABEL for="Content">
+                                                       {t}Variable Content{/t}{$must}
+                                                       </LABEL>
+                                               </td>
+                                               <td>
+                                                       <input type="text" name="Object_FAIvariableContent" value="{$Object_FAIvariableContent}" id="Content" style="width:250px;">
+                                               </td>
+                                       </tr>
+                               </table>
                </td>
-    </tr>
+       </tr>
 </table>
-<br>
 <p class="seperator">&nbsp;</p>
 <br>
 <div style="align:right;" align="right">
-       <input type="submit" value="{t}Save{/t}"        name="SaveSubObject">
+       <input type="submit" value="{t}Save{/t}"        name="SaveSubObject">&nbsp;
        <input type="submit" value="{t}Abort{/t}"       name="CancelSubObject">
 </div>