mirror of
https://github.com/akuker/RASCSI.git
synced 2025-03-11 03:30:32 +00:00
Stop submit event if prompt cancel is clicked (#495)
This commit is contained in:
parent
267625d1e8
commit
df3387b178
@ -113,7 +113,7 @@
|
||||
<input type="submit" value="Info">
|
||||
</form>
|
||||
{% else %}
|
||||
<form action="/scsi/reserve" method="post" onsubmit="var memo = prompt('Enter a memo for this reservation'); document.getElementById('memo_{{ device.id }}').value = memo;">
|
||||
<form action="/scsi/reserve" method="post" onsubmit="var memo = prompt('Enter a memo for this reservation'); if (memo === null) event.preventDefault(); document.getElementById('memo_{{ device.id }}').value = memo;">
|
||||
<input name="scsi_id" type="hidden" value="{{ device.id }}">
|
||||
<input name="memo" id="memo_{{ device.id }}" type="hidden" value="">
|
||||
<input type="submit" value="Reserve">
|
||||
|
Loading…
x
Reference in New Issue
Block a user