-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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 trigger submit action twice #5658
Conversation
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/eventyay/open-event-frontend/qujlt09ce |
Codecov Report
@@ Coverage Diff @@
## development #5658 +/- ##
===============================================
- Coverage 23.73% 23.43% -0.31%
===============================================
Files 498 508 +10
Lines 5275 5377 +102
Branches 47 47
===============================================
+ Hits 1252 1260 +8
- Misses 4015 4109 +94
Partials 8 8
Continue to review full report at Codecov.
|
Can I submit the form by clicking enter on any field. And this is not the only form with class syntax |
Yes |
@@ -88,5 +88,5 @@ | |||
<label for="adminBillingAdditionalInfo">{{t 'Additional Info'}}</label> | |||
<Input @type="text" @id="adminBillingAdditionalInfo" @value={{this.model.adminBillingAdditionalInfo}} /> | |||
</div> | |||
<button class="ui teal button" type="submit" name="submit">{{t 'Save'}}</button> | |||
<button class="ui teal button" type="button" name="submit" onclick={{action "submit"}}>{{t 'Save'}}</button> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this should be needed, just type="submit" should do
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
keeping it to submit
that is triggering twice
@iamareebjamal why build is failing |
Because there is no submit type button in the form now. Honestly, it should work without changing button submit, check here - 5c3d8f5 |
ok |
@iamareebjamal please review. |
@@ -88,5 +88,5 @@ | |||
<label for="adminBillingAdditionalInfo">{{t 'Additional Info'}}</label> | |||
<Input @type="text" @id="adminBillingAdditionalInfo" @value={{this.model.adminBillingAdditionalInfo}} /> | |||
</div> | |||
<button class="ui teal button" type="submit" name="submit">{{t 'Save'}}</button> | |||
<button class="ui teal button" type="submit" name="submit" onclick={{action "submit"}}>{{t 'Save'}}</button> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it needed?
@@ -35,7 +35,7 @@ | |||
</div> | |||
<div class="ui center aligned segment basic"> | |||
<div class="ui vertical buttons"> | |||
<button type="submit" class="ui fluid teal submit button register"> | |||
<button type="submit" class="ui fluid teal submit button register" onclick={{action "submit"}}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this change needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no it's not 😕 . But why, I don't understand. If my action name is other than submit
then it will be needed or will work in same way?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dunno, looks like the form mixin shenanigans
Fixes #5655
Checklist
development
branch.