mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-23 02:41:50 +03:00
1b85b9244b
no issue - moved duplicated email domain generation from `members-email` controller and `<GhMembersEmailSetting>` to `config.emailDomain` - added `{{from-email-address emailStr}}` helper that will output the passed in emailStr value if it contains an `@` or concat `emailStr@emailDomain` if it doesn't - lets us use `settings.membersFromAddress` to always get a full email address when it could be just a name (`noreply`) or a full address - updated customise email and post email preview templates to use the new helper
35 lines
1.6 KiB
Handlebars
35 lines
1.6 KiB
Handlebars
<div class="gh-post-preview-email-container">
|
|
<div class="gh-post-preview-email-mockup">
|
|
<div class="gh-pe-emailclient-sender">
|
|
<p>
|
|
<span class="strong">{{this.config.blogTitle}}</span> <{{full-email-address this.settings.membersFromAddress}}>
|
|
</p>
|
|
<p><span class="dark">To:</span> Jamie Larson <jamie@example.com></p>
|
|
</div>
|
|
<iframe class="gh-pe-iframe" {{did-insert this.renderEmailPreview}} sandbox="allow-same-origin allow-popups"></iframe>
|
|
</div>
|
|
</div>
|
|
<div class="gh-post-preview-email-footer">
|
|
<span class="mr3 nowrap fw6 f8 darkgrey">Send a test newsletter</span>
|
|
|
|
<div class="gh-post-preview-email-input {{if this.sendPreviewEmailError "error"}}" {{did-insert this.initPreviewEmailAddress}}>
|
|
<Input
|
|
@value={{this.previewEmailAddress}}
|
|
class="gh-input gh-post-preview-email-input"
|
|
placeholder="you@yoursite.com"
|
|
aria-invalid={{if this.sendPreviewEmailError "true"}}
|
|
aria-describedby={{if this.sendPreviewEmailError "sendError"}}
|
|
{{on-key "Enter" (perform this.sendPreviewEmailTask)}}
|
|
/>
|
|
{{#if this.sendPreviewEmailError}}
|
|
<div class="error fixed nowrap f8 lh-heading"><span class="response" id="sendError">{{this.sendPreviewEmailError}}</span></div>
|
|
{{/if}}
|
|
</div>
|
|
<GhTaskButton
|
|
@task={{this.sendPreviewEmailTask}}
|
|
@buttonText="Send"
|
|
@successText="Sent"
|
|
@runningText="Sending..."
|
|
@class="gh-btn gh-btn-green gh-btn-icon gh-post-preview-email-trigger"
|
|
/>
|
|
</div> |