mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-27 10:54:50 +01:00
Confirm modal: Prevent form submit without confirmation (#4262)
Fixes https://github.com/btcpayserver/btcpayserver/issues/4259
This commit is contained in:
@@ -33,6 +33,11 @@
|
||||
? $continue.removeAttribute('disabled')
|
||||
: $continue.setAttribute('disabled', 'disabled')
|
||||
})
|
||||
$form.addEventListener('submit', event => {
|
||||
if ($input.value.trim() !== confirmInput) {
|
||||
event.preventDefault()
|
||||
}
|
||||
})
|
||||
} else {
|
||||
$text.setAttribute('hidden', 'hidden')
|
||||
$continue.removeAttribute('disabled')
|
||||
|
||||
Reference in New Issue
Block a user