Code

FAIprofile listbox in GOsa style
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 21 Oct 2005 11:58:23 +0000 (11:58 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 21 Oct 2005 11:58:23 +0000 (11:58 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@1655 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/fai/class_faiProfile.inc
plugins/admin/fai/faiProfile.tpl

index aa6019971472662f8a41b5e8958d0a9dbc5f87a9..d5680e49d26d354f1a80e32976f01fd80cef6a61 100644 (file)
@@ -91,6 +91,11 @@ class faiProfile extends plugin
         $s_entry  = preg_replace("/_.*$/","",$s_entry);
       }elseif(preg_match("/Add_class/i",$name)){
         $s_action  = "add";
+      }elseif(preg_match("/DelClass/i",$name)){
+        $s_action  = "delete";
+        $s_entry = $_POST['FAIclass'];
+      }elseif(preg_match("/AddClass/i",$name)){
+        $s_action  = "add";
       }
     }
 
@@ -166,7 +171,8 @@ class faiProfile extends plugin
       $field3 = array("string"=> preg_replace("/%KEY%/",$usedClass,$actions),"attach"=>"style='border-right:none;'");
       $divlist->AddEntry(array($field1,$field2,$field3));
     }
-
+    
+    $smarty->assign("FAIclasses"  ,$this->FAIclasses);
     $smarty->assign("divlisthead" ,$listhead);
     $smarty->assign("divlist"     ,$divlist->DrawList());
 
index fcd02b169ed2a35815780237e0ea88fccd8234ed..934f61737a639f2903160e64e88b3980fa95341a 100644 (file)
@@ -1,28 +1,49 @@
-<h2><img alt="" src="images/house.png" align="middle" title="{t}Generic{/t}">&nbsp;{t}Generic{/t}</h2>
-<table summary="" cellspacing="4">
+<table width="100%">
        <tr>
-               <td>
-                       <LABEL for="cn">
-                       {t}Name{/t}{$must}
-                       </LABEL>
+               <td width="50%" valign="top">
+                       <h2><img alt="" src="images/house.png" align="middle" title="{t}Generic{/t}">&nbsp;{t}Generic{/t}</h2>
+                       <table summary="" cellspacing="4">
+                               <tr>
+                                       <td>
+                                               <LABEL for="cn">
+                                               {t}Name{/t}{$must}
+                                               </LABEL>
+                                       </td>
+                                       <td>
+                                               <input value="{$cn}" id="cn" name="cn">
+                                       </td>
+                               </tr>
+                               <tr>
+                                       <td>
+                                               <LABEL for="description">
+                                               {t}Description{/t}
+                                               </LABEL>
+                                       </td>
+                                       <td>
+                                               <input value="{$description}" {$description} name="description" id="description">
+                                       </td>
+                               </tr>
+                       </table>
                </td>
-               <td>
-                       <input value="{$cn}" id="cn" name="cn">
-               </td>
-       </tr>
-       <tr>
-               <td>
-                       <LABEL for="description">
-                       {t}Description{/t}
-                       </LABEL>
-               </td>
-               <td>
-                       <input value="{$description}" {$description} name="description" id="description">
+               <td valign="top" style="border-left: 1px solid rgb(160, 160, 160);">
+                       <table summary="" style="vertical-align:top; text-align:left;" cellpadding=4>
+                               <tr>
+                                       <td style="vertical-align:top;">
+                                               <h2><img alt="" src="images/house.png" align="middle" title="{t}Generic{/t}">&nbsp;{t}FAI classes{/t}</h2> 
+                                               <select name="FAIclass" title="{t}Choose a priority{/t}" style="width:350px;height:150px;" multiple>
+                                                       {html_options values=$FAIclasses output=$FAIclasses}
+                                               </select>
+                                               <br>
+                                               <input type="submit" name="AddClass" value="{t}Add{/t}">
+                                               <input type="submit" name="DelClass" value="{t}Delete{/t}">
+                                               <input type="hidden" name="edit_helper">
+                                       </td>
+                               </tr>
+                       </table>
                </td>
        </tr>
 </table>
-<br>
-
+<!--
 <table summary="" style="vertical-align:top; text-align:left;" cellpadding=4>
 <tr>
   <td style="vertical-align:top;">
@@ -45,6 +66,7 @@
                </td>
        </tr>
 </table>
+-->
 <!-- Place cursor -->
 <script language="JavaScript" type="text/javascript">
   <!-- // First input field on page