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";
11 taskRequiredCheckbox.style.visibility = "hidden";
12 taskRequiredLabel.style.visibility = "hidden";
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;
28 requiredCheckbox.checked = false;
29 requiredCheckbox.style.visibility = "hidden";
30 requiredLabel.style.visibility = "hidden";
31 invoicesCheckbox.checked = false;
32 invoicesCheckbox.disabled = true;
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";
42 taxCheckbox.checked = false;
43 taxCheckbox.style.visibility = "hidden";
44 taxLabel.style.visibility = "hidden";
46 var configureLabel = document.getElementById("expenses_config");
47 if (expensesCheckbox.checked) {
48 configureLabel.style.visibility = "visible";
50 configureLabel.style.visibility = "hidden";
53 var customFieldsCheckbox = document.getElementById("custom_fields");
54 configureLabel = document.getElementById("cf_config");
55 if (customFieldsCheckbox.checked) {
56 configureLabel.style.visibility = "visible";
58 configureLabel.style.visibility = "hidden";
61 var notificationsCheckbox = document.getElementById("notifications");
62 configureLabel = document.getElementById("notifications_config");
63 if (notificationsCheckbox.checked) {
64 configureLabel.style.visibility = "visible";
66 configureLabel.style.visibility = "hidden";
69 var lockingCheckbox = document.getElementById("locking");
70 configureLabel = document.getElementById("locking_config");
71 if (lockingCheckbox.checked) {
72 configureLabel.style.visibility = "visible";
74 configureLabel.style.visibility = "hidden";
77 var quotasCheckbox = document.getElementById("quotas");
78 configureLabel = document.getElementById("quotas_config");
79 if (quotasCheckbox.checked){
80 configureLabel.style.visibility = "visible";
82 configureLabel.style.visibility = "hidden";
85 var weekViewCheckbox = document.getElementById("week_view");
86 configureLabel = document.getElementById("week_view_config");
87 if (weekViewCheckbox.checked){
88 configureLabel.style.visibility = "visible";
90 configureLabel.style.visibility = "hidden";
95 {$forms.profileForm.open}
97 {if $user->canManageTeam()}
98 {include file="datetime_format_preview.tpl"}
101 <table cellspacing="4" cellpadding="7" border="0">
104 <table cellspacing="1" cellpadding="2" border="0">
106 <td align="right" nowrap>{$i18n.label.person_name} (*):</td>
107 <td>{$forms.profileForm.name.control}</td>
110 <td align="right" nowrap>{$i18n.label.login} (*):</td>
111 <td>{$forms.profileForm.login.control}</td>
115 <td align="right" nowrap>{$i18n.label.password} (*):</td>
116 <td>{$forms.profileForm.password1.control}</td>
119 <td align="right" nowrap>{$i18n.label.confirm_password} (*):</td>
120 <td>{$forms.profileForm.password2.control}</td>
124 <td align="right" nowrap>{$i18n.label.email}:</td>
125 <td>{$forms.profileForm.email.control}</td>
129 <td>{$i18n.label.required_fields}</td>
132 {if $user->isManager() || ($user->canManageTeam() && !defined(MANAGER_ONLY_TEAM_SETTINGS))}
134 <td colspan="2"> </td>
137 <td align="right" nowrap>{$i18n.label.team_name}:</td>
138 <td>{$forms.profileForm.team_name.control}</td>
141 <td align="right">{$i18n.label.currency}:</td>
142 <td>{$forms.profileForm.currency.control}</td>
144 {if defined(DEBUG_ROLES)}
146 <td align="right" nowrap>{$i18n.label.roles}:</td>
147 <td>{$forms.profileForm.roles.control} <a href="https://www.anuko.com/lp/tt_19.htm" target="_blank">{$i18n.label.what_is_it}</a></td>
151 <td align="right" nowrap>{$i18n.label.language}:</td>
152 <td>{$forms.profileForm.lang.control}</td>
155 <td align="right">{$i18n.label.decimal_mark}:</td>
156 <td>{$forms.profileForm.decimal_mark.control} <font id="decimal_preview" color="#777777"> </font></td>
158 <td align="right" nowrap>{$i18n.label.date_format}:</td>
159 <td>{$forms.profileForm.date_format.control} <font id="date_format_preview" color="#777777"> </font></td>
162 <td align="right" nowrap>{$i18n.label.time_format}:</td>
163 <td>{$forms.profileForm.time_format.control} <font id="time_format_preview" color="#777777"> </font></td>
166 <td align="right" nowrap>{$i18n.label.week_start}:</td>
167 <td>{$forms.profileForm.start_week.control}</td>
170 <td align="right" nowrap>{$i18n.form.profile.show_holidays}:</td>
171 <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>
174 <td align="right" nowrap>{$i18n.form.profile.tracking_mode}:</td>
175 <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>
178 <td align="right" nowrap>{$i18n.form.profile.record_type}:</td>
179 <td>{$forms.profileForm.record_type.control}</td>
182 <td align="right" nowrap>{$i18n.form.profile.punch_mode}:</td>
183 <td>{$forms.profileForm.punch_mode.control} <a href="https://www.anuko.com/lp/tt_18.htm" target="_blank">{$i18n.label.what_is_it}</a></td>
186 <td align="right" nowrap>{$i18n.form.profile.allow_overlap}:</td>
187 <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>
190 <td align="right" nowrap>{$i18n.form.profile.future_entries}:</td>
191 <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>
194 <td align="right" nowrap>{$i18n.form.profile.uncompleted_indicators}:</td>
195 <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>
197 {if $user->isManager()}
199 <td align="right" nowrap>{$i18n.label.bcc}:</td>
200 <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>
203 {* initialize preview text *}
205 MakeFormatPreview("date_format_preview", document.getElementById("date_format"));
206 MakeFormatPreview("time_format_preview", document.getElementById("time_format"));
208 function adjustDecimalPreview()
210 var mark = document.getElementById("decimal_mark").value;
211 var example = document.getElementById("decimal_preview");
212 example.innerHTML = "<i>3"+mark+"14</i>";
214 adjustDecimalPreview();
223 <td colspan="2" class="sectionHeader">{$i18n.form.profile.plugins}</td>
225 <tr><td> </td></tr>
227 <td align="right" nowrap>{$forms.profileForm.charts.control}</td>
228 <td><label for="charts">{$i18n.title.charts}</label></td>
231 <td align="right" nowrap>{$forms.profileForm.clients.control}</td>
232 <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>
235 <td align="right" nowrap>{$forms.profileForm.invoices.control}</td>
236 <td><label for="invoices">{$i18n.title.invoices}</label></td>
239 <td align="right" nowrap>{$forms.profileForm.paid_status.control}</td>
240 <td><label for="paid_status">{$i18n.label.paid_status}</label></td>
243 <td align="right" nowrap>{$forms.profileForm.custom_fields.control}</td>
244 <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>
247 <td align="right" nowrap>{$forms.profileForm.expenses.control}</td>
248 <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>
251 <td align="right" nowrap>{$forms.profileForm.notifications.control}</td>
252 <td><label for="notifications">{$i18n.title.notifications}</label> <span id="notifications_config"><a href="notifications.php">{$i18n.label.configure}</a></span></td>
255 <td align="right" nowrap>{$forms.profileForm.locking.control}</td>
256 <td><label for="locking">{$i18n.title.locking}</label> <span id="locking_config"><a href="locking.php">{$i18n.label.configure}</a></span></td>
259 <td align="right" nowrap>{$forms.profileForm.quotas.control}</td>
260 <td><label for="quotas">{$i18n.label.monthly_quotas}</label> <span id="quotas_config"><a href="quotas.php">{$i18n.label.configure}</a></span></td>
263 <td align="right" nowrap>{$forms.profileForm.week_view.control}</td>
264 <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>
269 <td colspan="2"> </td>
272 <td colspan="2" height="50" align="center">{$forms.profileForm.btn_save.control}</td>
278 {$forms.profileForm.close}