diff --git a/ghost/admin/app/components/gh-member-settings-form-cp.hbs b/ghost/admin/app/components/gh-member-settings-form-cp.hbs index 15f89c3473..5687f2c54c 100644 --- a/ghost/admin/app/components/gh-member-settings-form-cp.hbs +++ b/ghost/admin/app/components/gh-member-settings-form-cp.hbs @@ -74,7 +74,7 @@ - + This member doesn't have subscriptions. {{#unless this.member.isNew}} {{#if this.isAddComplimentaryAllowed}} - + {{#if this.isCreatingComplimentary}} + Loading... + {{else}} + + {{/if}} {{/if}} {{/unless}} @@ -181,9 +185,13 @@ {{/each}} {{#if this.isAddComplimentaryAllowed}} {{/if}} diff --git a/ghost/admin/app/components/gh-member-settings-form-cp.js b/ghost/admin/app/components/gh-member-settings-form-cp.js index 50280dae14..91e80c16d9 100644 --- a/ghost/admin/app/components/gh-member-settings-form-cp.js +++ b/ghost/admin/app/components/gh-member-settings-form-cp.js @@ -79,6 +79,11 @@ export default class extends Component { return null; } + get isCreatingComplimentary() { + const {comped} = this.member.changedAttributes() || {}; + return comped && comped[0] === false && comped[1] === true && this.args.isSaveRunning; + } + @action setProperty(property, value) { this.args.setProperty(property, value); @@ -103,6 +108,7 @@ export default class extends Component { continueSubscription(subscriptionId) { this.continueSubscriptionTask.perform(subscriptionId); } + @action addCompedSubscription() { this.args.setProperty('comped', true); diff --git a/ghost/admin/app/templates/member.hbs b/ghost/admin/app/templates/member.hbs index fdfe6793ae..a1b487d88c 100644 --- a/ghost/admin/app/templates/member.hbs +++ b/ghost/admin/app/templates/member.hbs @@ -32,6 +32,7 @@ @scratchMember={{this.scratchMember}} @setProperty={{this.setProperty}} @saveMember={{this.save}} + @isSaveRunning={{this.saveTask.isRunning}} @isLoading={{this.isLoading}} />