Skip to content
Snippets Groups Projects
Commit cf4f11b8 authored by Jan Hartig's avatar Jan Hartig
Browse files

Fix validation on url call

parent d3a49008
No related branches found
No related tags found
1 merge request!1Add error handling
......@@ -73,7 +73,7 @@
<div id="hiddenFieldError" class="hiddenField error" aria-hidden="true">
<p id="errorText">empty</p>
</div>
<input type="text" id="room" placeholder="Raumname" minlength="2" required>
<input type="text" id="room" placeholder="Raumname" minlength=2 required>
<button type="button" onclick="process_form()" id="unlock">Freischalten</button>
<br>
<p style="font-weight: bold;">oder...</p>
......@@ -99,9 +99,9 @@
const roomUrl = document.getElementById('roomUrl');
let room = window.location.href.substring(window.location.href.lastIndexOf('/') + 1)
if (room !== "raumfreischaltung" && room !== "") {
roomField.value = room;
unlockButton.click();
if (room.length >= 2 && room !== "raumfreischaltung") {
roomField.value = room
get_room(room)
}
function get_room(_room) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment