From 0282363535e651129be0f07ecd1a5390b01c8b85 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Fri, 6 Apr 2018 21:26:40 +0000 Subject: [PATCH] A bit more refactoring. --- WEB-INF/templates/footer.tpl | 2 +- WEB-INF/templates/group_edit.tpl | 2 +- group_edit.php | 10 +++++----- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 0487798e..8f7ae1b0 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
- - + diff --git a/group_edit.php b/group_edit.php index b5deee87..64a15309 100644 --- a/group_edit.php +++ b/group_edit.php @@ -42,7 +42,7 @@ $advanced_settings = $user->can('manage_advanced_settings'); if (!defined('CURRENCY_DEFAULT')) define('CURRENCY_DEFAULT', '$'); if ($request->isPost()) { - $cl_team = trim($request->getParameter('team_name')); + $cl_group = trim($request->getParameter('group_name')); $cl_currency = trim($request->getParameter('currency')); if (!$cl_currency) $cl_currency = CURRENCY_DEFAULT; $cl_lang = $request->getParameter('lang'); @@ -76,7 +76,7 @@ if ($request->isPost()) { $cl_quotas = $request->getParameter('quotas'); $cl_week_view = $request->getParameter('week_view'); } else { - $cl_team = $user->group; + $cl_group = $user->group; $cl_currency = ($user->currency == ''? CURRENCY_DEFAULT : $user->currency); $cl_lang = $user->lang; $cl_decimal_mark = $user->decimal_mark; @@ -112,7 +112,7 @@ if ($request->isPost()) { } $form = new Form('groupForm'); -$form->addInput(array('type'=>'text','maxlength'=>'200','name'=>'team_name','value'=>$cl_team,'enable'=>$advanced_settings)); +$form->addInput(array('type'=>'text','maxlength'=>'200','name'=>'group_name','value'=>$cl_group,'enable'=>$advanced_settings)); $form->addInput(array('type'=>'text','maxlength'=>'7','name'=>'currency','value'=>$cl_currency)); // Prepare an array of available languages. @@ -211,7 +211,7 @@ $form->addInput(array('type'=>'submit','name'=>'btn_save','value'=>$i18n->get('b if ($request->isPost()) { // Validate user input. - if (!ttValidString($cl_team, true)) $err->add($i18n->get('error.field'), $i18n->get('label.group_name')); + if (!ttValidString($cl_group, true)) $err->add($i18n->get('error.field'), $i18n->get('label.group_name')); if (!ttValidString($cl_currency, true)) $err->add($i18n->get('error.field'), $i18n->get('label.currency')); if ($advanced_settings) { if (!ttValidEmail($cl_bcc_email, true)) $err->add($i18n->get('error.field'), $i18n->get('label.bcc')); @@ -274,7 +274,7 @@ if ($request->isPost()) { $config = trim($config, ','); $update_result = ttTeamHelper::update($user->group_id, array( - 'name' => $cl_team, + 'name' => $cl_group, 'currency' => $cl_currency, 'lang' => $cl_lang, 'decimal_mark' => $cl_decimal_mark, -- 2.20.1
 Anuko Time Tracker 1.17.87.4237 | Copyright © Anuko | +  Anuko Time Tracker 1.17.87.4238 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/WEB-INF/templates/group_edit.tpl b/WEB-INF/templates/group_edit.tpl index 0aff3853..35e76046 100644 --- a/WEB-INF/templates/group_edit.tpl +++ b/WEB-INF/templates/group_edit.tpl @@ -105,7 +105,7 @@ function handlePluginCheckboxes() { {if $user->can('manage_basic_settings')}
{$i18n.label.group_name}:{$forms.groupForm.team_name.control}{$forms.groupForm.group_name.control}
{$i18n.label.currency}: