Renamed footer setting to newsletterFooterContent

no-issue

This is more generic and matches the setting in the backend.
This commit is contained in:
Fabien O'Carroll 2020-11-13 13:32:29 +00:00
parent fafe7d7b74
commit 65b310d500
3 changed files with 9 additions and 9 deletions

View File

@ -53,8 +53,8 @@
<h4 class="modal-fullsettings-title">Footer content</h4>
<GhTextarea
@name="footer"
@value={{readonly this.footerHtml}}
@input={{this.setFooterHtml}}
@value={{readonly this.footerContent}}
@input={{this.setFooterContent}}
{{!-- The modal listens for key events to close, this stops the textarea from triggering them--}}
{{on "keydown" this.stopPropagation}}
{{on "keypress" this.stopPropagation}}
@ -143,7 +143,7 @@
</div>
<div class="gh-members-emailpreview-footer">
<div class="gh-members-emailpreview-footercontent">
{{this.footerHtml}}
{{this.footerContent}}
</div>
<div class="gh-members-emailpreview-footersite">
<span>Ghost Site &copy; </span> <a href="javascript:">Unsubscribe</a>

View File

@ -21,7 +21,7 @@ export default class ModalEmailDesignSettings extends ModalComponent {
showBadge = this.settings.get('newsletterShowBadge');
@tracked
footerHtml = this.settings.get('newsletterFooterHtml');
footerContent = this.settings.get('newsletterFooterContent');
@action
setShowHeader(event) {
@ -44,8 +44,8 @@ export default class ModalEmailDesignSettings extends ModalComponent {
}
@action
setFooterHtml(event) {
this.footerHtml = event.target.value;
setFooterContent(event) {
this.footerContent = event.target.value;
}
@action
@ -64,8 +64,8 @@ export default class ModalEmailDesignSettings extends ModalComponent {
if (this.showBadge !== null) {
this.settings.set('newsletterShowBadge', this.showBadge);
}
if (this.footerHtml !== null) {
this.settings.set('newsletterFooterHtml', this.footerHtml);
if (this.footerContent !== null) {
this.settings.set('newsletterFooterContent', this.footerContent);
}
yield this.settings.save();
this.closeModal();

View File

@ -73,5 +73,5 @@ export default Model.extend(ValidationEngine, {
newsletterShowHeader: attr('boolean'),
newsletterBodyFontCategory: attr('string'),
newsletterShowBadge: attr('boolean'),
newsletterFooterHtml: attr('string')
newsletterFooterContent: attr('string')
});