add an error message
This commit is contained in:
parent
7f8330cb62
commit
66b15be4d8
|
@ -3,6 +3,7 @@ import { getRegister } from 'discourse-common/lib/get-owner';
|
|||
|
||||
export default Ember.Component.extend({
|
||||
donateAmounts: [1, 5, 10, 25],
|
||||
error_message: null,
|
||||
result: null,
|
||||
amount: null,
|
||||
stripe: null,
|
||||
|
@ -33,7 +34,7 @@ export default Ember.Component.extend({
|
|||
self.set('result', null);
|
||||
|
||||
if (result.error) {
|
||||
console.log(result.error);
|
||||
self.set('error_message', result.error.message);
|
||||
}
|
||||
else {
|
||||
self.set('transactionInProgress', true);
|
||||
|
|
|
@ -22,6 +22,10 @@
|
|||
{{loading-spinner size="small"}}
|
||||
{{/if}}
|
||||
|
||||
{{#if error_message}}
|
||||
<span class="error">{{error_message}}</span>
|
||||
{{/if}}
|
||||
|
||||
{{#if result}}
|
||||
<span>{{i18n 'discourse_donations.success'}}</span>
|
||||
{{/if}}
|
||||
|
|
Loading…
Reference in New Issue