Skip to content

Commit b885b52

Browse files
committed
fix: logout keeps lang
WE2-1110 Signed-off-by: Sven Mitt <[email protected]>
1 parent 7865138 commit b885b52

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

example/src/main/resources/templates/welcome.html

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ <h2 class="adding-signature">Digital signing</h2>
5252
"use strict";
5353
import * as webeid from "/js/web-eid.js";
5454
import {hideErrorMessage, showErrorMessage, checkHttpError} from "/js/errors.js";
55+
import {getValidatedLangFromUrl} from "/js/index.js";
5556

5657
const signButton = document.querySelector("#webeid-sign-button");
5758
const downloadButton = document.querySelector("#webeid-download-button");
@@ -70,7 +71,12 @@ <h2 class="adding-signature">Digital signing</h2>
7071
[csrfHeaderName]: csrfToken
7172
}
7273
});
73-
window.location.href = "/";
74+
const lang = getValidatedLangFromUrl();
75+
const indexPageUrl = new URL("/", window.location.origin);
76+
if (lang) {
77+
indexPageUrl.searchParams.set("lang", lang);
78+
}
79+
window.location.href = indexPageUrl.toString();
7480
});
7581

7682
downloadButton.addEventListener("click", async () => {

0 commit comments

Comments
 (0)