Ghost/ghost/admin/app/components/gh-publishmenu-draft.hbs
Kevin Ansfield 7ab0db9be7 Fixed ember-test-selectors bound attributes deprecations
no issue

- converted publish menu and `gh-tags-list-item` components to glimmer syntax so data attributes can be passed in via `...attributes`
- added explicit `data-test-button` bound attribute to `gh-task-button` component
- moved `modal-theme-warnings` auto-bound data attribute from JS file to explicit html attribute in template
2021-07-08 22:44:52 +01:00

55 lines
3.0 KiB
Handlebars

<div {{did-insert (fn this.setSaveType "publish")}} ...attributes>
<header class="gh-publishmenu-heading">Ready to publish your {{@post.displayName}}?</header>
<section class="gh-publishmenu-content">
<div class="gh-publishmenu-section">
<div class="gh-publishmenu-radio {{if (eq @saveType "publish") "active"}}" {{on "click" (fn this.setSaveType "publish")}}>
<div class="gh-publishmenu-radio-button" data-test-publishmenu-published-option></div>
<div class="gh-publishmenu-radio-content">
<div class="gh-publishmenu-radio-label">Set it live now</div>
<div class="gh-publishmenu-radio-desc">Publish this {{@post.displayName}} immediately</div>
</div>
</div>
<div class="gh-publishmenu-radio {{if (eq @saveType "schedule") "active"}}" {{on "click" (fn this.setSaveType "schedule")}}>
<div class="gh-publishmenu-radio-button" data-test-publishmenu-scheduled-option></div>
<div class="gh-publishmenu-radio-content">
<div class="gh-publishmenu-radio-label">Schedule it for later</div>
<GhDateTimePicker
@date={{@post.publishedAtBlogDate}}
@time={{@post.publishedAtBlogTime}}
@setDate={{this.setDate}}
@setTime={{this.setTime}}
@setTypedDateError={{@setTypedDateError}}
@errors={{@post.errors}}
@dateErrorProperty="publishedAtBlogDate"
@timeErrorProperty="publishedAtBlogTime"
@minDate={{this._minDate}}
@isActive={{eq @saveType "schedule"}}
/>
<div class="gh-publishmenu-radio-desc">Set automatic future publish date</div>
</div>
</div>
</div>
{{#if @canSendEmail}}
<div class="gh-publishmenu-section" {{did-insert (perform this.countTotalMembersTask)}}>
<div class="gh-publishmenu-email">
{{#if @isSendingEmailLimited}}
<p class="gh-box gh-box-alert">{{html-safe @sendingEmailLimitError}}</p>
{{else}}
<div class="gh-publishmenu-email-label {{if this.disableEmailOption "pe-none"}}">
<label class="gh-publishmenu-radio-label mb3 {{if this.disableEmailOption "midgrey"}}">Send by email to</label>
<div class="form-group">
<GhMembersRecipientSelect
@filter={{@recipientsFilter}}
@onChange={{@setSendEmailWhenPublished}}
@disabled={{this.disableEmailOption}}
/>
</div>
</div>
{{/if}}
</div>
</div>
{{/if}}
</section>
</div>