Skip to content
Snippets Groups Projects
Commit b1f96f9b authored by Piotr Gawron's avatar Piotr Gawron
Browse files

when clicking on login there is processing dialog visible (to prevent double click)

parent d7eae74c
No related branches found
No related tags found
2 merge requests!450fix on export to cell designer + ldap connector patches,!445Resolve "double login using ldap"
Pipeline #6710 passed
......@@ -498,18 +498,18 @@ function createFooter() {
type: "div",
className: "minerva-footer-table",
content: '<table width="100%" border="0" cellspacing="0" cellpadding="0">' +
'<tr>' +
'<td align="left"><a href="' + logoLink + '" title="' + logoText + '" target="_blank">' +
'<img src="' + GuiConnector.getImgPrefix() + logoImg + '" width="80" height="80" border="0" alt="' + logoText + '"/>' +
'</a></td>' +
'<td align="center" class="minerva-footer-text">MiNERVA version ' + configuration.getVersion() + ';<br/>' +
'build ' + configuration.getBuildDate() + ';<br/>' +
'git: ' + configuration.getGitHash() + '</td>' +
'<td align="right"><a href="http://wwwen.uni.lu/lcsb/" title="LCSB - Luxembourg Centre for Systems Biomedicine" target="_blank">' +
'<img src="' + GuiConnector.getImgPrefix() + 'lcsb.png" width="80" height="80" border="0" alt="LCSB - Luxembourg Centre for Systems Biomedicine"/>' +
'</a></td>' +
'</tr>\n' +
'</table>', xss: false
'<tr>' +
'<td align="left"><a href="' + logoLink + '" title="' + logoText + '" target="_blank">' +
'<img src="' + GuiConnector.getImgPrefix() + logoImg + '" width="80" height="80" border="0" alt="' + logoText + '"/>' +
'</a></td>' +
'<td align="center" class="minerva-footer-text">MiNERVA version ' + configuration.getVersion() + ';<br/>' +
'build ' + configuration.getBuildDate() + ';<br/>' +
'git: ' + configuration.getGitHash() + '</td>' +
'<td align="right"><a href="http://wwwen.uni.lu/lcsb/" title="LCSB - Luxembourg Centre for Systems Biomedicine" target="_blank">' +
'<img src="' + GuiConnector.getImgPrefix() + 'lcsb.png" width="80" height="80" border="0" alt="LCSB - Luxembourg Centre for Systems Biomedicine"/>' +
'</a></td>' +
'</tr>\n' +
'</table>', xss: false
});
})
}
......@@ -578,6 +578,7 @@ function createLoginDiv() {
var fromPage = GuiConnector.getParams["from"];
$("#login", result).on("click", function login() {
GuiConnector.showProcessing();
var loginString = document.getElementById('username').value;
var passwordString = document.getElementById('password').value;
return ServerConnector.login(loginString, passwordString).then(function () {
......@@ -587,12 +588,14 @@ function createLoginDiv() {
} else {
window.location.href = ServerConnector.getServerBaseUrl();
}
}, function (error) {
}).catch(function (error) {
if (error.constructor.name === "InvalidCredentialsError") {
GuiConnector.alert("invalid credentials");
} else {
GuiConnector.alert(error);
}
}).finally(function () {
GuiConnector.hideProcessing();
});
});
$('#go_to_map_button', result).click(function () {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment