Commit 2ab87d2a authored by Wolfgang Knopki's avatar Wolfgang Knopki
Browse files

test dynamic header

parent 8abfefd6
Pipeline #116 passed with stage
in 4 seconds
......@@ -95,8 +95,17 @@ function head(){
headlink.innerHTML="Account";
headlink.href="/account/";
}else if(document.getElementById('loginswitch').getAttribute('authenticated') == '2'){
headlink.innerHTML="Logout";
headlink.href="./logout";
headlink.remove();
let headform = document.createElement('form');
headform.setAttribute("th:action", "@{/logout}");
headform.setAttribute("method","POST");
let headbutton = document.createElement('button');
headbutton.name='logout';
headbutton.type="Submit";
headbutton.innerHTML= "Logout";
headbutton.classList.add("btn","btn-md", "btn-danger");
headform.appendChild(headbutton);
headitem.appendChild(headform);
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment