Some refactoring and cleanup in ttRegistrator class.
[timetracker.git] / WEB-INF / templates / quotas.tpl
1 <table cellspacing="0" cellpadding="7" border="0" width="720">
2   <tr><td valign="top">{$i18n.form.quota.hint}</td></tr>
3 </table>
4
5 {$forms.monthlyQuotasForm.open}
6 <div style="padding: 0 0 10 0">
7   <table border="0" class="divider">
8     <tr>
9       <td align="center">
10         <table>
11           <tr>
12             <td>{$i18n.form.quota.workday_hours}:</td>
13             <td>{$forms.monthlyQuotasForm.workdayHours.control}</td>
14           </tr>
15         </table>
16       </td>
17     </tr>
18   </table>
19 </div>
20 <table>
21   <tr>
22     <td>{$i18n.form.quota.year}:</td>
23     <td>{$forms.monthlyQuotasForm.year.control}</td>
24   </tr>
25   <tr><td>&nbsp;</td></tr>
26   <tr>
27     <td colspan="2">
28       <table>
29         <tr>
30           <td class="tableHeaderCentered">{$i18n.form.quota.month}</td>
31           <td class="tableHeaderCentered">{$i18n.form.quota.quota}</td>
32         </tr>
33 {foreach $months as $month}
34         <tr>
35           <td>{$month}:</td>
36           <td>{$forms.monthlyQuotasForm.$month.control}</td>
37         </tr>
38 {/foreach}
39         <tr><td colspan="2">&nbsp;</td></tr>
40         <tr><td colspan="2" style="text-align:center;"><input type="submit" name="btn_submit" value="{$i18n.button.save}"></td></tr>
41       </table>
42     </td>
43   </tr>
44 </table>
45 {$forms.monthlyQuotasForm.close}
46
47 <script>
48 function yearChange(value){
49   var url = window.location.href;
50
51   if (url.indexOf('?') > 0){
52     var parameter = url.substring(url.indexOf('?') + 1, url.length);
53     url = url.replace(parameter, 'year=' + value);
54   } else {
55     url = '?year=' + value;
56   }
57
58   window.location = url;
59 }
60 </script>