Closed pierlon closed 6 years ago
Will this still work if used on a link without the "action_confirm" class?
Yes, the attribute onclick() is still added to the element.
When I try this fix on a link that does not have the "action_confirm" class, the form does not submit.
I may have misunderstood you. The form submits if I confirm the action or not, so removing the else clause fixes the issue. If the link does not have the "action_confirm" class it should not have the onclick attribute.
Ideally, the "action_confirm" class would be optional. If not present, the form submission would occur immediately, as intended. If present, the user would be prompted to confirm the action and the form would be submitted (or not) depending on what they choose.
fixes issue #215