-
-
Notifications
You must be signed in to change notification settings - Fork 109
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Check previousStep
for null
#2504
Conversation
not sure why an empty label would be valid? |
The following would be valid and would lead to the same issue: <button type="submit" class="submit previous button" name="previousStep"><?= $this->previousLabel ?></button> This sends an empty string for the |
there's a few other places where we do this comparison, could you maybe fix them too? I quickly searched for |
Hm, not sure which places these are? Which action buttons do you mean? It only really matters in the checkout module where there is a back button I think. |
/reminder @aschempp |
Rebased to |
I checked this again. Isotope does not generate |
It does not matter if you use |
Confirming this with Symfony forms as well: https://github.com/symfony/symfony/blob/4ce4e5ed87acc87d90d7f516b14289c4f49139ef/src/Symfony/Component/Form/SubmitButton.php#L45 I'll update the PR to include all the other places where Isotope does that check. |
Thank you @fritzmg |
Currently a click on the back button within the checkout module might not be recognized if the value of the button is empty for whatever reason, e.g. if you adjusted the template to
for example, or if the
previousLabel
variable is empty for whatever reason. A click on the back button in this case will instead be interpreted as a click on the confirm/next button. This PR changes that by always checking whether the back button was used - by way of checking ifInput::post
returns null or not.