2022-05-11 20:11:54 +03:00
|
|
|
<header class="modal-header" data-test-modal="member-tier" {{did-insert this.setup}}>
|
2021-06-03 19:02:32 +03:00
|
|
|
<h1>Add subscription</h1>
|
|
|
|
</header>
|
2022-03-18 19:15:42 +03:00
|
|
|
<button type="button" class="close" title="Close" {{on "click" this.close}}>
|
2021-06-18 12:12:36 +03:00
|
|
|
{{svg-jar "close"}}<span class="hidden">Close</span>
|
2022-03-18 19:15:42 +03:00
|
|
|
</button>
|
2021-04-19 15:45:14 +03:00
|
|
|
|
|
|
|
<form>
|
2021-06-17 10:39:43 +03:00
|
|
|
<div class="modal-body">
|
2022-03-18 19:15:42 +03:00
|
|
|
<p class="gh-member-addcomp-subhed" data-test-text="select-tier-desc">
|
2021-07-19 13:38:51 +03:00
|
|
|
Select a tier for <strong>{{or this.member.name this.member.email}}</strong>'s
|
2021-06-18 12:12:36 +03:00
|
|
|
complimentary subscription.
|
|
|
|
</p>
|
2021-06-17 10:39:43 +03:00
|
|
|
{{#if this.activeSubscriptions.length}}
|
2022-03-18 19:15:42 +03:00
|
|
|
<p class="gh-member-addcomp-warning" data-test-text="sub-cancel-warning">
|
2021-06-17 10:39:43 +03:00
|
|
|
Adding a complimentary subscription cancels all existing subscriptions of this member.
|
|
|
|
</p>
|
|
|
|
{{/if}}
|
2022-05-11 20:11:54 +03:00
|
|
|
{{#if this.loadingTiers}}
|
2021-06-17 10:39:43 +03:00
|
|
|
<div class="flex justify-center flex-auto">
|
|
|
|
<div class="gh-loading-spinner"> </div>
|
2021-06-03 19:02:32 +03:00
|
|
|
</div>
|
2021-06-17 10:39:43 +03:00
|
|
|
{{else}}
|
|
|
|
<div class="form-rich-radio">
|
2022-05-11 20:11:54 +03:00
|
|
|
{{#each this.tiers as |tier|}}
|
2022-03-18 19:15:42 +03:00
|
|
|
<div
|
2022-05-11 20:11:54 +03:00
|
|
|
class="gh-radio {{if (eq this.selectedTier tier.id) "active"}}"
|
|
|
|
{{on "click" (fn this.setTier tier.id)}}
|
|
|
|
data-test-tier-option={{tier.id}}
|
2022-03-18 19:15:42 +03:00
|
|
|
>
|
2021-06-17 10:39:43 +03:00
|
|
|
<div class="gh-radio-content">
|
|
|
|
<div class="gh-radio-label">
|
2022-03-18 19:15:42 +03:00
|
|
|
<div class="description" data-test-text="tier-desc">
|
2022-05-11 20:11:54 +03:00
|
|
|
<h4>{{tier.name}}</h4>
|
|
|
|
<p>{{tier.description}}</p>
|
2021-06-17 10:39:43 +03:00
|
|
|
</div>
|
|
|
|
{{svg-jar "check" class="check"}}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="gh-radio-button"></div>
|
2021-06-03 19:02:32 +03:00
|
|
|
</div>
|
2021-06-17 10:39:43 +03:00
|
|
|
{{/each}}
|
2021-06-03 19:02:32 +03:00
|
|
|
</div>
|
2021-06-17 10:39:43 +03:00
|
|
|
{{/if}}
|
2021-04-19 15:45:14 +03:00
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
|
|
|
|
<div class="modal-footer">
|
|
|
|
<button
|
2022-03-18 19:15:42 +03:00
|
|
|
class="gh-btn"
|
|
|
|
type="button"
|
|
|
|
{{on "click" this.close}}
|
2021-06-18 12:12:36 +03:00
|
|
|
{{!-- disable mouseDown so it does not trigger focus-out validations --}}
|
2022-03-18 19:15:42 +03:00
|
|
|
{{!-- template-lint-disable no-down-event-binding --}}
|
|
|
|
{{on "mousedown" (optional this.noop)}}
|
|
|
|
data-test-button="cancel-webhook"
|
|
|
|
>
|
2021-06-03 19:02:32 +03:00
|
|
|
<span>Cancel</span>
|
2021-04-19 15:45:14 +03:00
|
|
|
</button>
|
2021-06-03 19:02:32 +03:00
|
|
|
|
2021-06-17 10:39:43 +03:00
|
|
|
|
|
|
|
<GhTaskButton @buttonText="Add subscription"
|
|
|
|
@successText={{"Added"}}
|
2022-05-11 20:11:54 +03:00
|
|
|
@task={{this.addTier}}
|
|
|
|
@class="gh-btn gh-btn-green gh-btn-icon gh-btn-add-membertier"
|
|
|
|
data-test-button="save-comp-tier" />
|
2021-04-19 15:45:14 +03:00
|
|
|
</div>
|