Added Bcc option for team managers.
[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 </script>
86
87 {$forms.profileForm.open}
88
89 {if $user->canManageTeam()}
90 {include file="datetime_format_preview.tpl"}
91 {/if}
92
93 <table cellspacing="4" cellpadding="7" border="0">
94     <tr>
95       <td>
96         <table cellspacing="1" cellpadding="2" border="0">
97           <tr>
98             <td align="right" nowrap>{$i18n.label.person_name} (*):</td>
99             <td>{$forms.profileForm.name.control}</td>
100           </tr>
101           <tr>
102             <td align="right" nowrap>{$i18n.label.login} (*):</td>
103             <td>{$forms.profileForm.login.control}</td>
104           </tr>
105 {if !$auth_external}
106           <tr>
107             <td align="right" nowrap>{$i18n.label.password} (*):</td>
108             <td>{$forms.profileForm.password1.control}</td>
109           </tr>
110           <tr>
111             <td align="right" nowrap>{$i18n.label.confirm_password} (*):</td>
112             <td>{$forms.profileForm.password2.control}</td>
113           </tr>
114 {/if}
115           <tr>
116             <td align="right" nowrap>{$i18n.label.email}:</td>
117             <td>{$forms.profileForm.email.control}</td>
118           </tr>
119           <tr>
120             <td></td>
121             <td>{$i18n.label.required_fields}</td>
122           </tr>
123
124 {if $user->canManageTeam()}
125           <tr>
126             <td colspan="2">&nbsp;</td>
127           </tr>
128           <tr>
129             <td align="right" nowrap>{$i18n.label.team_name}:</td>
130             <td>{$forms.profileForm.team_name.control}</td>
131           </tr>
132           <tr>
133             <td align="right">{$i18n.label.currency}:</td>
134             <td>{$forms.profileForm.currency.control}</td>
135           </tr>
136           <tr>
137            <td align="right" nowrap>{$i18n.label.language}:</td>
138            <td>{$forms.profileForm.lang.control}</td>
139           </tr>
140           <tr>
141             <td align="right">{$i18n.label.decimal_mark}:</td>
142             <td>{$forms.profileForm.decimal_mark.control} <font id="decimal_preview" color="#777777">&nbsp;</font></td>
143           <tr>
144             <td align="right" nowrap>{$i18n.label.date_format}:</td>
145             <td>{$forms.profileForm.format_date.control} <font id="date_format_preview" color="#777777">&nbsp;</font></td>
146           </tr>
147           <tr>
148             <td align="right" nowrap>{$i18n.label.time_format}:</td>
149             <td>{$forms.profileForm.format_time.control} <font id="time_format_preview" color="#777777">&nbsp;</font></td>
150           </tr>
151           <tr>
152             <td align="right" nowrap>{$i18n.label.week_start}:</td>
153             <td>{$forms.profileForm.start_week.control}</td>
154           </tr>
155           <tr>
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>
158           </tr>
159           <tr>
160             <td align="right" nowrap>{$i18n.form.profile.record_type}:</td>
161             <td>{$forms.profileForm.record_type.control}</td>
162           </tr>
163           <tr>
164             <td align="right" nowrap>{$i18n.form.profile.uncompleted_indicators}:</td>
165             <td>{$forms.profileForm.uncompleted_indicators.control}</td>
166           </tr>
167 {if $user->isManager()}
168           <tr>
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>
171           </tr>
172 {/if}
173           {* initialize preview text *}
174           <script>
175             MakeFormatPreview("date_format_preview", document.getElementById("format_date"));
176             MakeFormatPreview("time_format_preview", document.getElementById("format_time"));
177
178             function adjustDecimalPreview()
179             {
180               var mark = document.getElementById("decimal_mark").value;
181               var example = document.getElementById("decimal_preview");
182               example.innerHTML = "<i>3"+mark+"14</i>";
183             }
184             adjustDecimalPreview();
185           </script>
186
187           <tr>
188             <td>&nbsp;</td>
189             <td>&nbsp;</td>
190           </tr>
191
192           <tr>
193              <td colspan="2" class="sectionHeader">{$i18n.form.profile.plugins}</td>
194           </tr>
195           <tr><td>&nbsp;</td></tr>
196           <tr>
197             <td align="right" nowrap>{$forms.profileForm.charts.control}</td>
198             <td><label for="charts">{$i18n.title.charts}</label></td>
199           </tr>
200           <tr>
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>
203           </tr>
204           <tr>
205             <td align="right" nowrap>{$forms.profileForm.invoices.control}</td>
206             <td><label for="invoices">{$i18n.title.invoices}</label></td>
207           </tr>
208           <tr>
209             <td align="right" nowrap>{$forms.profileForm.custom_fields.control}</td>
210             <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>
211           </tr>
212           <tr>
213             <td align="right" nowrap>{$forms.profileForm.expenses.control}</td>
214             <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>
215           </tr>
216           <tr>
217             <td align="right" nowrap>{$forms.profileForm.notifications.control}</td>
218             <td><label for="notifications">{$i18n.title.notifications}</label> <span id="notifications_config"><a href="notifications.php">{$i18n.label.configure}</a></span></td>
219           </tr>
220           <tr>
221             <td align="right" nowrap>{$forms.profileForm.locking.control}</td>
222             <td><label for="locking">{$i18n.title.locking}</label> <span id="locking_config"><a href="locking.php">{$i18n.label.configure}</a></span></td>
223           </tr>
224           <tr>
225             <td align="right" nowrap>{$forms.profileForm.quotas.control}</td>
226             <td><label for="quotas">{$i18n.label.monthly_quotas}</label> <span id="quotas_config"><a href="quotas.php">{$i18n.label.configure}</a></span></td>
227           </tr>
228 {/if}
229
230           <tr>
231             <td colspan="2">&nbsp;</td>
232           </tr>
233           <tr>
234             <td colspan="2" height="50" align="center">{$forms.profileForm.btn_save.control}</td>
235           </tr>
236         </table>
237       </td>
238     </tr>
239 </table>
240 {$forms.profileForm.close}