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

Handle multiple submit buttons #55

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

agrath
Copy link

@agrath agrath commented Jul 2, 2018

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