Template editor done.
[timetracker.git] / WEB-INF / templates / plugins.tpl
1 <script>
2 // handlePluginCheckboxes - controls visibility of controls.
3 function handlePluginCheckboxes() {
4   var clientsCheckbox = document.getElementById("clients");
5   var invoicesCheckbox = document.getElementById("invoices");
6   var requiredCheckbox = document.getElementById("client_required");
7   var requiredLabel = document.getElementById("client_required_label");
8   if (clientsCheckbox.checked) {
9     requiredCheckbox.style.visibility = "visible";
10     requiredLabel.style.visibility = "visible";
11     invoicesCheckbox.disabled = false;
12   } else {
13     requiredCheckbox.checked = false;
14     requiredCheckbox.style.visibility = "hidden";
15     requiredLabel.style.visibility = "hidden";
16     invoicesCheckbox.checked = false;
17     invoicesCheckbox.disabled = true;
18   }
19
20   var expensesCheckbox = document.getElementById("expenses");
21   var taxCheckbox = document.getElementById("tax_expenses");
22   var taxLabel = document.getElementById("tax_label");
23   if (expensesCheckbox.checked) {
24     taxCheckbox.style.visibility = "visible";
25     taxLabel.style.visibility = "visible";
26   } else {
27     taxCheckbox.checked = false;
28     taxCheckbox.style.visibility = "hidden";
29     taxLabel.style.visibility = "hidden";
30   }
31   var configureLabel = document.getElementById("expenses_config");
32   if (expensesCheckbox.checked) {
33     configureLabel.style.visibility = "visible";
34   } else {
35     configureLabel.style.visibility = "hidden";
36   }
37
38   var customFieldsCheckbox = document.getElementById("custom_fields");
39   configureLabel = document.getElementById("cf_config");
40   if (customFieldsCheckbox.checked) {
41     configureLabel.style.visibility = "visible";
42   } else {
43     configureLabel.style.visibility = "hidden";
44   }
45
46   var notificationsCheckbox = document.getElementById("notifications");
47   configureLabel = document.getElementById("notifications_config");
48   if (notificationsCheckbox.checked) {
49     configureLabel.style.visibility = "visible";
50   } else {
51     configureLabel.style.visibility = "hidden";
52   }
53
54   var lockingCheckbox = document.getElementById("locking");
55   configureLabel = document.getElementById("locking_config");
56   if (lockingCheckbox.checked) {
57     configureLabel.style.visibility = "visible";
58   } else {
59     configureLabel.style.visibility = "hidden";
60   }
61
62   var quotasCheckbox = document.getElementById("quotas");
63   configureLabel = document.getElementById("quotas_config");
64   if (quotasCheckbox.checked){
65     configureLabel.style.visibility = "visible";
66   } else {
67     configureLabel.style.visibility = "hidden";
68   }
69
70   var weekViewCheckbox = document.getElementById("week_view");
71   configureLabel = document.getElementById("week_view_config");
72   if (weekViewCheckbox.checked){
73     configureLabel.style.visibility = "visible";
74   } else {
75     configureLabel.style.visibility = "hidden";
76   }
77
78   var workUnitsCheckbox = document.getElementById("work_units");
79   configureLabel = document.getElementById("work_units_config");
80   if (workUnitsCheckbox.checked){
81     configureLabel.style.visibility = "visible";
82   } else {
83     configureLabel.style.visibility = "hidden";
84   }
85
86   var templatesCheckbox = document.getElementById("templates");
87   configureLabel = document.getElementById("templates_config");
88   if (templatesCheckbox.checked){
89     configureLabel.style.display = "";
90     //configureLabel.style.visibility = "visible";
91   } else {
92     configureLabel.style.display = "none";
93     //configureLabel.style.visibility = "hidden";
94   }
95 }
96 </script>
97
98 {$forms.pluginsForm.open}
99 <table cellspacing="4" cellpadding="7" border="0">
100     <tr>
101       <td>
102         <table cellspacing="1" cellpadding="2" border="0">
103           <tr>
104             <td align="right" nowrap>{$forms.pluginsForm.charts.control}</td>
105             <td><label for="charts">{$i18n.title.charts}</label></td>
106           </tr>
107           <tr>
108             <td align="right" nowrap>{$forms.pluginsForm.clients.control}</td>
109             <td><label for="clients">{$i18n.title.clients}</label> {$forms.pluginsForm.client_required.control} <span id="client_required_label"><label for="client_required">{$i18n.label.required}</label></span></td>
110           </tr>
111           <tr>
112             <td align="right" nowrap>{$forms.pluginsForm.invoices.control}</td>
113             <td><label for="invoices">{$i18n.title.invoices}</label></td>
114           </tr>
115           <tr>
116             <td align="right" nowrap>{$forms.pluginsForm.paid_status.control}</td>
117             <td><label for="paid_status">{$i18n.label.paid_status}</label></td>
118           </tr>
119           <tr>
120             <td align="right" nowrap>{$forms.pluginsForm.custom_fields.control}</td>
121             <td><label for="custom_fields">{$i18n.label.custom_fields}</label> <span id="cf_config"><a href="cf_custom_fields.php">{$i18n.label.configure}</a></span></td>
122           </tr>
123           <tr>
124             <td align="right" nowrap>{$forms.pluginsForm.expenses.control}</td>
125             <td><label for="expenses">{$i18n.title.expenses}</label> {$forms.pluginsForm.tax_expenses.control} <span id="tax_label"><label for="tax_expenses">{$i18n.label.tax}</label></span> <span id="expenses_config"><a href="predefined_expenses.php">{$i18n.label.configure}</a></span></td>
126           </tr>
127           <tr>
128             <td align="right" nowrap>{$forms.pluginsForm.notifications.control}</td>
129             <td><label for="notifications">{$i18n.title.notifications}</label> <span id="notifications_config">{if $user_exists}<a href="notifications.php">{$i18n.label.configure}</a>{/if}</span></td>
130           </tr>
131           <tr>
132             <td align="right" nowrap>{$forms.pluginsForm.locking.control}</td>
133             <td><label for="locking">{$i18n.title.locking}</label> <span id="locking_config"><a href="locking.php">{$i18n.label.configure}</a></span></td>
134           </tr>
135           <tr>
136             <td align="right" nowrap>{$forms.pluginsForm.quotas.control}</td>
137             <td><label for="quotas">{$i18n.label.monthly_quotas}</label> <span id="quotas_config"><a href="quotas.php">{$i18n.label.configure}</a></span></td>
138           </tr>
139           <tr>
140             <td align="right" nowrap>{$forms.pluginsForm.week_view.control}</td>
141             <td><label for="week_view">{$i18n.label.week_view}</label> <span id="week_view_config"><a href="week_view.php">{$i18n.label.configure}</a></span></td>
142           </tr>
143           <tr>
144             <td align="right" nowrap>{$forms.pluginsForm.work_units.control}</td>
145             <td><label for="work_units">{$i18n.label.work_units}</label> <span id="work_units_config"><a href="work_units.php">{$i18n.label.configure}</a></span></td>
146           </tr>
147           <tr>
148             <td align="right" nowrap>{$forms.pluginsForm.approval.control}</td>
149             <td><label for="approval">{$i18n.label.approval}</label> <a href="https://www.anuko.com/lp/tt_28.htm" target="_blank">{$i18n.label.what_is_it}</a></td>
150           </tr>
151           <tr>
152             <td align="right" nowrap>{$forms.pluginsForm.timesheets.control}</td>
153             <td><label for="timesheets">{$i18n.title.timesheets}</label></td>
154           </tr>
155 {if isTrue('TEMPLATES_DEBUG')}
156           <tr>
157             <td align="right" nowrap>{$forms.pluginsForm.templates.control}</td>
158             <td><label for="templates">{$i18n.title.templates}</label> <span id="templates_config"><a href="templates.php">{$i18n.label.configure}</a></span> <a href="https://www.anuko.com/lp/tt_29.htm" target="_blank">{$i18n.label.what_is_it}</a></td>
159           </tr>
160 {/if}
161           <tr>
162             <td colspan="2">&nbsp;</td>
163           </tr>
164           <tr>
165             <td colspan="2" height="50" align="center">{$forms.pluginsForm.btn_save.control}</td>
166           </tr>
167         </table>
168       </td>
169     </tr>
170 </table>
171 {$forms.pluginsForm.close}