Added "email when published" toggle to publish menu

This commit is contained in:
Kevin Ansfield 2019-11-04 12:41:38 +07:00
parent 3c850068db
commit ff5f46ae1b
2 changed files with 13 additions and 0 deletions

View File

@ -106,6 +106,7 @@ export default Model.extend(Comparable, ValidationEngine, {
updatedBy: attr('number'),
url: attr('string'),
uuid: attr('string'),
sendEmailWhenPublished: attr('boolean', {defaultValue: false}),
authors: hasMany('user', {
embedded: 'always',

View File

@ -24,4 +24,16 @@
<div class="gh-publishmenu-radio-desc">Set automatic future publish date</div>
</div>
</div>
<div class="flex mb4">
<div class="for-switch mr3">
<label class="switch" for="email-when-published-checkbox">
<Input @checked={{this.post.sendEmailWhenPublished}} @type="checkbox" @id="email-when-published-checkbox" @name="email-when-published" />
<span class="input-toggle-component"></span>
</label>
</div>
<div class="flex-grow-1">
<div class="gh-publishmenu-radio-label">Email to members</div>
<div class="gh-publishmenu-radio-desc">Send email when published</div>
</div>
</div>
</section>