Skip to content

Commit

Permalink
Fix channel choice error button behaviour
Browse files Browse the repository at this point in the history
  • Loading branch information
Adam Wysocki committed Nov 29, 2024
1 parent 8369fc7 commit e37af15
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 10 deletions.
23 changes: 14 additions & 9 deletions _dev/js/_partials/gateways.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,20 @@ export function validateSelectedTransfer(gateways_wrapper: HTMLDivElement) {
}

function switchButton(checked: boolean, btn: HTMLButtonElement, req: HTMLInputElement, errorMsg) {
if (!checked || !req.checked) {
errorMsg.style.display = 'block'
btn.disabled = true
btn.classList.add('disabled')
} else {
errorMsg.style.display = 'none'
btn.disabled = false
btn.classList.remove('disabled')
}
if (!checked || !req.checked) {
if (!checked) {
errorMsg.style.display = 'block'
} else {
errorMsg.style.display = 'none'
}

btn.disabled = true
btn.classList.add('disabled')
} else {
errorMsg.style.display = 'none'
btn.disabled = false
btn.classList.remove('disabled')
}
}

export function addTpaySupercheckoutValidator() {
Expand Down
2 changes: 1 addition & 1 deletion views/js/main.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit e37af15

Please sign in to comment.