2021-09-08 09:36:03 +03:00
|
|
|
<header class="modal-header" data-test-modal="unsubscribe-members">
|
2021-08-13 19:49:18 +03:00
|
|
|
<h1>Unsubscribe members from email?</h1>
|
2021-08-13 14:41:34 +03:00
|
|
|
</header>
|
|
|
|
<a class="close" href="" role="button" title="Close" {{action "closeModal"}}>{{svg-jar "close"}}<span class="hidden">Close</span></a>
|
|
|
|
|
2022-02-02 19:09:43 +03:00
|
|
|
{{#if this.confirmed}}
|
2021-09-08 09:36:03 +03:00
|
|
|
<div class="gh-content-box pa" data-test-state="unsubscribe-complete">
|
2021-08-13 14:41:34 +03:00
|
|
|
{{#if this.error}}
|
|
|
|
<div class="flex items-center">
|
|
|
|
{{svg-jar "warning" class="w4 h4 fill-red mr2 nudge-top--3"}}
|
|
|
|
<div>
|
|
|
|
<p class="ma0 pa0">
|
2021-09-08 09:36:03 +03:00
|
|
|
<span class="fw5" data-test-text="unsubscribe-error">{{this.error}}</span>
|
2021-08-13 14:41:34 +03:00
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{{else}}
|
|
|
|
<div class="flex items-center">
|
|
|
|
{{svg-jar "check-circle" class="w4 h4 stroke-green mr2"}}
|
|
|
|
<p class="ma0 pa0">
|
2021-09-08 09:36:03 +03:00
|
|
|
<span class="fw6" data-test-text="unsubscribe-count">{{gh-pluralize this.response.stats.successful "member"}}</span>
|
|
|
|
successfully unsubscribed
|
2021-08-13 14:41:34 +03:00
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
{{#if this.response.stats.unsuccessful}}
|
|
|
|
<div class="flex items-start mt2" data-test-bulk-delete-errors>
|
|
|
|
{{svg-jar "warning" class="w4 h4 fill-red mr2 nudge-top--3"}}
|
|
|
|
<div>
|
|
|
|
<p class="ma0 pa0">
|
|
|
|
<span class="fw5" data-test-text="invalid-count">{{gh-pluralize this.response.stats.unsuccessful "member"}}</span>
|
2021-09-08 09:36:03 +03:00
|
|
|
failed to unsubscribe
|
2021-08-13 14:41:34 +03:00
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{{/if}}
|
|
|
|
{{/if}}
|
|
|
|
</div>
|
2022-02-02 19:09:43 +03:00
|
|
|
{{else}}
|
|
|
|
<div class="modal-body" data-test-state="unsubscribe-unconfirmed">
|
|
|
|
<p>
|
|
|
|
You're about to unsubscribe
|
|
|
|
<strong data-test-text="unsubscribe-count">{{gh-pluralize this.model.memberCount "member"}}</strong> from email newsletters.
|
|
|
|
Are you sure?
|
|
|
|
</p>
|
|
|
|
</div>
|
2021-08-13 14:41:34 +03:00
|
|
|
{{/if}}
|
|
|
|
|
|
|
|
<div class="modal-footer">
|
2022-02-02 19:09:43 +03:00
|
|
|
{{#if this.confirmed}}
|
|
|
|
<button class="gh-btn gh-btn-black" data-test-button="close-modal" type="button" {{action "closeModal"}}>
|
|
|
|
<span>Close</span>
|
|
|
|
</button>
|
|
|
|
{{else}}
|
|
|
|
<button class="gh-btn" data-test-button="cancel" type="button" {{action "closeModal"}}>
|
2021-08-13 14:41:34 +03:00
|
|
|
<span>Cancel</span>
|
|
|
|
</button>
|
|
|
|
|
|
|
|
<GhTaskButton
|
|
|
|
@buttonText="Unsubscribe members"
|
|
|
|
@successText="Unsubscribed"
|
2021-08-13 19:20:46 +03:00
|
|
|
@task={{this.unsubscribeMemberTask}}
|
2021-08-13 14:41:34 +03:00
|
|
|
@class="gh-btn gh-btn-red gh-btn-icon"
|
|
|
|
data-test-button="confirm"
|
|
|
|
/>
|
|
|
|
{{/if}}
|
|
|
|
</div>
|