File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
example/src/main/resources/templates Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff 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 ( ) => {
You can’t perform that action at this time.
0 commit comments