|
|
@ -41,6 +41,7 @@ $(document).ready(function () {
|
|
|
|
// 密码强度校验
|
|
|
|
// 密码强度校验
|
|
|
|
var el = $('#id_password_rules'),
|
|
|
|
var el = $('#id_password_rules'),
|
|
|
|
idPassword = $('#id_new_password'),
|
|
|
|
idPassword = $('#id_new_password'),
|
|
|
|
|
|
|
|
idConfirmPassword = $('#id_confirm_password'),
|
|
|
|
idPopover = $('#popover777'),
|
|
|
|
idPopover = $('#popover777'),
|
|
|
|
container = $('#container'),
|
|
|
|
container = $('#container'),
|
|
|
|
progress = $('#id_progress'),
|
|
|
|
progress = $('#id_progress'),
|
|
|
@ -82,15 +83,21 @@ $(document).ready(function () {
|
|
|
|
$("form").submit(function(event){
|
|
|
|
$("form").submit(function(event){
|
|
|
|
event.preventDefault()
|
|
|
|
event.preventDefault()
|
|
|
|
// Let's find the input to check
|
|
|
|
// Let's find the input to check
|
|
|
|
var ids = ['id_new_password', 'id_confirm_password']
|
|
|
|
var encryptedPassword = encryptPassword(idPassword.val());
|
|
|
|
for (id of ids) {
|
|
|
|
var encryptedConfirmPassword = encryptPassword(idConfirmPassword.val());
|
|
|
|
var passwordRef = $('#' + id)
|
|
|
|
|
|
|
|
var value = passwordRef.val()
|
|
|
|
var hiddenPasswordField = $('<input>', {
|
|
|
|
if (value) {
|
|
|
|
type: 'hidden',
|
|
|
|
value = encryptPassword(value)
|
|
|
|
name: 'new_password',
|
|
|
|
passwordRef.val(value)
|
|
|
|
value: encryptedPassword
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
|
|
var hiddenConfirmPasswordField = $('<input>', {
|
|
|
|
|
|
|
|
type: 'hidden',
|
|
|
|
|
|
|
|
name: 'confirm_password',
|
|
|
|
|
|
|
|
value: encryptedConfirmPassword
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$(this).append(hiddenPasswordField, hiddenConfirmPasswordField);
|
|
|
|
this.submit();
|
|
|
|
this.submit();
|
|
|
|
});
|
|
|
|
});
|
|
|
|
})
|
|
|
|
})
|
|
|
|