mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-27 22:49:56 -05:00
Wired up showCommentCTA in admin
fixes https://github.com/TryGhost/Team/issues/2726 This makes sure the toggle actually saves to the database, and that the toggle is only shown when comments is enabled.
This commit is contained in:
parent
bb019a0ab5
commit
56cbb15e37
2 changed files with 7 additions and 6 deletions
|
@ -208,22 +208,22 @@
|
|||
</GhFormGroup>
|
||||
{{/if}}
|
||||
|
||||
{{!-- {{#if @site.comments_enabled}} --}}
|
||||
{{#unless (eq this.settings.commentsEnabled 'off') }}
|
||||
<GhFormGroup class="gh-stack-item row">
|
||||
<label for="comments-link" class="modal-fullsettings-title" data-test-toggle="feedbackEnabled">Add a link to your comments</label>
|
||||
<label for="comments-link" class="modal-fullsettings-title" data-test-toggle="showCommentCta">Add a link to your comments</label>
|
||||
<div class="for-switch small">
|
||||
<div class="container">
|
||||
<input
|
||||
type="checkbox"
|
||||
id="comments-link"
|
||||
checked={{@newsletter.feedbackEnabled}}
|
||||
{{on "change" (fn this.onCheckboxChange "feedbackEnabled")}}
|
||||
checked={{@newsletter.showCommentCta}}
|
||||
{{on "change" (fn this.onCheckboxChange "showCommentCta")}}
|
||||
>
|
||||
<button type="button" class="input-toggle-component" {{on "click" (fn this.toggleProperty "feedbackEnabled")}}></button>
|
||||
<button type="button" class="input-toggle-component" {{on "click" (fn this.toggleProperty "showCommentCta")}}></button>
|
||||
</div>
|
||||
</div>
|
||||
</GhFormGroup>
|
||||
{{!-- {{/if}} --}}
|
||||
{{/unless}}
|
||||
|
||||
<GhFormGroup class="gh-stack-item row">
|
||||
<label for="latest-posts" class="modal-fullsettings-title" data-test-toggle="feedbackEnabled">Share your latest posts</label>
|
||||
|
|
|
@ -24,6 +24,7 @@ export default class Newsletter extends Model.extend(ValidationEngine) {
|
|||
@attr({defaultValue: true}) showHeaderTitle;
|
||||
@attr({defaultValue: true}) showHeaderName;
|
||||
@attr({defaultValue: true}) showPostTitleSection;
|
||||
@attr({defaultValue: true}) showCommentCta;
|
||||
@attr({defaultValue: 'sans_serif'}) titleFontCategory;
|
||||
@attr({defaultValue: 'center'}) titleAlignment;
|
||||
@attr({defaultValue: true}) showFeatureImage;
|
||||
|
|
Loading…
Add table
Reference in a new issue