mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-29 07:09:48 +03:00
5d598d5e50
refs https://github.com/TryGhost/Team/issues/637 With custom products it's possible to change the name and description of any price. This assumes that people would want to change the same properties of a Free membership, and wires up the values for free membership price settings to API Co-authored-by: Peter Zimon <zimo@ghost.org>
68 lines
3.1 KiB
Handlebars
68 lines
3.1 KiB
Handlebars
<header class="modal-header" data-test-modal="webhook-form">
|
|
<h1 data-test-text="title">Free membership settings</h1>
|
|
</header>
|
|
<button class="close" href title="Close" {{action "closeModal"}} {{action (optional this.noop) on="mouseDown"}}>
|
|
{{svg-jar "close"}}
|
|
</button>
|
|
|
|
<form>
|
|
<div class="modal-body">
|
|
<div class="gh-main-section-block">
|
|
<div class="gh-main-section-content grey gh-product-priceform-block">
|
|
<GhFormGroup @errors={{this.price.errors}} @hasValidated={{this.price.hasValidated}} @property="name">
|
|
<label for="name" class="fw6">Portal display name</label>
|
|
<GhTextInput
|
|
@value={{readonly this.settings.membersFreePriceName}}
|
|
@input={{action "updateName" value="target.value"}}
|
|
@name="name"
|
|
@id="name"
|
|
@class="gh-input" />
|
|
<GhErrorMessage @errors={{this.price.errors}} @property="name" />
|
|
</GhFormGroup>
|
|
<GhFormGroup @errors={{this.price.errors}} @hasValidated={{this.price.hasValidated}} @property="description">
|
|
<label for="description" class="fw6">Description</label>
|
|
<GhTextInput
|
|
@value={{readonly this.settings.membersFreePriceDescription}}
|
|
@input={{action "updateDescription" value="target.value"}}
|
|
@name="description"
|
|
@id="description"
|
|
@class="gh-input" />
|
|
<GhErrorMessage @errors={{this.price.errors}} @property="description" />
|
|
</GhFormGroup>
|
|
<GhFormGroup @errors={{this.price.errors}} @hasValidated={{this.price.hasValidated}} @property="welcome-page">
|
|
<label for="welcome-page" class="fw6">Welcome page</label>
|
|
<GhUrlInput
|
|
@value={{readonly this.settings.membersFreeSignupRedirect}}
|
|
@baseUrl={{readonly this.siteUrl}}
|
|
@setResult={{action "setFreeSignupRedirect"}}
|
|
@validateUrl={{action "validateFreeSignupRedirect"}}
|
|
@placeholder={{readonly this.siteUrl}}
|
|
/>
|
|
<GhErrorMessage
|
|
@errors={{settings.errors}}
|
|
@property="membersFreeSignupRedirect"
|
|
/>
|
|
<p>Redirect to this URL after signing up for a free membership</p>
|
|
<GhErrorMessage @errors={{this.price.errors}} @property="welcome-page" />
|
|
</GhFormGroup>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
|
|
<div class="modal-footer">
|
|
<button
|
|
class="gh-btn"
|
|
{{action "closeModal"}}
|
|
{{!-- disable mouseDown so it doesn't trigger focus-out validations --}}
|
|
{{!-- {{action (optional this.noop) on="mouseDown"}} --}}
|
|
data-test-button="cancel-webhook"
|
|
>
|
|
<span>Cancel</span>
|
|
</button>
|
|
<GhTaskButton @buttonText="Save"
|
|
{{!-- @successText={{this.successText}} --}}
|
|
@task={{this.save}}
|
|
@class="gh-btn gh-btn-black gh-btn-icon"
|
|
data-test-button="save-price" />
|
|
</div> |