FUTURE_ENTRIES option is now configurable as per issue #53.
[timetracker.git] / WEB-INF / templates / profile_edit.tpl
1 <script>
2 // handleTaskRequiredCheckbox - controls visibility of the Task Required checkbox.
3 function handleTaskRequiredCheckbox() {
4   var taskRequiredCheckbox = document.getElementById("task_required");
5   var taskRequiredLabel = document.getElementById("task_required_label");
6   var trackingModeDropdown = document.getElementById("tracking_mode");
7   if (trackingModeDropdown.value == 2) {
8     taskRequiredCheckbox.style.visibility = "visible";
9     taskRequiredLabel.style.visibility = "visible";
10   } else {
11     taskRequiredCheckbox.style.visibility = "hidden";
12     taskRequiredLabel.style.visibility = "hidden";
13   }
14 }
15
16
17 // handleControls - controls visibility of controls.
18 function handlePluginCheckboxes() {
19   var clientsCheckbox = document.getElementById("clients");
20   var invoicesCheckbox = document.getElementById("invoices");
21   var requiredCheckbox = document.getElementById("client_required");
22   var requiredLabel = document.getElementById("client_required_label");
23   if (clientsCheckbox.checked) {
24     requiredCheckbox.style.visibility = "visible";
25     requiredLabel.style.visibility = "visible";
26     invoicesCheckbox.disabled = false;
27   } else {
28     requiredCheckbox.checked = false;
29     requiredCheckbox.style.visibility = "hidden";
30     requiredLabel.style.visibility = "hidden";
31     invoicesCheckbox.checked = false;
32     invoicesCheckbox.disabled = true;
33   }
34
35   var expensesCheckbox = document.getElementById("expenses");
36   var taxCheckbox = document.getElementById("tax_expenses");
37   var taxLabel = document.getElementById("tax_label");
38   if (expensesCheckbox.checked) {
39     taxCheckbox.style.visibility = "visible";
40     taxLabel.style.visibility = "visible";
41   } else {
42     taxCheckbox.checked = false;
43     taxCheckbox.style.visibility = "hidden";
44     taxLabel.style.visibility = "hidden";
45   }
46   var configureLabel = document.getElementById("expenses_config");
47   if (expensesCheckbox.checked) {
48     configureLabel.style.visibility = "visible";
49   } else {
50     configureLabel.style.visibility = "hidden";
51   }
52
53   var customFieldsCheckbox = document.getElementById("custom_fields");
54   configureLabel = document.getElementById("cf_config");
55   if (customFieldsCheckbox.checked) {
56     configureLabel.style.visibility = "visible";
57   } else {
58     configureLabel.style.visibility = "hidden";
59   }
60
61   var notificationsCheckbox = document.getElementById("notifications");
62   configureLabel = document.getElementById("notifications_config");
63   if (notificationsCheckbox.checked) {
64     configureLabel.style.visibility = "visible";
65   } else {
66     configureLabel.style.visibility = "hidden";
67   }
68
69   var lockingCheckbox = document.getElementById("locking");
70   configureLabel = document.getElementById("locking_config");
71   if (lockingCheckbox.checked) {
72     configureLabel.style.visibility = "visible";
73   } else {
74     configureLabel.style.visibility = "hidden";
75   }
76   
77   var quotasCheckbox = document.getElementById("quotas");
78   configureLabel = document.getElementById("quotas_config");
79   if (quotasCheckbox.checked){
80     configureLabel.style.visibility = "visible";
81   } else {
82     configureLabel.style.visibility = "hidden";
83   }
84
85   var weekViewCheckbox = document.getElementById("week_view");
86   configureLabel = document.getElementById("week_view_config");
87   if (weekViewCheckbox.checked){
88     configureLabel.style.visibility = "visible";
89   } else {
90     configureLabel.style.visibility = "hidden";
91   }
92 }
93 </script>
94
95 {$forms.profileForm.open}
96
97 {if $user->canManageTeam()}
98 {include file="datetime_format_preview.tpl"}
99 {/if}
100
101 <table cellspacing="4" cellpadding="7" border="0">
102     <tr>
103       <td>
104         <table cellspacing="1" cellpadding="2" border="0">
105           <tr>
106             <td align="right" nowrap>{$i18n.label.person_name} (*):</td>
107             <td>{$forms.profileForm.name.control}</td>
108           </tr>
109           <tr>
110             <td align="right" nowrap>{$i18n.label.login} (*):</td>
111             <td>{$forms.profileForm.login.control}</td>
112           </tr>
113 {if !$auth_external}
114           <tr>
115             <td align="right" nowrap>{$i18n.label.password} (*):</td>
116             <td>{$forms.profileForm.password1.control}</td>
117           </tr>
118           <tr>
119             <td align="right" nowrap>{$i18n.label.confirm_password} (*):</td>
120             <td>{$forms.profileForm.password2.control}</td>
121           </tr>
122 {/if}
123           <tr>
124             <td align="right" nowrap>{$i18n.label.email}:</td>
125             <td>{$forms.profileForm.email.control}</td>
126           </tr>
127           <tr>
128             <td></td>
129             <td>{$i18n.label.required_fields}</td>
130           </tr>
131
132 {if $user->canManageTeam()}
133           <tr>
134             <td colspan="2">&nbsp;</td>
135           </tr>
136           <tr>
137             <td align="right" nowrap>{$i18n.label.team_name}:</td>
138             <td>{$forms.profileForm.team_name.control}</td>
139           </tr>
140           <tr>
141             <td align="right">{$i18n.label.currency}:</td>
142             <td>{$forms.profileForm.currency.control}</td>
143           </tr>
144           <tr>
145            <td align="right" nowrap>{$i18n.label.language}:</td>
146            <td>{$forms.profileForm.lang.control}</td>
147           </tr>
148           <tr>
149             <td align="right">{$i18n.label.decimal_mark}:</td>
150             <td>{$forms.profileForm.decimal_mark.control} <font id="decimal_preview" color="#777777">&nbsp;</font></td>
151           <tr>
152             <td align="right" nowrap>{$i18n.label.date_format}:</td>
153             <td>{$forms.profileForm.date_format.control} <font id="date_format_preview" color="#777777">&nbsp;</font></td>
154           </tr>
155           <tr>
156             <td align="right" nowrap>{$i18n.label.time_format}:</td>
157             <td>{$forms.profileForm.time_format.control} <font id="time_format_preview" color="#777777">&nbsp;</font></td>
158           </tr>
159           <tr>
160             <td align="right" nowrap>{$i18n.label.week_start}:</td>
161             <td>{$forms.profileForm.start_week.control}</td>
162           </tr>
163           <tr>
164             <td align="right" nowrap>{$i18n.form.profile.show_holidays}:</td>
165             <td>{$forms.profileForm.show_holidays.control} <a href="https://www.anuko.com/lp/tt_14.htm" target="_blank">{$i18n.label.what_is_it}</a></td>
166           </tr>
167           <tr>
168             <td align="right" nowrap>{$i18n.form.profile.tracking_mode}:</td>
169             <td>{$forms.profileForm.tracking_mode.control} {$forms.profileForm.task_required.control} <span id="task_required_label"><label for="task_required">{$i18n.label.required}</label></span></td>
170           </tr>
171           <tr>
172             <td align="right" nowrap>{$i18n.form.profile.record_type}:</td>
173             <td>{$forms.profileForm.record_type.control}</td>
174           </tr>
175           <tr>
176             <td align="right" nowrap>{$i18n.form.profile.allow_overlap}:</td>
177             <td>{$forms.profileForm.allow_overlap.control} <a href="https://www.anuko.com/lp/tt_16.htm" target="_blank">{$i18n.label.what_is_it}</a></td>
178           </tr>
179           <tr>
180             <td align="right" nowrap>{$i18n.form.profile.future_entries}:</td>
181             <td>{$forms.profileForm.future_entries.control} <a href="https://www.anuko.com/lp/tt_17.htm" target="_blank">{$i18n.label.what_is_it}</a></td>
182           </tr>
183           <tr>
184             <td align="right" nowrap>{$i18n.form.profile.uncompleted_indicators}:</td>
185             <td>{$forms.profileForm.uncompleted_indicators.control} <a href="https://www.anuko.com/lp/tt_15.htm" target="_blank">{$i18n.label.what_is_it}</a></td>
186           </tr>
187 {if $user->isManager()}
188           <tr>
189             <td align="right" nowrap>{$i18n.label.bcc}:</td>
190             <td>{$forms.profileForm.bcc_email.control} <a href="https://www.anuko.com/lp/tt_10.htm" target="_blank">{$i18n.label.what_is_it}</a></td>
191           </tr>
192 {/if}
193           {* initialize preview text *}
194           <script>
195             MakeFormatPreview("date_format_preview", document.getElementById("date_format"));
196             MakeFormatPreview("time_format_preview", document.getElementById("time_format"));
197
198             function adjustDecimalPreview()
199             {
200               var mark = document.getElementById("decimal_mark").value;
201               var example = document.getElementById("decimal_preview");
202               example.innerHTML = "<i>3"+mark+"14</i>";
203             }
204             adjustDecimalPreview();
205           </script>
206
207           <tr>
208             <td>&nbsp;</td>
209             <td>&nbsp;</td>
210           </tr>
211
212           <tr>
213              <td colspan="2" class="sectionHeader">{$i18n.form.profile.plugins}</td>
214           </tr>
215           <tr><td>&nbsp;</td></tr>
216           <tr>
217             <td align="right" nowrap>{$forms.profileForm.charts.control}</td>
218             <td><label for="charts">{$i18n.title.charts}</label></td>
219           </tr>
220           <tr>
221             <td align="right" nowrap>{$forms.profileForm.clients.control}</td>
222             <td><label for="clients">{$i18n.title.clients}</label> {$forms.profileForm.client_required.control} <span id="client_required_label"><label for="client_required">{$i18n.label.required}</label></span></td>
223           </tr>
224           <tr>
225             <td align="right" nowrap>{$forms.profileForm.invoices.control}</td>
226             <td><label for="invoices">{$i18n.title.invoices}</label></td>
227           </tr>
228           <tr>
229             <td align="right" nowrap>{$forms.profileForm.paid_status.control}</td>
230             <td><label for="paid_status">{$i18n.label.paid_status}</label></td>
231           </tr>
232           <tr>
233             <td align="right" nowrap>{$forms.profileForm.custom_fields.control}</td>
234             <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>
235           </tr>
236           <tr>
237             <td align="right" nowrap>{$forms.profileForm.expenses.control}</td>
238             <td><label for="expenses">{$i18n.title.expenses}</label> {$forms.profileForm.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>
239           </tr>
240           <tr>
241             <td align="right" nowrap>{$forms.profileForm.notifications.control}</td>
242             <td><label for="notifications">{$i18n.title.notifications}</label> <span id="notifications_config"><a href="notifications.php">{$i18n.label.configure}</a></span></td>
243           </tr>
244           <tr>
245             <td align="right" nowrap>{$forms.profileForm.locking.control}</td>
246             <td><label for="locking">{$i18n.title.locking}</label> <span id="locking_config"><a href="locking.php">{$i18n.label.configure}</a></span></td>
247           </tr>
248           <tr>
249             <td align="right" nowrap>{$forms.profileForm.quotas.control}</td>
250             <td><label for="quotas">{$i18n.label.monthly_quotas}</label> <span id="quotas_config"><a href="quotas.php">{$i18n.label.configure}</a></span></td>
251           </tr>
252           <tr>
253             <td align="right" nowrap>{$forms.profileForm.week_view.control}</td>
254             <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>
255           </tr>
256 {/if}
257
258           <tr>
259             <td colspan="2">&nbsp;</td>
260           </tr>
261           <tr>
262             <td colspan="2" height="50" align="center">{$forms.profileForm.btn_save.control}</td>
263           </tr>
264         </table>
265       </td>
266     </tr>
267 </table>
268 {$forms.profileForm.close}