Code

Only show date selector while dates are writeable
[gosa.git] / gosa-plugins / opsi / admin / opsiLicenses / licenseGeneric.tpl
index 1ca85f471742ae44cd233ff07f5f6eaa66bfd222..46a1dedfc0e2d52db299413f7a51834880993f86 100644 (file)
@@ -2,7 +2,7 @@
 <br>
 <b>{msgPool type=siError}</b><br>
 {t}Check if the GOsa support daemon (gosa-si) is running.{/t}&nbsp;
-<input type='submit' name='retry_init' value="{t}retry{/t}">
+<input type='submit' name='retry_init' value="{t}Retry{/t}">
 <br>
 <br>
 {else}
             <td>
               {t}Conclusion date{/t}
             </td>
-            <td>
+            <td style='width:300px;'>
 {render acl=$licenseACL}
-              <input type='text' name='conclusionDate' value='{$conclusionDate}'>
+              <input type="text" id="date1" name="conclusionDate" value="{$conclusionDate}" class="date" />
+              {if $conclusionDateWriteable}
+              {literal}
+              <script type="text/javascript">
+                  /*<[CDATA[*/
+                  var datepicker    = new DatePicker({
+                  relative    : 'date1',
+                  language    : 'de'
+                  });
+                  /*]]>*/
+              </script>
+              {/literal}
+              {/if}
 {/render}
             </td>
           </tr>
             <td>
               {t}Expiration date{/t}
             </td>
-            <td>
+            <td style='width:300px;'>
 {render acl=$licenseACL}
-              <input type='text' name='expirationDate' value='{$expirationDate}'>
+              <input type="text" id="date2" name="expirationDate" value="{$expirationDate}" class="date" />
+              {if $expirationDateWriteable}
+              {literal}
+              <script type="text/javascript">
+                  /*<[CDATA[*/
+                  var datepicker    = new DatePicker({
+                  relative    : 'date2',
+                  language    : 'de'
+                  });
+                  /*]]>*/
+              </script>
+              {/literal}
+              {/if}
 {/render}
             </td>
           </tr>
             <td>
               {t}Notification date{/t}
             </td>
-            <td>
+            <td style='width:300px;'>
 {render acl=$licenseACL}
-              <input type='text' name='notificationDate' value='{$notificationDate}'>
+              <input type="text" id="date3" name="notificationDate" value="{$notificationDate}" class="date" >
+              {if $notificationDateWriteable}
+              {literal}
+              <script type="text/javascript">
+                  /*<[CDATA[*/
+                  var datepicker    = new DatePicker({
+                  relative    : 'date3',
+                  language    : 'de'
+                  });
+                  /*]]>*/
+              </script>
+              {/literal}
+              {/if}
 {/render}
             </td>
           </tr>
           {if $licenseModel == "OEM"}
           <tr>
             <td>
-              {t}Reserved for Host{/t}
+              {t}Reserved for{/t}
             </td>
             <td>
 {render acl=$licenseACL}
         <table width="100%">
           <tr>
             <td colspan="2">
-              <b>{t}Used by Host{/t}</b><br>
+              <b>{t}Used by{/t}</b><br>
 {render acl=$licenseACL}
               <select   disabled
                 name='selectedUsedHosts[]' multiple size=4 style='width:100%;'>
     </td> 
   </tr>
 </table>
+{literal}
+<script type="text/javascript">
+    /*<[CDATA[*/
+    var datepicker    = new DatePicker({
+    relative    : 'date',
+    language    : 'de'
+    });
+    /*]]>*/
+</script>
+{/literal}
 <input name='opsiLicensesPosted' value='1' type='hidden'>
 {/if}