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";
87 {$forms.profileForm.open}
89 {if $user->canManageTeam()}
90 {include file="datetime_format_preview.tpl"}
93 <table cellspacing="4" cellpadding="7" border="0">
96 <table cellspacing="1" cellpadding="2" border="0">
98 <td align="right" nowrap>{$i18n.label.person_name} (*):</td>
99 <td>{$forms.profileForm.name.control}</td>
102 <td align="right" nowrap>{$i18n.label.login} (*):</td>
103 <td>{$forms.profileForm.login.control}</td>
107 <td align="right" nowrap>{$i18n.label.password} (*):</td>
108 <td>{$forms.profileForm.password1.control}</td>
111 <td align="right" nowrap>{$i18n.label.confirm_password} (*):</td>
112 <td>{$forms.profileForm.password2.control}</td>
116 <td align="right" nowrap>{$i18n.label.email}:</td>
117 <td>{$forms.profileForm.email.control}</td>
121 <td>{$i18n.label.required_fields}</td>
124 {if $user->canManageTeam()}
126 <td colspan="2"> </td>
129 <td align="right" nowrap>{$i18n.label.team_name}:</td>
130 <td>{$forms.profileForm.team_name.control}</td>
133 <td align="right">{$i18n.label.currency}:</td>
134 <td>{$forms.profileForm.currency.control}</td>
137 <td align="right" nowrap>{$i18n.label.language}:</td>
138 <td>{$forms.profileForm.lang.control}</td>
141 <td align="right">{$i18n.label.decimal_mark}:</td>
142 <td>{$forms.profileForm.decimal_mark.control} <font id="decimal_preview" color="#777777"> </font></td>
144 <td align="right" nowrap>{$i18n.label.date_format}:</td>
145 <td>{$forms.profileForm.format_date.control} <font id="date_format_preview" color="#777777"> </font></td>
148 <td align="right" nowrap>{$i18n.label.time_format}:</td>
149 <td>{$forms.profileForm.format_time.control} <font id="time_format_preview" color="#777777"> </font></td>
152 <td align="right" nowrap>{$i18n.label.week_start}:</td>
153 <td>{$forms.profileForm.start_week.control}</td>
156 <td align="right" nowrap>{$i18n.form.profile.tracking_mode}:</td>
157 <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></td>
160 <td align="right" nowrap>{$i18n.form.profile.record_type}:</td>
161 <td>{$forms.profileForm.record_type.control}</td>
164 <td align="right" nowrap>{$i18n.form.profile.uncompleted_indicators}:</td>
165 <td>{$forms.profileForm.uncompleted_indicators.control}</td>
167 {if $user->isManager()}
169 <td align="right" nowrap>{$i18n.label.bcc}:</td>
170 <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>
173 {* initialize preview text *}
175 MakeFormatPreview("date_format_preview", document.getElementById("format_date"));
176 MakeFormatPreview("time_format_preview", document.getElementById("format_time"));
178 function adjustDecimalPreview()
180 var mark = document.getElementById("decimal_mark").value;
181 var example = document.getElementById("decimal_preview");
182 example.innerHTML = "<i>3"+mark+"14</i>";
184 adjustDecimalPreview();
193 <td colspan="2" class="sectionHeader">{$i18n.form.profile.plugins}</td>
195 <tr><td> </td></tr>
197 <td align="right" nowrap>{$forms.profileForm.charts.control}</td>
198 <td><label for="charts">{$i18n.title.charts}</label></td>
201 <td align="right" nowrap>{$forms.profileForm.clients.control}</td>
202 <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>
205 <td align="right" nowrap>{$forms.profileForm.invoices.control}</td>
206 <td><label for="invoices">{$i18n.title.invoices}</label></td>
208 {if ($smarty.const.DEBUG_PAID_STATUS)}
210 <td align="right" nowrap>{$forms.profileForm.paid_status.control}</td>
211 <td><label for="paid_status">{$i18n.label.paid_status}</label></td>
215 <td align="right" nowrap>{$forms.profileForm.custom_fields.control}</td>
216 <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>
219 <td align="right" nowrap>{$forms.profileForm.expenses.control}</td>
220 <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>
223 <td align="right" nowrap>{$forms.profileForm.notifications.control}</td>
224 <td><label for="notifications">{$i18n.title.notifications}</label> <span id="notifications_config"><a href="notifications.php">{$i18n.label.configure}</a></span></td>
227 <td align="right" nowrap>{$forms.profileForm.locking.control}</td>
228 <td><label for="locking">{$i18n.title.locking}</label> <span id="locking_config"><a href="locking.php">{$i18n.label.configure}</a></span></td>
231 <td align="right" nowrap>{$forms.profileForm.quotas.control}</td>
232 <td><label for="quotas">{$i18n.label.monthly_quotas}</label> <span id="quotas_config"><a href="quotas.php">{$i18n.label.configure}</a></span></td>
237 <td colspan="2"> </td>
240 <td colspan="2" height="50" align="center">{$forms.profileForm.btn_save.control}</td>
246 {$forms.profileForm.close}