2022-05-12 14:56:43 +03:00
|
|
|
<div class="gh-publish-send-to">
|
|
|
|
<div class="gh-publish-send-to-option">
|
|
|
|
<div class="for-checkbox {{if @disabled "disabled"}}">
|
|
|
|
<label class="checkbox" for="send-email-to-free">
|
2021-05-21 20:22:01 +03:00
|
|
|
<input
|
2022-05-12 14:56:43 +03:00
|
|
|
id="send-email-to-free"
|
2021-05-21 20:22:01 +03:00
|
|
|
type="checkbox"
|
|
|
|
class="gh-input post-settings-featured"
|
2022-05-12 14:56:43 +03:00
|
|
|
checked={{this.isFreeChecked}}
|
2021-05-21 20:22:01 +03:00
|
|
|
disabled={{@disabled}}
|
2022-05-12 14:56:43 +03:00
|
|
|
aria-label="Free members toggle"
|
|
|
|
{{on "change" (fn this.toggleFilter "status:free")}}
|
|
|
|
data-test-checkbox="free-members"
|
2021-05-21 20:22:01 +03:00
|
|
|
>
|
2022-05-12 14:56:43 +03:00
|
|
|
<div class="flex">
|
|
|
|
<span class="input-toggle-component"></span>
|
|
|
|
<p>
|
|
|
|
Free
|
|
|
|
{{#let (members-count-fetcher query=(hash filter=(concat @newsletter.recipientFilter "+status:free"))) as |countFetcher|}}
|
|
|
|
{{#if (not (is-empty countFetcher.count))}}
|
|
|
|
<span class="gh-publish-emailcount" data-test-email-count="free-members">({{countFetcher.count}})</span>
|
|
|
|
{{/if}}
|
|
|
|
{{/let}}
|
|
|
|
</p>
|
|
|
|
</div>
|
2021-05-21 20:22:01 +03:00
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
</div>
|
2022-05-12 14:56:43 +03:00
|
|
|
{{#if this.isPaidAvailable}}
|
|
|
|
<div class="gh-publish-send-to-option">
|
|
|
|
<div class="for-checkbox {{if @disabled "disabled"}}">
|
|
|
|
<label class="checkbox" for="send-email-to-paid">
|
|
|
|
<input
|
|
|
|
id="send-email-to-paid"
|
|
|
|
type="checkbox"
|
|
|
|
class="gh-input post-settings-featured"
|
|
|
|
checked={{this.isPaidChecked}}
|
|
|
|
disabled={{@disabled}}
|
|
|
|
aria-label="Paid members toggle"
|
|
|
|
{{on "change" (fn this.toggleFilter "status:-free")}}
|
|
|
|
data-test-checkbox="paid-members"
|
|
|
|
>
|
|
|
|
<div class="flex">
|
|
|
|
<span class="input-toggle-component"></span>
|
|
|
|
<p>
|
|
|
|
Paid
|
|
|
|
{{#let (members-count-fetcher query=(hash filter=(concat @newsletter.recipientFilter "+status:-free"))) as |countFetcher|}}
|
|
|
|
{{#if (not (is-empty countFetcher.count))}}
|
|
|
|
<span class="gh-publish-emailcount" data-test-email-count="paid-members">({{countFetcher.count}})</span>
|
|
|
|
{{/if}}
|
|
|
|
{{/let}}
|
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
</label>
|
|
|
|
</div>
|
2021-05-21 20:22:01 +03:00
|
|
|
</div>
|
|
|
|
{{/if}}
|
2022-05-12 14:56:43 +03:00
|
|
|
{{#if this.specificOptions}}
|
|
|
|
<div class="gh-publish-send-to-option">
|
|
|
|
<div class="for-checkbox {{if @disabled "disabled"}}">
|
|
|
|
<label class="checkbox" for="send-email-to-specific">
|
|
|
|
<input
|
|
|
|
id="send-email-to-specific"
|
|
|
|
type="checkbox"
|
|
|
|
class="gh-input post-settings-featured"
|
|
|
|
checked={{this.isSpecificChecked}}
|
|
|
|
disabled={{@disabled}}
|
|
|
|
aria-label="Specific people toggle"
|
|
|
|
{{on "change" this.toggleSpecificFilter}}
|
|
|
|
data-test-checkbox="paid-members"
|
|
|
|
>
|
|
|
|
<div class="flex">
|
|
|
|
<span class="input-toggle-component"></span>
|
|
|
|
<p>Other</p>
|
|
|
|
</div>
|
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{{#if this.isSpecificChecked}}
|
|
|
|
<GhTokenInput
|
|
|
|
@class="select-members select-members-recipient"
|
|
|
|
@dropdownClass={{@dropdownClass}}
|
|
|
|
@options={{this.specificOptions}}
|
|
|
|
@selected={{this.selectedSpecificOptions}}
|
|
|
|
@disabled={{@disabled}}
|
|
|
|
@searchMessage="All labels selected"
|
|
|
|
@optionsComponent="power-select/options"
|
|
|
|
@allowCreation={{false}}
|
|
|
|
@renderInPlace={{this.renderInPlace}}
|
|
|
|
@onChange={{this.selectSpecificOptions}}
|
|
|
|
as |option|
|
|
|
|
>
|
|
|
|
{{option.name}}
|
|
|
|
</GhTokenInput>
|
|
|
|
{{/if}}
|
|
|
|
{{/if}}
|
|
|
|
</div>
|