make form a form

This commit is contained in:
eta 2023-01-14 12:24:20 +00:00
parent 74f6c0268d
commit 8c87ef28b4
2 changed files with 10 additions and 7 deletions

View File

@ -78,12 +78,14 @@
</summary>
<div class="govuk-details__text">
<p class="govuk-body">Does the barcode scanner just not want to work? Use another Aztec barcode scanner (there are plenty on the mobile app stores), and then copy the result into the bottom form.</p>
<div class="govuk-form-group" style="margin-bottom: 10px;">
<input class="govuk-input" id="raw-text-in" name="raw-text-in" type="text">
</div>
<button class="govuk-button" data-module="govuk-button" id="raw-text-btn">
Hope for the best
</button>
<form id="raw-text-form">
<div class="govuk-form-group" style="margin-bottom: 10px;">
<input class="govuk-input" id="raw-text-in" name="raw-text-in" type="text">
</div>
<button class="govuk-button" data-module="govuk-button" type="submit">
Hope for the best
</button>
</form>
</div>
</details>
<div id="video-container" style="display: none;">

View File

@ -266,7 +266,8 @@ function onload() {
console.log('[+] Video started playing');
video_div.scrollIntoView();
});
document.getElementById('raw-text-btn').addEventListener('click', () => {
document.getElementById('raw-text-form').addEventListener('submit', (e) => {
e.preventDefault();
console.log("[+] Raw text input pressed");
decode_banner.style.display = "none";
ticket_content.style.display = "none";