Some more refactoring in Form classes.
[timetracker.git] / WEB-INF / templates / profile_edit.tpl
index 5a90937..8c9cb8d 100644 (file)
@@ -28,9 +28,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 {
@@ -44,6 +50,22 @@ function handlePluginCheckboxes() {
   } else {
     configureLabel.style.visibility = "hidden";
   }
+
+  var lockingCheckbox = document.getElementById("locking");
+  configureLabel = document.getElementById("locking_config");
+  if (lockingCheckbox.checked) {
+    configureLabel.style.visibility = "visible";
+  } else {
+    configureLabel.style.visibility = "hidden";
+  }
+  
+  var quotasCheckbox = document.getElementById("quotas");
+  configureLabel = document.getElementById("quotas_config");
+  if (quotasCheckbox.checked){
+    configureLabel.style.visibility = "visible";
+  } else {
+    configureLabel.style.visibility = "hidden";
+  }
 }
 </script>
 
@@ -96,10 +118,6 @@ function handlePluginCheckboxes() {
             <td align="right">{$i18n.label.currency}:</td>
             <td>{$forms.profileForm.currency.control}</td>
           </tr>
-          <tr>
-            <td align="right" nowrap>{$i18n.label.lock_interval}:</td>
-            <td>{$forms.profileForm.lock_interval.control}</td>
-          </tr>
           <tr>
            <td align="right" nowrap>{$i18n.label.language}:</td>
            <td>{$forms.profileForm.lang.control}</td>
@@ -127,6 +145,10 @@ function handlePluginCheckboxes() {
             <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.uncompleted_indicators}:</td>
+            <td>{$forms.profileForm.uncompleted_indicators.control}</td>
+          </tr>
 
           {* initialize preview text *}
           <script>
@@ -169,12 +191,20 @@ function handlePluginCheckboxes() {
           </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>
             <td><label for="notifications">{$i18n.title.notifications}</label> <span id="notifications_config"><a href="notifications.php">{$i18n.label.configure}</a></span></td>
           </tr>
+          <tr>
+            <td align="right" nowrap>{$forms.profileForm.locking.control}</td>
+            <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.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>
 {/if}
 
           <tr>