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)