success screen

This commit is contained in:
boyska 2022-05-20 19:25:42 +02:00
parent c3ff1bc2b5
commit 5a8504b5af
2 changed files with 7 additions and 3 deletions

View file

@ -24,6 +24,10 @@
<div class="col-sm-4"></div>
<div class="col-sm-4">
<button id="accept-btn" disabled class="primary button">Accetta</button>
<div id="success" class="hidden">
<h3>Success!</h3>
<p>Write down your new password, or you'll never get it back</p>
</div>
</div>
<div class="col-sm-4"></div>
</div>

View file

@ -28,11 +28,11 @@ async function onAccept(evt) {
})
data = await resp.json()
if(data.success === true) {
// window.location.href = '../logout'
true
document.getElementById("accept-btn").classList.add('hidden')
document.getElementById('success').classList.remove('hidden')
document.getElementById("generate-btn").classList.add('hidden')
} else {
document.getElementById("generate-btn").removeAttribute('disabled')
document.getElementById("accept-btn").setAttribute('disabled', 'disabled')
}
}