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