2019-12-13 17:20:29 +03:00
|
|
|
|
{{#unless this.errorMessage}}
|
2019-11-21 02:23:23 +03:00
|
|
|
|
<header class="modal-header" data-test-modal="delete-user">
|
|
|
|
|
<h1>Ready to go? Here’s what happens next</h1>
|
|
|
|
|
</header>
|
|
|
|
|
<button class="close" title="Close" {{on "click" this.closeModal}}>{{svg-jar "close"}}<span class="hidden">Close</span></button>
|
2019-11-07 11:37:26 +03:00
|
|
|
|
|
2020-08-10 14:27:16 +03:00
|
|
|
|
<div class="modal-body" {{did-insert this.countPaidMembers}}>
|
|
|
|
|
{{#if this.countPaidMembersTask.isRunning}}
|
|
|
|
|
<div class="flex flex-column items-center">
|
|
|
|
|
<div class="gh-loading-spinner"></div>
|
|
|
|
|
</div>
|
|
|
|
|
{{else}}
|
|
|
|
|
<p>
|
|
|
|
|
Your post will be delivered to
|
|
|
|
|
<strong>
|
|
|
|
|
{{#if this.model.paidOnly}}
|
|
|
|
|
{{!-- TODO: remove editor fallback once editors can query member counts --}}
|
|
|
|
|
{{if this.session.user.isEditor "all paid members" (gh-pluralize this.paidMemberCount "paid member")}}
|
|
|
|
|
{{else}}
|
|
|
|
|
{{!-- TODO: remove editor fallback once editors can query member counts --}}
|
|
|
|
|
{{if this.session.user.isEditor "all members" (gh-pluralize this.model.memberCount "member")}}
|
|
|
|
|
{{/if}}
|
|
|
|
|
</strong>
|
|
|
|
|
and will be published on your site{{#if this.model.isScheduled}} at the scheduled time{{/if}}. Sound good?
|
|
|
|
|
</p>
|
|
|
|
|
{{/if}}
|
2019-11-21 02:23:23 +03:00
|
|
|
|
</div>
|
2019-11-07 11:37:26 +03:00
|
|
|
|
|
2019-11-21 02:23:23 +03:00
|
|
|
|
<div class="modal-footer">
|
|
|
|
|
<button {{on "click" this.closeModal}} class="gh-btn" data-test-button="cancel-publish-and-email">
|
|
|
|
|
<span>Cancel</span>
|
|
|
|
|
</button>
|
|
|
|
|
<GhTaskButton
|
2020-08-10 14:27:16 +03:00
|
|
|
|
@disabled={{this.countPaidMembersTask.isRunning}}
|
2019-11-21 02:23:23 +03:00
|
|
|
|
@buttonText={{if this.model.isScheduled "Schedule" "Publish and send"}}
|
|
|
|
|
@runningText={{if this.model.isScheduled "Scheduling..." "Publishing..."}}
|
2020-08-10 14:27:16 +03:00
|
|
|
|
@task={{this.confirmAndCheckErrorTask}}
|
2019-11-21 02:23:23 +03:00
|
|
|
|
@class="gh-btn gh-btn-green gh-btn-icon"
|
|
|
|
|
data-test-button="confirm-publish-and-email"
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
{{else}}
|
|
|
|
|
<header class="modal-header" data-test-modal="delete-user">
|
|
|
|
|
<h1>Failed to send email</h1>
|
|
|
|
|
</header>
|
|
|
|
|
<button class="close" title="Close" {{on "click" this.closeModal}}>{{svg-jar "close"}}<span class="hidden">Close</span></button>
|
|
|
|
|
|
|
|
|
|
<div class="modal-body">
|
2019-11-26 15:38:43 +03:00
|
|
|
|
{{#if this.session.user.isOwner}}
|
2020-06-30 09:27:18 +03:00
|
|
|
|
<p>Your post has been published but the email failed to send. Please verify your email settings if the error persists.</p>
|
2019-11-26 15:38:43 +03:00
|
|
|
|
{{else}}
|
2020-06-30 09:27:18 +03:00
|
|
|
|
<p>Your post has been published but the email failed to send. Please verify your email settings if the error persists.</p>
|
2019-11-26 15:38:43 +03:00
|
|
|
|
{{/if}}
|
2019-11-22 19:17:29 +03:00
|
|
|
|
<p class="mb0">
|
2019-12-13 17:20:29 +03:00
|
|
|
|
<button type="button" class="gh-btn gh-btn-text regular" {{action (toggle "errorDetailsOpen" this)}} data-test-toggle-error>
|
|
|
|
|
{{#if this.errorDetailsOpen}}
|
2019-11-22 19:17:29 +03:00
|
|
|
|
{{svg-jar "arrow-down" class="nudge-top--2 w2 h2 fill-darkgrey mr1"}}
|
|
|
|
|
{{else}}
|
|
|
|
|
{{svg-jar "arrow-right" class="nudge-top--1 w2 h2 fill-darkgrey mr1"}}
|
|
|
|
|
{{/if}}
|
|
|
|
|
<span>Error details</span>
|
|
|
|
|
</button>
|
|
|
|
|
</p>
|
2020-01-08 19:44:43 +03:00
|
|
|
|
|
2019-12-13 17:20:29 +03:00
|
|
|
|
{{#liquid-if this.errorDetailsOpen}}
|
2019-11-22 19:17:29 +03:00
|
|
|
|
<p class="error gh-box gh-box-error mt3 mb3">
|
|
|
|
|
{{svg-jar "warning"}}
|
|
|
|
|
{{this.errorMessage}}
|
|
|
|
|
</p>
|
|
|
|
|
{{/liquid-if}}
|
2019-11-21 02:23:23 +03:00
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="modal-footer">
|
|
|
|
|
<button {{on "click" this.closeModal}} class="gh-btn" data-test-button="cancel-publish-and-email">
|
|
|
|
|
<span>Close</span>
|
|
|
|
|
</button>
|
2019-11-22 18:09:48 +03:00
|
|
|
|
<GhTaskButton
|
|
|
|
|
@buttonText="Retry email"
|
|
|
|
|
@runningText="Sending..."
|
|
|
|
|
@task={{this.retryEmailTask}}
|
|
|
|
|
@class="gh-btn gh-btn-red gh-btn-icon"
|
|
|
|
|
data-test-button="retry-email"
|
|
|
|
|
/>
|
2019-11-21 02:23:23 +03:00
|
|
|
|
</div>
|
|
|
|
|
{{/unless}}
|