Merge branch 'sprint/215_liumengyi_fixbug' into 'master'

* Finish task #60478, and fix bug #24991.

See merge request easycorp/zentaopms!4486
This commit is contained in:
王怡栋
2022-07-12 09:20:57 +00:00
4 changed files with 17 additions and 2 deletions
+2
View File
@@ -9,3 +9,5 @@ body {background: #1183fb linear-gradient(-90deg, #0a48d1 0%, #1183fb 100%); bac
#resetForm .form-control:focus {border-color: #2272eb; background: #fff;}
#resetForm .form-actions {padding-bottom: 20px;}
.required:after {top: 32px; right: -15px;}
#resetPanel .form-group .input-group {width: 100%}
#resetPanel .form-group .input-group.required:after {top: 6px;}
+8
View File
@@ -11,4 +11,12 @@ $(function()
}
$('#password1').attr('id', 'password');
$('#submit').click(function()
{
var password1 = $('#password').val();
var passwordStrength = computePasswordStrength(password1);
$("form input[id=passwordStrength]").val(passwordStrength);
})
})
+1 -1
View File
@@ -839,7 +839,7 @@ class userModel extends model
if($this->post->password1 != $this->post->password2) dao::$errors['password'][] = $this->lang->error->passwordsame;
if(!validater::checkReg($this->post->password1, '|(.){6,}|')) dao::$errors['password'][] = $this->lang->error->passwordrule;
if(isset($this->config->safe->mode) and ($this->post->passwordStrength < $this->config->safe->mode)) dao::$errors['password1'][] = $this->lang->user->weakPassword;
if(isset($this->config->safe->mode) and ($this->post->passwordStrength < $this->config->safe->mode)) dao::$errors['password'] = zget($this->lang->user->placeholder->passwordStrength, $this->config->safe->mode, $this->lang->user->weakPassword);
if(!empty($this->config->safe->changeWeak))
{
if(!isset($this->config->safe->weak)) $this->app->loadConfig('admin');
+6 -1
View File
@@ -27,7 +27,10 @@ include '../../common/view/header.lite.html.php';
<tbody>
<div class='form-group'>
<label for='password1'><?php echo $lang->user->password;?></label>
<?php echo html::password('password1', '', "class='form-control' required placeholder='{$lang->user->placeholder->loginPassword}'");?>
<span class='input-group'>
<?php echo html::password('password1', '', "class='form-control' required placeholder='{$lang->user->placeholder->loginPassword}' onmouseup='checkPassword(this.value)' onkeyup='checkPassword(this.value)'");?>
<span class='input-group-addon' id='passwordStrength'></span>
</span>
</div>
<div class='form-group'>
<label for='password2'><?php echo $lang->user->password2AB;?></label>
@@ -37,6 +40,7 @@ include '../../common/view/header.lite.html.php';
<td colspan='2' class="form-actions text-center">
<?php
echo html::hidden('account', $user->account);
echo html::hidden('passwordStrength', '');
echo html::submitButton($lang->user->submit);
echo html::a(inlink('login'), $lang->goback, '', 'class="btn btn-wide"');
?>
@@ -50,4 +54,5 @@ include '../../common/view/header.lite.html.php';
</div>
</div>
<?php endif;?>
<?php js::set('passwordStrengthList', $lang->user->passwordStrengthList)?>
<?php include '../../common/view/footer.lite.html.php';?>