Display "all paid members" instead of incorrect count in email confirm modal

This commit is contained in:
Kevin Ansfield 2019-11-13 10:17:00 +00:00
parent 17ef3efcef
commit 3daf46dcf8
3 changed files with 10 additions and 3 deletions

View File

@ -537,7 +537,7 @@ export default Controller.extend({
}
}).enqueue(),
// load supplementel data such as the actions list in the background
// load supplementel data such as the members count in the background
backgroundLoader: task(function* () {
if (this.feature.members) {
let membersResponse = yield this.store.query('member', {limit: 1});

View File

@ -53,7 +53,11 @@
{{#if showEmailConfirmationModal}}
<GhFullscreenModal
@modal="confirm-email-send"
@model={{hash memberCount=this.memberCount isScheduled=(eq this.saveType "schedule")}}
@model={{hash
memberCount=this.memberCount
isScheduled=(eq this.saveType "schedule")
paidOnly=(eq this.post.visibility "paid")
}}
@confirm={{this.confirmEmailSend}}
@close={{this.closeEmailConfirmationModal}}
@modifier="action wide"

View File

@ -4,7 +4,10 @@
<a class="close" href="" title="Close" {{action "closeModal"}}>{{svg-jar "close"}}<span class="hidden">Close</span></a>
<div class="modal-body">
<p><strong>PLEASE NOTE:</strong> You are about to email this post to <strong>{{pluralize this.model.memberCount "member"}}</strong>.</p>
<p>
<strong>PLEASE NOTE:</strong> You are about to email this post to
<strong>{{if this.model.paidOnly "all paid members" (pluralize this.model.memberCount "member")}}</strong>.
</p>
<ul>
{{#if this.model.isScheduled}}
<li>Email will be sent when the post is published at the scheduled time</li>