Commit d53a1c63 by Kim Eunchul

#29682 【Biz Web 1.9.0】パスワード変更時のエラーメッセージ表現が適切でない

parent 0d8b66ff
......@@ -119,7 +119,11 @@ LOGIN.checkDialogValidation = function() {
var confirmPass = $('#txtConfirmNew').val();
var msgError = $('#dialog-error-message');
if (!ValidationUtil.CheckRequiredForText(currentPass)) {
if (!newPass.match("^(?=.*[a-zA-Z])(?=.*[0-9])")) {
isOK = false;
msgError.html(I18N.i18nText('msgPwdChangeNG'));
msgError.show();
}else if (!ValidationUtil.CheckRequiredForText(currentPass)) {
LOGIN.login_errorMessage = "";
msgError.html(I18N.i18nText('msgPwdEmpty'));
msgError.attr('lang', 'msgPwdEmpty');
......@@ -367,8 +371,10 @@ LOGIN.changePasswordProcess = function() {
}
}, function(xhr, b, c) {
if (xhr.responseText && xhr.status != 0) {
//$('#dialog-error-message').html(JSON.parse(xhr.responseText).errorMessage);
$('#dialog-error-message').html(JSON.parse(xhr.responseText).errorMessage);
if(JSON.parse(xhr.responseText).errorMessage == "SC_FORBIDDEN"){
$('#dialog-error-message').html(I18N.i18nText('msgPwdOldWrong'));
}
$('#dialog-error-message').show();
} else {
// Show systemerror
......
......@@ -740,6 +740,11 @@ SETTINGS.dspPwdUpd1_Click = function(e) {
var isOK = true;
var msgError = $('#dialog-error-message');
// Check validation
if (!SETTINGS.getNewPassword().match("^(?=.*[a-zA-Z])(?=.*[0-9])")) {
isOK = false;
msgError.html(I18N.i18nText('msgPwdChangeNG'));
msgError.show();
}
if (!ValidationUtil.CheckRequiredForText(SETTINGS.getCurrentPassword())) {
isOK = false;
msgError.html(I18N.i18nText('msgPwdEmpty'));
......@@ -834,13 +839,13 @@ SETTINGS.avwCmsApi_passwordChange_success = function(data) {
SETTINGS.avwCmsApi_passwordChange_fail = function(xhr, b, c) {
if (xhr.responseText && xhr.status != 0) {
/* show error messages */
//var msgError = $('#dialog-error-message');
var msgError = $('#dialog-error-message');
//msgError.html(I18N.i18nText('msgPwdChangeNG'));
//msgError.html(JSON.parse(xhr.responseText).errorMessage);
//msgError.show();
$('#dialog-error-message').html(I18N.i18nText('msgPwdOldWrong'));
$('#dialog-error-message').show();
msgError.html(JSON.parse(xhr.responseText).errorMessage);
if(JSON.parse(xhr.responseText).errorMessage == "SC_FORBIDDEN"){
msgError.html(I18N.i18nText('msgPwdOldWrong'));
}
msgError.show();
}
else {
AVWEB.showSystemError();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment