From: Nik Okuntseff Date: Fri, 22 Jul 2016 19:52:31 +0000 (+0000) Subject: Refactored profile_edit.tpl a bit. X-Git-Tag: timetracker_1.19-1~1671 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=e7249e8d4876102bcf5a29e3ea5712a671fd6553;p=timetracker.git Refactored profile_edit.tpl a bit. --- diff --git a/WEB-INF/templates/profile_edit.tpl b/WEB-INF/templates/profile_edit.tpl index 49b610eb..e463ca68 100644 --- a/WEB-INF/templates/profile_edit.tpl +++ b/WEB-INF/templates/profile_edit.tpl @@ -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"; } - } @@ -193,8 +192,8 @@ function handlePluginCheckboxes() { {$i18n.label.configure} - {$forms.profileForm.monthly_quota.control} - {$i18n.label.configure} + {$forms.profileForm.quotas.control} + {$i18n.label.configure} {/if} diff --git a/profile_edit.php b/profile_edit.php index d5c49678..06f1c566 100644 --- a/profile_edit.php +++ b/profile_edit.php @@ -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')));