Commit cc02ba33 authored by Wolfgang Knopki's avatar Wolfgang Knopki
Browse files

test dynamic header

parent 2afc073f
Pipeline #118 passed with stage
in 3 seconds
......@@ -95,17 +95,10 @@ function head(){
headlink.innerHTML="Account";
headlink.href="/account/";
}else if(document.getElementById('loginswitch').getAttribute('authenticated') == '2'){
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);
headlink.setAttribute("th:onclick", "@{/logout}");
headlink.removeAttribute("href");
headlink.innerHTML="Logout";
}
}
......
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