Ghost/ghost/admin/app/templates/components/modal-import-members.hbs

48 lines
1.6 KiB
Handlebars
Raw Normal View History

<header class="modal-header" data-test-modal="import-members">
<h1>
{{#if response}}
Import Successful
{{else}}
Import Members
{{/if}}
</h1>
</header>
<a class="close" href="" title="Close" {{action "closeModal"}}>{{svg-jar "close"}}<span class="hidden">Close</span></a>
<div class="modal-body">
{{#if response}}
<table class="members-import-results">
<tr>
<td>Imported:</td>
<td align="left" data-test-text="import-members-imported">{{response.imported}}</td>
</tr>
{{#if response.duplicates}}
<tr>
<td>Duplicates:</td>
<td align="left" data-test-text="import-members-duplicates">{{response.duplicates}}</td>
</tr>
{{/if}}
{{#if response.invalid}}
<tr>
<td>Invalid:</td>
<td align="left" data-test-text="import-members-invalid">{{response.invalid}}</td>
</tr>
{{/if}}
</table>
{{else}}
{{gh-file-uploader
url=uploadUrl
paramName="membersfile"
labelText="Select or drag-and-drop a CSV file."
uploadStarted=(action "uploadStarted")
uploadFinished=(action "uploadFinished")
uploadSuccess=(action "uploadSuccess")}}
{{/if}}
</div>
<div class="modal-footer">
<button {{action "closeModal"}} disabled={{closeDisabled}} class="gh-btn" data-test-button="close-import-members">
<span>{{#if response}}Close{{else}}Cancel{{/if}}</span>
</button>
</div>