From 2aba82e6357fb539c1b21c752d8a7757b7b2d7fd Mon Sep 17 00:00:00 2001 From: liumengyi Date: Wed, 19 Jun 2024 10:11:59 +0800 Subject: [PATCH] * [bug#51371,done,0.2h] set key of dao::error. --- module/user/model.php | 2 +- module/user/ui/reset.html.php | 16 ++++++++++------ 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/module/user/model.php b/module/user/model.php index d4d5d66167..1bef93d05f 100644 --- a/module/user/model.php +++ b/module/user/model.php @@ -849,7 +849,7 @@ class userModel extends model $oldUser = $this->getById($user->account); if(!$oldUser) { - dao::$errors[] = $this->lang->user->error->noUser; + dao::$errors['account'] = $this->lang->user->error->noUser; return false; } diff --git a/module/user/ui/reset.html.php b/module/user/ui/reset.html.php index ef1fb61050..ba78f535f6 100644 --- a/module/user/ui/reset.html.php +++ b/module/user/ui/reset.html.php @@ -56,12 +56,7 @@ $content = $needCreateFile ? div ( setClass('reset-form w-full'), set::title($lang->user->resetPwdByAdmin), - set::actions( - array( - btn(set(array('text' => $lang->user->submit, 'btnType' => 'submit', 'type' => 'primary', 'class' => 'px-8 mx-4'))), - btn(set(array('text' => $lang->goback, 'url' => inlink('login'), 'class' => 'px-8 mx-4 not-open-url'))) - ) - ), + set::actions(array()), on::change('#password1,#password2', 'changePassword'), on::click('button[type=submit]', 'encryptPassword'), !empty($config->resetPWDByMail) ? to::headingActions @@ -105,6 +100,15 @@ $content = $needCreateFile ? div setClass('hidden'), input(set::name('passwordLength'), set::value(0)), input(set::name('passwordStrength'), set::value(0)) + ), + formRow + ( + setClass('justify-center'), + array + ( + btn(set(array('text' => $lang->user->submit, 'btnType' => 'submit', 'type' => 'primary', 'class' => 'px-8 mx-4'))), + btn(set(array('text' => $lang->goback, 'url' => inlink('login'), 'class' => 'px-8 mx-4 not-open-url'))) + ) ) ), formHidden('verifyRand', $rand)