Skip to content
This repository has been archived by the owner on Nov 28, 2022. It is now read-only.

Commit

Permalink
Hid email toggle on scheduled state of publish menu if email already …
Browse files Browse the repository at this point in the history
…sent
  • Loading branch information
kevinansfield committed Nov 14, 2019
1 parent 1a51241 commit 93b8922
Showing 1 changed file with 24 additions and 22 deletions.
46 changes: 24 additions & 22 deletions app/templates/components/gh-publishmenu-scheduled.hbs
Expand Up @@ -26,29 +26,31 @@
</div>
</div>
</section>
<section class="gh-publishmenu-section">
<div class="gh-publishmenu-radio gh-publishmenu-email">
{{#if this.backgroundLoader.isRunning}}
<div class="gh-loading-spinner" style="zoom: 50%"></div>
{{else}}
<div class="gh-publishmenu-email-label">
<label class="gh-publishmenu-radio-label pe-none midgrey"
for="email-when-published-checkbox">Send by email</label>
{{#if this.memberCount}}
<div class="gh-publishmenu-radio-desc">Deliver post to members</div>
{{#unless this.post.email}}
<section class="gh-publishmenu-section">
<div class="gh-publishmenu-radio gh-publishmenu-email">
{{#if this.backgroundLoader.isRunning}}
<div class="gh-loading-spinner" style="zoom: 50%"></div>
{{else}}
<div class="gh-publishmenu-radio-desc">You haven't got any members</div>
{{/if}}
</div>
<div class="for-switch small pe-none">
<div class="switch container" for="email-when-published-checkbox">
<Input @checked={{post.sendEmailWhenPublished}} @type="checkbox" @id="email-when-published-checkbox"
@name="email-when-published" @disabled={{disableEmailOption}} />
<span class="input-toggle-component gh-publishmenu-email-checkbox"
{{on "click" (toggle "sendEmailWhenPublished" this)}}></span>
<div class="gh-publishmenu-email-label">
<label class="gh-publishmenu-radio-label pe-none midgrey"
for="email-when-published-checkbox">Send by email</label>
{{#if this.memberCount}}
<div class="gh-publishmenu-radio-desc">Deliver post to members</div>
{{else}}
<div class="gh-publishmenu-radio-desc">You haven't got any members</div>
{{/if}}
</div>
<div class="for-switch small pe-none">
<div class="switch container" for="email-when-published-checkbox">
<Input @checked={{post.sendEmailWhenPublished}} @type="checkbox" @id="email-when-published-checkbox"
@name="email-when-published" @disabled={{disableEmailOption}} />
<span class="input-toggle-component gh-publishmenu-email-checkbox"
{{on "click" (toggle "sendEmailWhenPublished" this)}}></span>
</div>
</div>
{{/if}}
</div>
{{/if}}
</div>
</section>
</section>
{{/unless}}
</div>

0 comments on commit 93b8922

Please sign in to comment.