Itroduced a temporary define MANAGER_ONLY_TEAM_SETTINGS for issue #53.
[timetracker.git] / WEB-INF / templates / profile_edit.tpl
index 2da8041..ce4a6bf 100644 (file)
@@ -1,10 +1,25 @@
 <script>
+// handleTaskRequiredCheckbox - controls visibility of the Task Required checkbox.
+function handleTaskRequiredCheckbox() {
+  var taskRequiredCheckbox = document.getElementById("task_required");
+  var taskRequiredLabel = document.getElementById("task_required_label");
+  var trackingModeDropdown = document.getElementById("tracking_mode");
+  if (trackingModeDropdown.value == 2) {
+    taskRequiredCheckbox.style.visibility = "visible";
+    taskRequiredLabel.style.visibility = "visible";
+  } else {
+    taskRequiredCheckbox.style.visibility = "hidden";
+    taskRequiredLabel.style.visibility = "hidden";
+  }
+}
+
+
 // handleControls - controls visibility of controls.
 function handlePluginCheckboxes() {
   var clientsCheckbox = document.getElementById("clients");
   var invoicesCheckbox = document.getElementById("invoices");
   var requiredCheckbox = document.getElementById("client_required");
-  var requiredLabel = document.getElementById("required_label");
+  var requiredLabel = document.getElementById("client_required_label");
   if (clientsCheckbox.checked) {
     requiredCheckbox.style.visibility = "visible";
     requiredLabel.style.visibility = "visible";
@@ -28,9 +43,15 @@ function handlePluginCheckboxes() {
     taxCheckbox.style.visibility = "hidden";
     taxLabel.style.visibility = "hidden";
   }
+  var configureLabel = document.getElementById("expenses_config");
+  if (expensesCheckbox.checked) {
+    configureLabel.style.visibility = "visible";
+  } else {
+    configureLabel.style.visibility = "hidden";
+  }
 
   var customFieldsCheckbox = document.getElementById("custom_fields");
-  var configureLabel = document.getElementById("cf_config");
+  configureLabel = document.getElementById("cf_config");
   if (customFieldsCheckbox.checked) {
     configureLabel.style.visibility = "visible";
   } else {
@@ -53,14 +74,21 @@ function handlePluginCheckboxes() {
     configureLabel.style.visibility = "hidden";
   }
   
-  var monthlyQuotaCheckBox = document.getElementById("monthly_quota");
-  configureLabel = document.getElementById("monthly_quota_config");
-  if (monthlyQuotaCheckBox.checked){
+  var quotasCheckbox = document.getElementById("quotas");
+  configureLabel = document.getElementById("quotas_config");
+  if (quotasCheckbox.checked){
     configureLabel.style.visibility = "visible";
   } else {
-  configureLabel.style.visibility = "hidden";
+    configureLabel.style.visibility = "hidden";
+  }
+
+  var weekViewCheckbox = document.getElementById("week_view");
+  configureLabel = document.getElementById("week_view_config");
+  if (weekViewCheckbox.checked){
+    configureLabel.style.visibility = "visible";
+  } else {
+    configureLabel.style.visibility = "hidden";
   }
-  
 }
 </script>
 
@@ -101,7 +129,7 @@ function handlePluginCheckboxes() {
             <td>{$i18n.label.required_fields}</td>
           </tr>
 
-{if $user->canManageTeam()}
+{if $user->isManager() || ($user->canManageTeam() && !defined(MANAGER_ONLY_TEAM_SETTINGS))}
           <tr>
             <td colspan="2">&nbsp;</td>
           </tr>
@@ -122,29 +150,54 @@ function handlePluginCheckboxes() {
             <td>{$forms.profileForm.decimal_mark.control} <font id="decimal_preview" color="#777777">&nbsp;</font></td>
           <tr>
             <td align="right" nowrap>{$i18n.label.date_format}:</td>
-            <td>{$forms.profileForm.format_date.control} <font id="date_format_preview" color="#777777">&nbsp;</font></td>
+            <td>{$forms.profileForm.date_format.control} <font id="date_format_preview" color="#777777">&nbsp;</font></td>
           </tr>
           <tr>
             <td align="right" nowrap>{$i18n.label.time_format}:</td>
-            <td>{$forms.profileForm.format_time.control} <font id="time_format_preview" color="#777777">&nbsp;</font></td>
+            <td>{$forms.profileForm.time_format.control} <font id="time_format_preview" color="#777777">&nbsp;</font></td>
           </tr>
           <tr>
             <td align="right" nowrap>{$i18n.label.week_start}:</td>
             <td>{$forms.profileForm.start_week.control}</td>
           </tr>
+          <tr>
+            <td align="right" nowrap>{$i18n.form.profile.show_holidays}:</td>
+            <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>
+          </tr>
           <tr>
             <td align="right" nowrap>{$i18n.form.profile.tracking_mode}:</td>
-            <td>{$forms.profileForm.tracking_mode.control}</td>
+            <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>
           </tr>
           <tr>
             <td align="right" nowrap>{$i18n.form.profile.record_type}:</td>
             <td>{$forms.profileForm.record_type.control}</td>
           </tr>
-
+          <tr>
+            <td align="right" nowrap>{$i18n.form.profile.punch_in_mode}:</td>
+            <td>{$forms.profileForm.punch_in_mode.control} <a href="https://www.anuko.com/lp/tt_18.htm" target="_blank">{$i18n.label.what_is_it}</a></td>
+          </tr>
+          <tr>
+            <td align="right" nowrap>{$i18n.form.profile.allow_overlap}:</td>
+            <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>
+          </tr>
+          <tr>
+            <td align="right" nowrap>{$i18n.form.profile.future_entries}:</td>
+            <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>
+          </tr>
+          <tr>
+            <td align="right" nowrap>{$i18n.form.profile.uncompleted_indicators}:</td>
+            <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>
+          </tr>
+{if $user->isManager()}
+          <tr>
+            <td align="right" nowrap>{$i18n.label.bcc}:</td>
+            <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>
+          </tr>
+{/if}
           {* initialize preview text *}
           <script>
-            MakeFormatPreview("date_format_preview", document.getElementById("format_date"));
-            MakeFormatPreview("time_format_preview", document.getElementById("format_time"));
+            MakeFormatPreview("date_format_preview", document.getElementById("date_format"));
+            MakeFormatPreview("time_format_preview", document.getElementById("time_format"));
 
             function adjustDecimalPreview()
             {
@@ -170,19 +223,23 @@ function handlePluginCheckboxes() {
           </tr>
           <tr>
             <td align="right" nowrap>{$forms.profileForm.clients.control}</td>
-            <td><label for="clients">{$i18n.title.clients}</label> {$forms.profileForm.client_required.control} <span id="required_label"><label for="client_required">{$i18n.label.required}</label></span></td>
+            <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>
           </tr>
           <tr>
             <td align="right" nowrap>{$forms.profileForm.invoices.control}</td>
             <td><label for="invoices">{$i18n.title.invoices}</label></td>
           </tr>
+          <tr>
+            <td align="right" nowrap>{$forms.profileForm.paid_status.control}</td>
+            <td><label for="paid_status">{$i18n.label.paid_status}</label></td>
+          </tr>
           <tr>
             <td align="right" nowrap>{$forms.profileForm.custom_fields.control}</td>
             <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>
           </tr>
           <tr>
             <td align="right" nowrap>{$forms.profileForm.expenses.control}</td>
-            <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></td>
+            <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>
           </tr>
           <tr>
             <td align="right" nowrap>{$forms.profileForm.notifications.control}</td>
@@ -193,8 +250,12 @@ function handlePluginCheckboxes() {
             <td><label for="locking">{$i18n.title.locking}</label> <span id="locking_config"><a href="locking.php">{$i18n.label.configure}</a></span></td>
           </tr>
           <tr>
-            <td align="right" nowrap>{$forms.profileForm.monthly_quota.control}</td>
-            <td><label for="monthly_quota">{$i18n.title.monthly_quota}</label> <span id="monthly_quota_config"><a href="cf_monthly_quota.php">{$i18n.label.configure}</a></span></td>
+            <td align="right" nowrap>{$forms.profileForm.quotas.control}</td>
+            <td><label for="quotas">{$i18n.label.monthly_quotas}</label> <span id="quotas_config"><a href="quotas.php">{$i18n.label.configure}</a></span></td>
+          </tr>
+          <tr>
+            <td align="right" nowrap>{$forms.profileForm.week_view.control}</td>
+            <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>
           </tr>
 {/if}