2021-06-17 10:39:43 +03:00
|
|
|
<header class="modal-header" data-test-modal="delete-user" {{did-insert this.setup}}>
|
2021-06-03 19:02:32 +03:00
|
|
|
<h1>Add subscription</h1>
|
|
|
|
</header>
|
2021-06-18 12:12:36 +03:00
|
|
|
<a class="close" href="" role="button" title="Close" {{action "closeModal" }}>
|
|
|
|
{{svg-jar "close"}}<span class="hidden">Close</span>
|
|
|
|
</a>
|
2021-04-19 15:45:14 +03:00
|
|
|
|
|
|
|
<form>
|
2021-06-17 10:39:43 +03:00
|
|
|
<div class="modal-body">
|
2021-06-18 12:12:36 +03:00
|
|
|
<p class="gh-member-addcomp-subhed">
|
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}}
|
|
|
|
<p class="gh-member-addcomp-warning">
|
|
|
|
Adding a complimentary subscription cancels all existing subscriptions of this member.
|
|
|
|
</p>
|
|
|
|
{{/if}}
|
|
|
|
{{#if this.loadingProducts}}
|
|
|
|
<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">
|
|
|
|
{{#each this.products as |product|}}
|
|
|
|
<div class="gh-radio {{if (eq this.selectedProduct product.id) "active"}}" {{on "click" (fn this.setProduct product.id)}}>
|
|
|
|
<div class="gh-radio-content">
|
|
|
|
<div class="gh-radio-label">
|
|
|
|
<div class="description">
|
|
|
|
<h4>{{product.name}}</h4>
|
|
|
|
<p>{{product.description}}</p>
|
|
|
|
</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
|
|
|
|
class="gh-btn"
|
2021-06-17 10:39:43 +03:00
|
|
|
{{action "closeModal" }}
|
2021-06-18 12:12:36 +03:00
|
|
|
{{!-- disable mouseDown so it does not trigger focus-out validations --}}
|
2021-06-17 10:39:43 +03:00
|
|
|
{{action (optional this.noop) on="mouseDown" }}
|
|
|
|
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"}}
|
|
|
|
@task={{this.addProduct}}
|
2021-06-03 19:02:32 +03:00
|
|
|
@class="gh-btn gh-btn-green gh-btn-icon gh-btn-add-memberproduct"
|
2021-06-17 10:39:43 +03:00
|
|
|
data-test-button="save-comp-product" />
|
2021-04-19 15:45:14 +03:00
|
|
|
</div>
|