Fixed incorrect logic for confirm method

If we use data-confirm attribute for submit button and `confirm` is ok, the form does not submit