Fixes small workflow changes with update modals
- prevents form elements from refreshing the page or submitting requests - ensures that the submit buttons for modals will close the modal, insead of just spawning a page refresh
This commit is contained in:
parent
44b51e531a
commit
13f8648fb7
|
@ -56,13 +56,13 @@
|
|||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form onsubmit="updateStreamTitle(document.getElementById('streamTitleInput').value)" style="width:100%" id="streamTitleForm">
|
||||
<form onsubmit="updateStreamTitle(document.getElementById('streamTitleInput').value); return false" style="width:100%" id="streamTitleForm">
|
||||
<input type="text" name="streamTitle" id="streamTitleInput" style="width:100%" />
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
|
||||
<button type="button submit" form="streamTitleForm" class="btn btn-primary">Save changes</button>
|
||||
<button type="button submit" form="streamTitleForm" class="btn btn-primary" data-bs-dismiss="modal">Save changes</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -78,14 +78,14 @@
|
|||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form onsubmit="updateTags(document.getElementById('tagsInput').value)" style="width:100%" id="tagsForm">
|
||||
<form onsubmit="updateTags(document.getElementById('tagsInput').value); return false" style="width:100%" id="tagsForm">
|
||||
<input type="text" name="tagsInput" id="tagsInput" style="width:100%" />
|
||||
</form>
|
||||
<p class="small text-center">Seperate tags by comma.</p>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
|
||||
<button type="button submit" form="streamTitleForm" class="btn btn-primary">Save changes</button>
|
||||
<button type="button submit" form="tagsForm" class="btn btn-primary" data-bs-dismiss="modal">Save changes</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue