From a5ac2bd4708ee560defed09fa3bd67e39cbcf4a6 Mon Sep 17 00:00:00 2001 From: Simon Backx Date: Wed, 15 Mar 2023 14:44:37 +0100 Subject: [PATCH] Added showSubscriptionDetails toggle in admin refs https://github.com/TryGhost/Team/issues/2737 --- .../modals/newsletters/edit/design-labs.hbs | 17 +++++++++++++++++ .../modals/newsletters/edit/design-labs.js | 1 + ghost/admin/app/models/newsletter.js | 1 + 3 files changed, 19 insertions(+) diff --git a/ghost/admin/app/components/modals/newsletters/edit/design-labs.hbs b/ghost/admin/app/components/modals/newsletters/edit/design-labs.hbs index 9896f6db04..e013518ae5 100644 --- a/ghost/admin/app/components/modals/newsletters/edit/design-labs.hbs +++ b/ghost/admin/app/components/modals/newsletters/edit/design-labs.hbs @@ -225,6 +225,23 @@ {{/unless}} + {{#if this.membersUtils.isMembersEnabled }} + + +
+
+ + +
+
+
+ {{/if}} +
diff --git a/ghost/admin/app/components/modals/newsletters/edit/design-labs.js b/ghost/admin/app/components/modals/newsletters/edit/design-labs.js index 19228e75b1..1193151740 100644 --- a/ghost/admin/app/components/modals/newsletters/edit/design-labs.js +++ b/ghost/admin/app/components/modals/newsletters/edit/design-labs.js @@ -5,6 +5,7 @@ import {inject as service} from '@ember/service'; export default class EditNewsletterDesignForm extends Component { @service settings; + @service membersUtils; imageExtensions = IMAGE_EXTENSIONS; diff --git a/ghost/admin/app/models/newsletter.js b/ghost/admin/app/models/newsletter.js index 3ce34796d1..bc33f58841 100644 --- a/ghost/admin/app/models/newsletter.js +++ b/ghost/admin/app/models/newsletter.js @@ -25,6 +25,7 @@ export default class Newsletter extends Model.extend(ValidationEngine) { @attr({defaultValue: true}) showHeaderName; @attr({defaultValue: true}) showPostTitleSection; @attr({defaultValue: true}) showCommentCta; + @attr({defaultValue: false}) showSubscriptionDetails; @attr({defaultValue: 'sans_serif'}) titleFontCategory; @attr({defaultValue: 'center'}) titleAlignment; @attr({defaultValue: true}) showFeatureImage;