no message

main
이범준 8 months ago
parent 4b7fc7e405
commit 560af98fa7

@ -104,39 +104,45 @@ ${functions}
function login() { function login() {
if (!$("#formAuthentication input").validInputs()) return; if (!$("#formAuthentication input").validInputs()) return;
var params = { var params = {
account:$("#userId").val(), account:$("#userId").val(),
password:$("#password").val(), password:$("#password").val(),
institute:$("#institute").val() institute:$("#institute").val()
<%--, rememberCredentials:true--%> <%--, rememberCredentials:true--%>
}; };
json.post({ json.post({
url:wctx.url("/login.do"), url:wctx.url("/login.do"),
data:params, data:params,
success:function(resp) { success:function(resp) {
if (resp.authenticated) { if (!(resp.authenticated)) {
if (resp.message)
dialog.alert({ dialog.alert({
content : resp.message, content:resp.reason,
init : function() { init : function() {
setDialogZindex(); setDialogZindex();
focusClose(); focusClose();
}, },
onClose:() => $("#userId").focus()
}); });
return;
}
wctx.home(); if(resp.message){
} else {
dialog.alert({ dialog.alert({
content:resp.reason, content : resp.message,
init : function() { init : function() {
setDialogZindex(); setDialogZindex();
focusClose(); focusClose();
}, },
onClose:() => $("#userId").focus() onOK : function() {
wctx.home();
}
}); });
return;
} }
wctx.home();
} }
}); });
} }

Loading…
Cancel
Save