FIX: Loading state persists after bad card entered (#22)
* FIX: Loading state persists after bad card entered If a bad card number was entered and the subscribe button clicked, the subscription button still disappeared and subscribing was not possible without refreshing the page. * UX: Add missing tooltip * DEV: Ignore gems directory for local rubocop runs
This commit is contained in:
parent
55e6accb9c
commit
e13221279d
|
@ -1,2 +1,5 @@
|
|||
AllCops:
|
||||
Exclude:
|
||||
- 'gems/**/*'
|
||||
inherit_gem:
|
||||
rubocop-discourse: default.yml
|
||||
|
|
|
@ -5,6 +5,7 @@ GIT
|
|||
translations-manager (0.6)
|
||||
|
||||
GEM
|
||||
remote: https://rubygems.org/
|
||||
specs:
|
||||
ast (2.4.1)
|
||||
parallel (1.19.2)
|
||||
|
|
|
@ -25,6 +25,7 @@ export default Controller.extend({
|
|||
createSubscription(plan) {
|
||||
return this.stripe.createToken(this.get("cardElement")).then((result) => {
|
||||
if (result.error) {
|
||||
this.set("loading", false);
|
||||
return result;
|
||||
} else {
|
||||
const customer = Customer.create({ source: result.token.id });
|
||||
|
|
|
@ -9,6 +9,9 @@ en:
|
|||
errors:
|
||||
discourse_patrons_amount_must_be_currency: "Currency amounts must be currencies without dollar symbol (eg 1.50)"
|
||||
js:
|
||||
filters:
|
||||
subscribe:
|
||||
help: Support this site by subscribing
|
||||
discourse_subscriptions:
|
||||
title: Discourse Subscriptions
|
||||
admin_navigation: Subscriptions
|
||||
|
|
Loading…
Reference in New Issue