Code

Only show date selector while dates are writeable
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 30 Sep 2009 13:30:29 +0000 (13:30 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 30 Sep 2009 13:30:29 +0000 (13:30 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@14414 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/opsi/admin/opsiLicenses/class_licenseByProduct.inc
gosa-plugins/opsi/admin/opsiLicenses/class_licenseGeneric.inc
gosa-plugins/opsi/admin/opsiLicenses/class_licensePoolGeneric.inc
gosa-plugins/opsi/admin/opsiLicenses/class_licenseUsage.inc
gosa-plugins/opsi/admin/opsiLicenses/class_licenseUsageByHost.inc
gosa-plugins/opsi/admin/opsiLicenses/licenseGeneric.tpl

index 83f79e5811ee6301b95df7cedfde13fb823f9f02..8609c135d0b35b20c5042b37e60a681546953aa9 100644 (file)
@@ -137,7 +137,7 @@ class licenseByProduct extends plugin
           "plDescription" => _("License usage by product"),
           "plSelfModify"  => FALSE,
           "plDepends"     => array(),
-          "plPriority"    => 1,
+          "plPriority"    => 12,
           "plSection"     => array("administration"),
           "plCategory"    => array("opsi"),
           "plProvidedAcls"=> array()));
index 297dea7e602f6562f13d1b52dfb3b71fdb09cdee..5b8d122625433e476d2735314ee30cc820518e66 100644 (file)
@@ -143,6 +143,11 @@ class licenseGeneric extends plugin
     $smarty->assign("notUsedHosts", array_diff($this->getHosts(), $this->usedByHost));
     $smarty->assign("boundToHost", $this->boundToHost[0]);
     $smarty->assign("licenseKey", $this->licenseKey[0]);
+
+    foreach(array("notificationDate","expirationDate","conclusionDate") as $date) {
+      $smarty->assign($date."Writeable", $this->acl_is_writeable($date));
+    }
+
     return($smarty->fetch(get_template_path('licenseGeneric.tpl',TRUE,dirname(__FILE__))));
   }
 
@@ -266,7 +271,7 @@ class licenseGeneric extends plugin
           "plDescription" => _("License generic"),
           "plSelfModify"  => FALSE,
           "plDepends"     => array(),
-          "plPriority"    => 1,
+          "plPriority"    => 8,
           "plSection"     => array("administration"),
           "plCategory"    => array("opsi"),
           "plProvidedAcls"=> array(
index b5986c37484d3087cf9cac7228185e847c2aa64f..fe704d49e2a1dab00bd26fd92aef0ce05dc18f0d 100644 (file)
@@ -509,7 +509,7 @@ class licensePoolGeneric extends plugin
           "plDescription" => _("License pool generic"),
           "plSelfModify"  => FALSE,
           "plDepends"     => array(),
-          "plPriority"    => 1,
+          "plPriority"    => 7,
           "plSection"     => array("administration"),
           "plCategory"    => array("opsi"),
           "plProvidedAcls"=> array(
index 3c9bf0ec9fb50b3d8a3ca0439b5b3848a9372e29..972a7dece765dc8119ea115ac3b7c69af7baad4e 100644 (file)
@@ -143,7 +143,7 @@ class licenseUsage extends plugin
           "plDescription" => _("License usage"),
           "plSelfModify"  => FALSE,
           "plDepends"     => array(),
-          "plPriority"    => 1,
+          "plPriority"    => 11,
           "plSection"     => array("administration"),
           "plCategory"    => array("opsi"),
           "plProvidedAcls"=> array()));
index fc30f543536380886c058f0670f9c94a9ca79c74..746d2b9d8b248ef4b832b04b670dd976f565e8a9 100644 (file)
@@ -245,7 +245,7 @@ class licenseUsageByHost extends plugin
           "plDescription" => _("License usage by host"),
           "plSelfModify"  => FALSE,
           "plDepends"     => array(),
-          "plPriority"    => 1,
+          "plPriority"    => 13,
           "plSection"     => array("administration"),
           "plCategory"    => array("opsi"),
           "plProvidedAcls"=> array(
index da685ce02b6baf19f3199004a28369604f41d2c8..46a1dedfc0e2d52db299413f7a51834880993f86 100644 (file)
@@ -72,6 +72,7 @@
             <td style='width:300px;'>
 {render acl=$licenseACL}
               <input type="text" id="date1" name="conclusionDate" value="{$conclusionDate}" class="date" />
+              {if $conclusionDateWriteable}
               {literal}
               <script type="text/javascript">
                   /*<[CDATA[*/
@@ -82,6 +83,7 @@
                   /*]]>*/
               </script>
               {/literal}
+              {/if}
 {/render}
             </td>
           </tr>
@@ -92,6 +94,7 @@
             <td style='width:300px;'>
 {render acl=$licenseACL}
               <input type="text" id="date2" name="expirationDate" value="{$expirationDate}" class="date" />
+              {if $expirationDateWriteable}
               {literal}
               <script type="text/javascript">
                   /*<[CDATA[*/
                   /*]]>*/
               </script>
               {/literal}
+              {/if}
 {/render}
             </td>
           </tr>
             <td style='width:300px;'>
 {render acl=$licenseACL}
               <input type="text" id="date3" name="notificationDate" value="{$notificationDate}" class="date" >
+              {if $notificationDateWriteable}
               {literal}
               <script type="text/javascript">
                   /*<[CDATA[*/
                   /*]]>*/
               </script>
               {/literal}
+              {/if}
 {/render}
             </td>
           </tr>