mirror of
https://github.com/discourse/discourse-subscriptions.git
synced 2025-07-08 23:32:44 +00:00
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:
|
inherit_gem:
|
||||||
rubocop-discourse: default.yml
|
rubocop-discourse: default.yml
|
||||||
|
@ -5,6 +5,7 @@ GIT
|
|||||||
translations-manager (0.6)
|
translations-manager (0.6)
|
||||||
|
|
||||||
GEM
|
GEM
|
||||||
|
remote: https://rubygems.org/
|
||||||
specs:
|
specs:
|
||||||
ast (2.4.1)
|
ast (2.4.1)
|
||||||
parallel (1.19.2)
|
parallel (1.19.2)
|
||||||
|
@ -25,6 +25,7 @@ export default Controller.extend({
|
|||||||
createSubscription(plan) {
|
createSubscription(plan) {
|
||||||
return this.stripe.createToken(this.get("cardElement")).then((result) => {
|
return this.stripe.createToken(this.get("cardElement")).then((result) => {
|
||||||
if (result.error) {
|
if (result.error) {
|
||||||
|
this.set("loading", false);
|
||||||
return result;
|
return result;
|
||||||
} else {
|
} else {
|
||||||
const customer = Customer.create({ source: result.token.id });
|
const customer = Customer.create({ source: result.token.id });
|
||||||
|
@ -9,6 +9,9 @@ en:
|
|||||||
errors:
|
errors:
|
||||||
discourse_patrons_amount_must_be_currency: "Currency amounts must be currencies without dollar symbol (eg 1.50)"
|
discourse_patrons_amount_must_be_currency: "Currency amounts must be currencies without dollar symbol (eg 1.50)"
|
||||||
js:
|
js:
|
||||||
|
filters:
|
||||||
|
subscribe:
|
||||||
|
help: Support this site by subscribing
|
||||||
discourse_subscriptions:
|
discourse_subscriptions:
|
||||||
title: Discourse Subscriptions
|
title: Discourse Subscriptions
|
||||||
admin_navigation: Subscriptions
|
admin_navigation: Subscriptions
|
||||||
|
Loading…
x
Reference in New Issue
Block a user