Respect languages preferences on login page

Fixes #4169
This commit is contained in:
Francis Lachapelle
2017-05-31 10:48:35 -04:00
parent 678cf66a57
commit e73a3495bb
7 changed files with 45 additions and 10 deletions

View File

@@ -24,6 +24,15 @@ function initLogin() {
event.stop() });
}
var language = $("language");
if (language)
language.on("change", function(event) {
var value = $("language").value;
if (value != "WONoSelectionString")
// Reload page
window.location.href = ApplicationBaseURL + '/login?language=' + value;
});
var submit = $("submit");
submit.observe("click", onLoginClick);