From 6b8154bae3410bbce83f1d5cfe8362f8eb6fd4c1 Mon Sep 17 00:00:00 2001 From: liugang Date: Fri, 24 Nov 2023 13:49:57 +0800 Subject: [PATCH] * user: refactor hidden widgets and add a hidden widget of password strength. --- module/user/ui/create.html.php | 16 +++++----------- module/user/ui/edit.html.php | 13 +++---------- 2 files changed, 8 insertions(+), 21 deletions(-) diff --git a/module/user/ui/create.html.php b/module/user/ui/create.html.php index aa18791d40..f03dc6ca29 100644 --- a/module/user/ui/create.html.php +++ b/module/user/ui/create.html.php @@ -217,18 +217,12 @@ formPanel set::placeholder($lang->user->placeholder->verify) ) ), - input + formRow ( - set::className('hidden'), - set::name('verifyRand'), - set::value($rand) - ), - input - ( - set::className('hidden'), - set::id('passwordLength'), - set::name('passwordLength'), - set::value($rand) + setClass('hidden'), + input(set::name('verifyRand'), set::value($rand)), + input(set::name('passwordLength'), set::value(0)), + input(set::name('passwordStrength'), set::value(0)) ) ); diff --git a/module/user/ui/edit.html.php b/module/user/ui/edit.html.php index aaaee4edfd..37dac1498f 100644 --- a/module/user/ui/edit.html.php +++ b/module/user/ui/edit.html.php @@ -255,16 +255,9 @@ formPanel formRow ( setClass('hidden'), - formGroup - ( - set::name('passwordLength'), - set::value(0) - ), - formGroup - ( - set::name('verifyRand'), - set::value($rand) - ) + input(set::name('verifyRand'), set::value($rand)), + input(set::name('passwordLength'), set::value(0)), + input(set::name('passwordStrength'), set::value(0)) ) );