Skip to content
This repository was archived by the owner on Apr 28, 2020. It is now read-only.

Handle multiple submit buttons - #55

Open
agrath wants to merge 1 commit into
tavicu:masterfrom
agrath:multiple-submit
Open

Handle multiple submit buttons#55
agrath wants to merge 1 commit into
tavicu:masterfrom
agrath:multiple-submit

Conversation

@agrath

@agrath agrath commented Jul 2, 2018

Copy link
Copy Markdown

When using bs-confirmation with multiple input[type=submit] buttons, the current behaviour is to trigger form.submit after confirmation is received. If you have multiple submit buttons (with unique names/values) then this submits the form with the wrong action. This commit changes that behaviour so that if there are multiple submit buttons, the confirmation is destroyed then the click event reinvoked causing the original submit action to occur (which is browser submitting the form with the correct name/value specified for the clicked button)

When using bs-confirmation with multiple input[type=submit] buttons, the current behaviour is to trigger form.submit after confirmation is received. If you have multiple submit buttons (with unique names/values) then this submits the form with the wrong action. This commit changes that behaviour so that if there are multiple submit buttons, the confirmation is destroyed then the click event reinvoked causing the original submit action to occur (which is browser submitting the form with the correct name/value specified for the clicked button)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant