From e457063f931911a1e9fc0917767dc07f92d24f02 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Mon, 14 Mar 2016 02:51:14 +0000 Subject: [PATCH] Cosmetic - formatting --- WEB-INF/templates/footer.tpl | 2 +- admin_options.php | 6 +++--- admin_team_add.php | 4 ++-- admin_team_edit.php | 4 ++-- cf_custom_field_delete.php | 15 +++++++-------- cf_custom_field_edit.php | 3 +-- 6 files changed, 16 insertions(+), 18 deletions(-) diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 05ec3607..4bb4447a 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.9.15.3413 | Copyright © Anuko | +  Anuko Time Tracker 1.9.15.3414 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/admin_options.php b/admin_options.php index 435449de..42c10bbe 100644 --- a/admin_options.php +++ b/admin_options.php @@ -48,9 +48,9 @@ $form->addInput(array('type'=>'submit','name'=>'btn_submit','value'=>$i18n->getK if ($request->getMethod() == 'POST') { if ($cl_password1 || $cl_password2) { - // Validate user input. - if (!ttValidString($cl_password1)) $errors->add($i18n->getKey('error.field'), $i18n->getKey('label.password')); - if (!ttValidString($cl_password2)) $errors->add($i18n->getKey('error.field'), $i18n->getKey('label.confirm_password')); + // Validate user input. + if (!ttValidString($cl_password1)) $errors->add($i18n->getKey('error.field'), $i18n->getKey('label.password')); + if (!ttValidString($cl_password2)) $errors->add($i18n->getKey('error.field'), $i18n->getKey('label.confirm_password')); if ($cl_password1 !== $cl_password2) $errors->add($i18n->getKey('error.not_equal'), $i18n->getKey('label.password'), $i18n->getKey('label.confirm_password')); } diff --git a/admin_team_add.php b/admin_team_add.php index 22176d13..15d7a325 100644 --- a/admin_team_add.php +++ b/admin_team_add.php @@ -64,8 +64,8 @@ if ($request->getMethod() == 'POST') { if (!ttValidString($cl_manager_name)) $errors->add($i18n->getKey('error.field'), $i18n->getKey('label.manager_name')); if (!ttValidString($cl_manager_login)) $errors->add($i18n->getKey('error.field'), $i18n->getKey('label.manager_login')); if (!$auth->isPasswordExternal()) { - if (!ttValidString($cl_password1)) $errors->add($i18n->getKey('error.field'), $i18n->getKey('label.password')); - if (!ttValidString($cl_password2)) $errors->add($i18n->getKey('error.field'), $i18n->getKey('label.confirm_password')); + if (!ttValidString($cl_password1)) $errors->add($i18n->getKey('error.field'), $i18n->getKey('label.password')); + if (!ttValidString($cl_password2)) $errors->add($i18n->getKey('error.field'), $i18n->getKey('label.confirm_password')); if ($cl_password1 !== $cl_password2) $errors->add($i18n->getKey('error.not_equal'), $i18n->getKey('label.password'), $i18n->getKey('label.confirm_password')); } diff --git a/admin_team_edit.php b/admin_team_edit.php index 807810da..7f2f5363 100644 --- a/admin_team_edit.php +++ b/admin_team_edit.php @@ -74,11 +74,11 @@ $form->addInput(array('type'=>'submit','name'=>'btn_cancel','value'=>$i18n->getK if ($request->getMethod() == 'POST') { if ($request->getParameter('btn_save')) { - // Validate user input. + // Validate user input. if (!ttValidString($cl_team_name, true)) $errors->add($i18n->getKey('error.field'), $i18n->getKey('label.team_name')); if (!ttValidString($cl_manager_name)) $errors->add($i18n->getKey('error.field'), $i18n->getKey('label.manager_name')); if (!ttValidString($cl_manager_login)) $errors->add($i18n->getKey('error.field'), $i18n->getKey('label.manager_login')); - if (!$auth->isPasswordExternal() && ($cl_password1 || $cl_password2)) { + if (!$auth->isPasswordExternal() && ($cl_password1 || $cl_password2)) { if (!ttValidString($cl_password1)) $errors->add($i18n->getKey('error.field'), $i18n->getKey('label.password')); if (!ttValidString($cl_password2)) $errors->add($i18n->getKey('error.field'), $i18n->getKey('label.confirm_password')); if ($cl_password1 !== $cl_password2) diff --git a/cf_custom_field_delete.php b/cf_custom_field_delete.php index 7ae62ac4..4e17cd03 100644 --- a/cf_custom_field_delete.php +++ b/cf_custom_field_delete.php @@ -41,20 +41,19 @@ $id = $request->getParameter('id'); $form = new Form('fieldDeleteForm'); if ($request->getMethod() == 'POST') { - if ($request->getParameter('btn_delete')) { - // Delete button pressed. - $res = CustomFields::deleteField($id); + if ($request->getParameter('btn_delete')) { + // Delete button pressed. + $res = CustomFields::deleteField($id); if ($res) { header('Location: cf_custom_fields.php'); exit(); - } else { + } else $errors->add($i18n->getKey('error.db')); - } } if ($request->getParameter('btn_cancel')) { - // Cancel button pressed. - header('Location: cf_custom_fields.php'); - exit(); + // Cancel button pressed. + header('Location: cf_custom_fields.php'); + exit(); } } else { $field = CustomFields::getField($id); diff --git a/cf_custom_field_edit.php b/cf_custom_field_edit.php index 71ffd39c..1f846590 100644 --- a/cf_custom_field_edit.php +++ b/cf_custom_field_edit.php @@ -68,9 +68,8 @@ if ($request->getMethod() == 'POST') { if ($res) { header('Location: cf_custom_fields.php'); exit(); - } else { + } else $errors->add($i18n->getKey('error.db')); - } } } -- 2.20.1