Added showSubscriptionDetails toggle in admin

refs https://github.com/TryGhost/Team/issues/2737
This commit is contained in:
Simon Backx 2023-03-15 14:44:37 +01:00
parent 80043f2699
commit a5ac2bd470
3 changed files with 19 additions and 0 deletions

View File

@ -225,6 +225,23 @@
</GhFormGroup>
{{/unless}}
{{#if this.membersUtils.isMembersEnabled }}
<GhFormGroup class="gh-stack-item row">
<label for="capture-feedback" class="modal-fullsettings-title" data-test-toggle="showSubscriptionDetails">Show subscription details</label>
<div class="for-switch small">
<div class="container">
<input
type="checkbox"
id="capture-feedback"
checked={{@newsletter.showSubscriptionDetails}}
{{on "change" (fn this.onCheckboxChange "showSubscriptionDetails")}}
>
<button type="button" class="input-toggle-component" {{on "click" (fn this.toggleProperty "showSubscriptionDetails")}}></button>
</div>
</div>
</GhFormGroup>
{{/if}}
<GhFormGroup class="gh-stack-item row">
<label for="latest-posts" class="modal-fullsettings-title" data-test-toggle="feedbackEnabled">Share your latest posts</label>
<div class="for-switch small">

View File

@ -5,6 +5,7 @@ import {inject as service} from '@ember/service';
export default class EditNewsletterDesignForm extends Component {
@service settings;
@service membersUtils;
imageExtensions = IMAGE_EXTENSIONS;

View File

@ -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;