Code

Fixed opsiLicense editor w3c and post handling
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 18 Mar 2010 10:12:27 +0000 (10:12 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 18 Mar 2010 10:12:27 +0000 (10:12 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@16908 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/opsi/admin/opsiLicenses/class_licensePoolGeneric.inc
gosa-plugins/opsi/admin/opsiLicenses/licensePoolGeneric.tpl

index 7ff2a81d52d59f3245fccf3d594636ea20de6693..5c24ddc65a077752f909ad8db9b702f762b2818a 100644 (file)
@@ -253,9 +253,9 @@ class licensePoolGeneric extends plugin
     if($this->acl_is_readable("licenses")){
       $editlink = "<a href='?plug=".$_GET['plug']."&amp;act=edit&amp;id=%s'>%s</a>";
       foreach($this->licenses as $i => $license){
-        $link = "<input type='image' class='center' src='images/lists/edit.png' name='editLicense_{$i}'>";
+        $link = image("images/lists/edit.png","editLicense_{$i}");
         if(preg_match("/w/", $this->getacl("licenses"))){
-          $link.= "<input type='image' class='center' src='images/lists/trash.png' name='removeLicense_{$i}'>";
+          $link.= image("images/lists/trash.png","removeLicense_{$i}");
         }
 
         $maxInst = "";
@@ -376,7 +376,7 @@ class licensePoolGeneric extends plugin
       if(preg_match("/r/",$this->getacl("licenses"))){
         foreach($_POST as $name => $value){
           if(preg_match("/^editLicense_/",$name)){
-            $id = preg_replace("/^editLicense_(.*)_.$/","\\1",$name);
+            $id = preg_replace("/^editLicense_(.*)$/","\\1",$name);
             if(isset($this->licenses[$id])){
               $this->dialog = new licenseGeneric($this->config,$this->dn,$this->licenses[$id], $this->opsiHosts);
               $this->dialog->set_acl_base($this->config->current['BASE']);
@@ -384,7 +384,7 @@ class licensePoolGeneric extends plugin
             break;
           }
           if(preg_match("/^removeLicense_/",$name)){
-            $id = preg_replace("/^removeLicense_(.*)_.$/","\\1",$name);
+            $id = preg_replace("/^removeLicense_(.*)$/","\\1",$name);
             if(isset($this->licenses[$id])){
               unset($this->licenses[$id]);
             }
index 76311bcb44fc5e8aed2b32d435586fbe52246c4b..b6b955e094231abb880aff3cb907ef9017db2582 100644 (file)
@@ -1,19 +1,21 @@
 {if !$init_successfull}
-<br>
-<b>{msgPool type=siError}</b><br>
-{t}Check if the GOsa support daemon (gosa-si) is running.{/t}&nbsp;
-<button type='submit' name='retry_init'>{t}Retry{/t}</button>
 
-<br>
-<br>
-{else}
+  <br>
+    <b>{msgPool type=siError}</b><br>
+    {t}Check if the GOsa support daemon (gosa-si) is running.{/t}&nbsp;
+    <button type='submit' name='retry_init'>{t}Retry{/t}</button>
+  <br>
+  <br>
 
+{else}
 
-<table width="100%">
+<table width="100%" summary="{t}Lincense settings{/t}">
   <tr> 
-    <td>        <!-- GENERIC -->
+    <td>
+
+        <!-- GENERIC -->
         <h3>{t}Generic{/t}</h3>
-        <table>
+        <table summary="{t}Generic settings{/t}">
           <tr> 
             <td>{t}Name{/t}</td>
             <td>
 
     </td>
     <td style='width:50%; padding: 5px;' class='left-border'>        <!-- LICENSES -->
-        <h3>{t}Licenses{/t}</h3>
-        <table style='width:100%;'>
-          <tr> 
-            <td>
-              {$licenses}
+      <h3>{t}Licenses{/t}</h3>
+      {$licenses}
 {render acl=$licensesACL}
               <button type='submit' name='addLicense'>{msgPool type=addButton}</button>
 
 {/render}
-            </td>
-          </tr>
-        </table>
-
     </td>
   </tr>
   <tr> 
     <td colspan="2">
-      <p class='separator'>&nbsp;</p>
+      <hr>
     </td>
   </tr>
   <tr>
     <td style='width:50%'>
-        <!-- APPLICATIONS -->
         <h3>{t}Applications{/t}</h3>
-        <table style='width:100%;'>
-          <tr> 
-            <td>
 {render acl=$productIdsACL}
               <select name='productIds[]' multiple size="6" style="width:100%;">
                 {html_options options=$productIds}
               <button type='submit' name='removeProduct'>{msgPool type=delButton}</button>
 
 {/render}
-            </td>
-          </tr>
-        </table>
-
     </td>
     <td style='padding: 5px;' class='left-border'>        <!-- SOFTWARE -->
         <h3>{t}Windows software IDs{/t}</h3>
-        <table style='width:100%;'>
-          <tr> 
-            <td>
 {render acl=$windowsSoftwareIdsACL}
               <select name='softwareIds[]' multiple size="6" style="width:100%;">
                 {html_options options=$softwareIds}
               </select>
 {/render}
-<!--
-{render acl=$windowsSoftwareIdsACL}
-              <input type='text' name='newSoftwareId' value='' size=10>
-{/render}
-{render acl=$windowsSoftwareIdsACL}
-              <input type='submit' name='addSoftware' value='{msgPool type='addButton'}'>
-{/render}
-{render acl=$windowsSoftwareIdsACL}
-              <input type='submit' name='removeSoftware' value='{msgPool type='delButton'}'>
-{/render}
--->
-            </td>
-          </tr>
-        </table>
-
     </td>
   </tr>
 </table>