mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-20 22:42:53 -05:00
Fixed default sender address when email is managed (#19186)
fixes GRO-74 - uses the calculated setting "default_email_address" as first fallback, if there is no sender email for the newsletter
This commit is contained in:
parent
22c6527c49
commit
3b7dc7555d
3 changed files with 10 additions and 4 deletions
|
@ -13,7 +13,7 @@
|
|||
@triggerComponent={{component "gh-power-select/trigger"}}
|
||||
@triggerClass="gh-preview-newsletter-trigger"
|
||||
@dropdownClass="gh-publish-newsletter-dropdown gh-preview-newsletter-dropdown"
|
||||
@extra={{concat "<" (full-email-address (or this.newsletter.senderEmail "noreply")) ">"}}
|
||||
@extra={{concat "<" (full-email-address (or this.newsletter.senderEmail this.settings.defaultEmailAddress "noreply")) ">"}}
|
||||
@selectedItemComponent={{component "editor/modals/preview/selected-newsletter-label"}}
|
||||
data-test-email-preview-newsletter-select
|
||||
as |option|
|
||||
|
@ -23,7 +23,7 @@
|
|||
{{else}}
|
||||
<p class="gh-preview-newsletter-name">{{this.newsletter.name}} <span
|
||||
class="gh-preview-email-address"><{{full-email-address
|
||||
(or this.newsletter.senderEmail "noreply")}}></span></p>
|
||||
(or this.newsletter.senderEmail this.settings.defaultEmailAddress "noeply")}}></span></p>
|
||||
{{/if}}
|
||||
</div>
|
||||
<div class="gh-email-preview-newsletter-select" data-test-email-preview-segment-select-section>
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
<div class="gh-pe-mobile-screen">
|
||||
<div class="gh-pe-emailclient-sender">
|
||||
<p>
|
||||
<span class="strong">{{or this.newsletter.senderName this.settings.title}}</span> <{{full-email-address (or this.newsletter.senderEmail "noreply")}}>
|
||||
<span class="strong">{{or this.newsletter.senderName this.settings.title}}</span> <{{full-email-address (or this.newsletter.senderEmail this.settings.defaultEmailAddress "noreply")}}>
|
||||
</p>
|
||||
<p><span class="dark">To:</span> Jamie Larson <jamie@example.com></p>
|
||||
</div>
|
||||
|
@ -35,7 +35,7 @@
|
|||
<div class="gh-pe-emailclient-mockup">
|
||||
<div class="gh-pe-emailclient-sender">
|
||||
<p>
|
||||
<span class="strong">{{or this.newsletter.senderName this.settings.title}}</span> <{{full-email-address (or this.newsletter.senderEmail "noreply")}}>
|
||||
<span class="strong">{{or this.newsletter.senderName this.settings.title}}</span> <{{full-email-address (or this.newsletter.senderEmail this.settings.defaultEmailAddress "noreply")}}>
|
||||
</p>
|
||||
<p><span class="dark">To:</span> Jamie Larson <jamie@example.com></p>
|
||||
</div>
|
||||
|
|
|
@ -110,6 +110,12 @@ export default Model.extend(ValidationEngine, {
|
|||
*/
|
||||
recommendationsEnabled: attr('boolean'),
|
||||
|
||||
/**
|
||||
* Newsletter emails
|
||||
*/
|
||||
defaultEmailAddress: attr('string'),
|
||||
supportEmailAddress: attr('string'),
|
||||
|
||||
// HACK - not a real model attribute but a workaround for Ember Data not
|
||||
// exposing meta from save responses
|
||||
_meta: attr()
|
||||
|
|
Loading…
Add table
Reference in a new issue