0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-04-01 02:41:39 -05:00

Added signup terms to Portal

fixes https://github.com/TryGhost/Team/issues/2680

Co-authored-by: Fabien 'egg' O'Carroll <fabien@allou.is>
Co-authored-by: Sanne de Vries <sannedv@protonmail.com>
This commit is contained in:
Simon Backx 2023-04-12 12:08:59 +02:00
parent ab1ca90779
commit fc05604d27

View file

@ -139,44 +139,42 @@
{{/if}}
</div>
{{#if (feature "makingItRain")}}
<GhFormGroup class="gh-stack-item mt5 mb5" @errors={{this.settings.errors}} @hasValidated={{this.settings.hasValidated}}>
<label class="modal-fullsettings-title">Display notice at signup</label>
<KoenigBasicHtmlInput
@name="footer"
@html={{this.settings.portalSignupTermsHtml}}
@class="miw-100 form-text gh-members-emailsettings-footer-input"
@placeholder="By signing up, I agree to receive emails from {{this.config.blogTitle}}."
@onChange={{action "setTermsHtml"}}
/>
<GhErrorMessage @errors={{this.settings.errors}} @property="portalSignupTermsHtml" />
<p>
Recommended: <strong>{{this.maxTermsLength}}</strong> characters.
You've used {{gh-count-down-html-characters this.settings.portalSignupTermsHtml this.maxTermsLength}}
</p>
</GhFormGroup>
<GhFormGroup class="gh-stack-item mt5 mb5" @errors={{this.settings.errors}} @hasValidated={{this.settings.hasValidated}}>
<label class="modal-fullsettings-title">Display notice at signup</label>
<KoenigBasicHtmlInput
@name="footer"
@html={{this.settings.portalSignupTermsHtml}}
@class="miw-100 form-text gh-members-emailsettings-footer-input"
@placeholder="By signing up, I agree to receive emails from {{this.config.blogTitle}}."
@onChange={{action "setTermsHtml"}}
/>
<GhErrorMessage @errors={{this.settings.errors}} @property="portalSignupTermsHtml" />
<p>
Recommended: <strong>{{this.maxTermsLength}}</strong> characters.
You've used {{gh-count-down-html-characters this.settings.portalSignupTermsHtml this.maxTermsLength}}
</p>
</GhFormGroup>
<GhFormGroup class="gh-members-subscribed-checkbox gh-portal-setting-first mb0 b--whitegrey space-l">
<div class="flex justify-between items-center">
<h4 class="gh-portal-setting-title">Require agreement</h4>
<div class="for-switch small">
<label
class="switch"
for="portal-signup-checkbox-required-checkbox"
<GhFormGroup class="gh-members-subscribed-checkbox gh-portal-setting-first mb0 b--whitegrey space-l">
<div class="flex justify-between items-center">
<h4 class="gh-portal-setting-title">Require agreement</h4>
<div class="for-switch small">
<label
class="switch"
for="portal-signup-checkbox-required-checkbox"
>
<input
type="checkbox"
checked={{this.settings.portalSignupCheckboxRequired}}
id="portal-signup-checkbox-required-checkbox"
name="portal-signup-checkbox-required-checkbox"
onclick={{action "toggleSignupCheckboxRequired" value="target.checked"}}
>
<input
type="checkbox"
checked={{this.settings.portalSignupCheckboxRequired}}
id="portal-signup-checkbox-required-checkbox"
name="portal-signup-checkbox-required-checkbox"
onclick={{action "toggleSignupCheckboxRequired" value="target.checked"}}
>
<span class="input-toggle-component"></span>
</label>
</div>
<span class="input-toggle-component"></span>
</label>
</div>
</GhFormGroup>
{{/if}}
</div>
</GhFormGroup>
</div>
{{/liquid-if}}
{{/let}}