mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-25 09:03:12 +03:00
ca6de51cc5
closes https://github.com/TryGhost/Team/issues/1039 - we had duplicate components for members setting form, `gh-members-settings-form` and `gh-members-settings-form-cp`, with the `-cp` version added as part of original tiers changes - since are only using the "-cp" version now, the old form is now removed and cp version renamed to the original naming
90 lines
2.9 KiB
Handlebars
90 lines
2.9 KiB
Handlebars
<section class="gh-canvas">
|
|
<GhCanvasHeader class="gh-canvas-header">
|
|
<h2 class="gh-canvas-title" data-test-screen-title>
|
|
<LinkTo @route="members" data-test-link="members-back">Members</LinkTo>
|
|
<span>{{svg-jar "arrow-right"}}</span>
|
|
{{#if this.member.isNew}}
|
|
New member
|
|
{{else}}
|
|
{{or this.member.name this.member.email}}
|
|
{{/if}}
|
|
</h2>
|
|
|
|
<section class="view-actions">
|
|
{{#if this.session.user.isAdmin}}
|
|
{{#unless this.member.isNew}}
|
|
<button
|
|
class="gh-btn gh-btn-white gh-btn-icon mr2"
|
|
{{on "click" this.toggleImpersonateMemberModal}}>
|
|
<span>Impersonate</span>
|
|
</button>
|
|
{{/unless}}
|
|
{{/if}}
|
|
|
|
<GhTaskButton @class="gh-btn gh-btn-primary gh-btn-icon" @type="button" @task={{this.saveTask}} @data-test-button="save" />
|
|
</section>
|
|
</GhCanvasHeader>
|
|
|
|
<div>
|
|
<form class="member-basic-info-form">
|
|
<GhMemberSettingsForm
|
|
@member={{this.member}}
|
|
@scratchMember={{this.scratchMember}}
|
|
@setProperty={{this.setProperty}}
|
|
@onLabelEdit={{this.editLabel}}
|
|
@saveMember={{this.save}}
|
|
@isSaveRunning={{this.saveTask.isRunning}}
|
|
@isLoading={{this.isLoading}} />
|
|
</form>
|
|
|
|
{{#unless this.member.isNew}}
|
|
<div class="gh-main-section">
|
|
<div class="gh-main-section-block">
|
|
<button
|
|
type="button"
|
|
class="gh-btn gh-btn-red gh-btn-icon"
|
|
{{on "click" this.toggleDeleteMemberModal}}
|
|
data-test-button="delete-member"
|
|
>
|
|
<span>Delete member</span>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
{{/unless}}
|
|
</div>
|
|
</section>
|
|
|
|
{{#if this.showUnsavedChangesModal}}
|
|
<GhFullscreenModal
|
|
@modal="leave-settings"
|
|
@confirm={{this.leaveScreen}}
|
|
@close={{this.toggleUnsavedChangesModal}}
|
|
@modifier="action wide" />
|
|
{{/if}}
|
|
|
|
{{#if this.showDeleteMemberModal}}
|
|
<GhFullscreenModal
|
|
@modal="delete-member"
|
|
@model={{this.member}}
|
|
@confirm={{this.deleteMember}}
|
|
@close={{this.toggleDeleteMemberModal}}
|
|
@modifier="action wide" />
|
|
{{/if}}
|
|
|
|
{{#if this.showImpersonateMemberModal}}
|
|
<GhFullscreenModal
|
|
@modal="impersonate-member"
|
|
@model={{this.member}}
|
|
@close={{this.toggleImpersonateMemberModal}}
|
|
@modifier="action wide" />
|
|
{{/if}}
|
|
|
|
{{#if this.showLabelModal}}
|
|
<GhFullscreenModal
|
|
@modal="members-label-form"
|
|
@model={{this.labelModalData}}
|
|
@close={{this.toggleLabelModal}}
|
|
@modifier="action wide"
|
|
/>
|
|
{{/if}}
|