Skip to content
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

Prevent multiple refund creations with accidental double clicks #2970

Merged
merged 1 commit into from
Nov 26, 2018

Conversation

spaghetticode
Copy link
Member

When creating refunds, if the admin user accidentally clicks multiple times on the submit button then multiple refunds may be created.

This PR avoids the issue by disabling the button after click.

The submit button must be disabled after submit or accidental double clicks
could generate multiple refunds.

While successful refund creation with fast multiple clicks cannot be tested
with Selenium, a spec that shows how button is disabled after submit has been
added.
Copy link
Member

@tvdeyen tvdeyen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Thanks

Copy link
Contributor

@jacobherrington jacobherrington left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great, thanks @spaghetticode!

@kennyadsl kennyadsl merged commit fa85e05 into solidusio:master Nov 26, 2018
@kennyadsl kennyadsl deleted the refund-button-disable-on-submit branch November 26, 2018 08:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants