Implemented week view as a configurable plugin.
[timetracker.git] / WEB-INF / templates / profile_edit.tpl
index 6e3b81e..4967259 100644 (file)
@@ -81,6 +81,14 @@ function handlePluginCheckboxes() {
   } else {
     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>
 
@@ -229,12 +237,10 @@ function handlePluginCheckboxes() {
             <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 $smarty.const.WEEK_VIEW_DEBUG == 1}
           <tr>
             <td align="right" nowrap>{$forms.profileForm.week_view.control}</td>
-            <td><label for="quotas">{$i18n.label.week_view}</label> <span id="week_view_config"><a href="week_view.php">{$i18n.label.configure}</a></span></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}
 {/if}
 
           <tr>