Logging in on enter press

This commit is contained in:
MrFry 2020-04-20 14:34:10 +02:00
parent d2a8f29b21
commit f482c65f3c

View file

@ -101,7 +101,7 @@
</div>
<div id='form'>
<div class='inputContainer'>
<input type='text' id='pw' name='pw' autocomplete="off" autofocus/>
<input onkeyup="PWKeyUp(this)" type='text' id='pw' name='pw' autocomplete="off" autofocus/>
<input type='hidden' id='cid' name='pw' autocomplete="off"/>
</div>
<div class='ircLinkContainer' >
@ -112,6 +112,12 @@
</div>
</body>
<script>
function PWKeyUp (inputField) {
if (event.keyCode === 13) {
event.preventDefault();
Login(document.getElementById('sendButton'))
}
}
function HandleFeedbackResp (resp) {
document.getElementById('sendButton').innerText = 'Submit'
const textNode = document.getElementById('text')