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

fix: don't able to call server when promotional code is empty #3818

Merged
merged 2 commits into from
Jan 22, 2020
Merged

fix: don't able to call server when promotional code is empty #3818

merged 2 commits into from
Jan 22, 2020

Conversation

maze-runnar
Copy link
Contributor

Fixes #3815

Short description of what this resolves:

don't able to call server when promotional code is empty. So making the submit button disabled when promotional code is empty and also added validation to the field.
full flow of the promotional code field : https://youtu.be/34cZDbxJDDU

Checklist

  • I have read the Contribution & Best practices Guide.
  • My branch is up-to-date with the Upstream development branch.
  • The acceptance, integration, unit tests and linter pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

@auto-label auto-label bot added the fix label Jan 18, 2020
@maze-runnar
Copy link
Contributor Author

maze-runnar commented Jan 19, 2020

@kushthedude please review.

}}
{{#unless promotionalCodeApplied}}
<div role="button" class="ui icon button" {{action 'applyPromotionalCode'}}>
<div role="button" class="ui icon {{if promotionalCode '' 'disabled'}} button" {{action 'applyPromotionalCode'}}>
Copy link
Member

Choose a reason for hiding this comment

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

@maze-runnar Is this really needed ? Validation should be taking care for empty input .

Copy link
Contributor Author

Choose a reason for hiding this comment

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

but it was still calling the server and reloading the page.

@kushthedude kushthedude merged commit f23f9ce into fossasia:development Jan 22, 2020
@maze-runnar maze-runnar deleted the patch-4 branch January 22, 2020 19:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Promotional Code empty still calls server
5 participants