Refactored profile_edit.tpl a bit.
authorNik Okuntseff <support@anuko.com>
Fri, 22 Jul 2016 19:52:31 +0000 (19:52 +0000)
committerNik Okuntseff <support@anuko.com>
Fri, 22 Jul 2016 19:52:31 +0000 (19:52 +0000)
WEB-INF/templates/profile_edit.tpl
profile_edit.php

index 49b610e..e463ca6 100644 (file)
@@ -53,14 +53,13 @@ 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";
   }
-  
 }
 </script>
 
@@ -193,8 +192,8 @@ 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.label.monthly_quotas}</label> <span id="monthly_quota_config"><a href="quotas.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>
 {/if}
 
index d5c4967..06f1c56 100644 (file)
@@ -69,7 +69,7 @@ if ($request->isPost()) {
     $cl_tax_expenses = $request->getParameter('tax_expenses');
     $cl_notifications = $request->getParameter('notifications');
     $cl_locking = $request->getParameter('locking');
-    $cl_monthly_quota = $request->getParameter('monthly_quota');
+    $cl_monthly_quota = $request->getParameter('quotas');
   }
 } else {
   $cl_name = $user->name;
@@ -178,7 +178,7 @@ if ($user->canManageTeam()) {
   $form->addInput(array('type'=>'checkbox','name'=>'tax_expenses','data'=>1,'value'=>$cl_tax_expenses));
   $form->addInput(array('type'=>'checkbox','name'=>'notifications','data'=>1,'value'=>$cl_notifications,'onchange'=>'handlePluginCheckboxes()'));
   $form->addInput(array('type'=>'checkbox','name'=>'locking','data'=>1,'value'=>$cl_locking,'onchange'=>'handlePluginCheckboxes()'));
-  $form->addInput(array('type'=>'checkbox','name'=>'monthly_quota','data'=>1,'value'=>$cl_monthly_quota,'onchange'=>'handlePluginCheckboxes()'));
+  $form->addInput(array('type'=>'checkbox','name'=>'quotas','data'=>1,'value'=>$cl_monthly_quota,'onchange'=>'handlePluginCheckboxes()'));
 }
 $form->addInput(array('type'=>'submit','name'=>'btn_save','value'=>$i18n->getKey('button.save')));