2020-01-13 09:20:26 -05:00
|
|
|
{{#d-section class="award-badge"}}
|
2020-01-13 12:44:22 -05:00
|
|
|
<h1>{{i18n "admin.badges.mass_award.title"}}</h1>
|
|
|
|
<p>{{i18n "admin.badges.mass_award.description"}}</p>
|
|
|
|
|
|
|
|
{{#if model}}
|
|
|
|
<form class="form-horizontal">
|
2021-09-20 09:52:03 -04:00
|
|
|
<div class="badge-preview control-group">
|
2020-01-13 12:44:22 -05:00
|
|
|
{{#if model}}
|
|
|
|
{{icon-or-image model}}
|
|
|
|
<span class="badge-display-name">{{model.name}}</span>
|
|
|
|
{{else}}
|
2020-03-11 04:23:10 -04:00
|
|
|
<span class="badge-placeholder">{{i18n "admin.badges.mass_award.no_badge_selected"}}</span>
|
2020-01-13 12:44:22 -05:00
|
|
|
{{/if}}
|
|
|
|
</div>
|
2021-09-20 09:52:03 -04:00
|
|
|
<div class="control-group">
|
2020-03-11 04:23:10 -04:00
|
|
|
<h4>{{i18n "admin.badges.mass_award.upload_csv"}}</h4>
|
2021-07-14 22:53:26 -04:00
|
|
|
<input type="file" id="massAwardCSVUpload" accept=".csv" onchange={{action "updateFileSelected"}}>
|
2020-01-13 12:44:22 -05:00
|
|
|
</div>
|
2021-09-20 09:52:03 -04:00
|
|
|
<div class="control-group">
|
2020-01-23 12:14:58 -05:00
|
|
|
<label>
|
|
|
|
{{input type="checkbox" checked=replaceBadgeOwners}}
|
|
|
|
{{i18n "admin.badges.mass_award.replace_owners"}}
|
|
|
|
</label>
|
2021-07-14 22:53:26 -04:00
|
|
|
{{#if model.multiple_grant}}
|
|
|
|
<label class="grant-existing-holders">
|
|
|
|
{{input type="checkbox" checked=grantExistingHolders class="grant-existing-holders-checkbox"}}
|
|
|
|
{{i18n "admin.badges.mass_award.grant_existing_holders"}}
|
|
|
|
</label>
|
|
|
|
{{/if}}
|
2020-01-23 12:14:58 -05:00
|
|
|
</div>
|
2020-01-13 12:44:22 -05:00
|
|
|
{{d-button
|
|
|
|
class="btn-primary"
|
|
|
|
action=(action "massAward")
|
2020-02-05 09:23:35 -05:00
|
|
|
type="submit"
|
2021-07-14 22:53:26 -04:00
|
|
|
disabled=massAwardButtonDisabled
|
|
|
|
icon="certificate"
|
2020-01-13 12:44:22 -05:00
|
|
|
label="admin.badges.mass_award.perform"}}
|
2021-07-14 22:53:26 -04:00
|
|
|
{{#link-to "adminBadges.index" class="btn btn-normal"}}
|
2020-01-13 13:53:41 -05:00
|
|
|
{{d-icon "times"}}
|
|
|
|
<span>{{i18n "cancel"}}</span>
|
|
|
|
{{/link-to}}
|
2020-01-13 12:44:22 -05:00
|
|
|
</form>
|
2021-07-14 22:53:26 -04:00
|
|
|
{{#if saving}}
|
|
|
|
{{i18n "uploading"}}
|
|
|
|
{{/if}}
|
|
|
|
{{#if resultsMessage}}
|
|
|
|
<p>
|
|
|
|
{{#if success}}
|
|
|
|
{{d-icon "check" class="bulk-award-status-icon success"}}
|
|
|
|
{{else}}
|
|
|
|
{{d-icon "times" class="bulk-award-status-icon failure"}}
|
|
|
|
{{/if}}
|
|
|
|
{{resultsMessage}}
|
|
|
|
</p>
|
|
|
|
{{#if unmatchedEntries.length}}
|
|
|
|
<p>
|
|
|
|
{{d-icon "exclamation-triangle" class="bulk-award-status-icon failure"}}
|
|
|
|
<span>
|
|
|
|
{{#if unmatchedEntriesTruncated}}
|
|
|
|
{{i18n "admin.badges.mass_award.csv_has_unmatched_users_truncated_list" count=unmatchedEntriesCount}}
|
|
|
|
{{else}}
|
|
|
|
{{i18n "admin.badges.mass_award.csv_has_unmatched_users"}}
|
|
|
|
{{/if}}
|
|
|
|
</span>
|
|
|
|
</p>
|
|
|
|
<ul>
|
|
|
|
{{#each unmatchedEntries as |entry|}}
|
|
|
|
<li>{{entry}}</li>
|
|
|
|
{{/each}}
|
|
|
|
</ul>
|
|
|
|
{{/if}}
|
|
|
|
{{/if}}
|
2020-01-13 12:44:22 -05:00
|
|
|
{{else}}
|
2020-03-11 04:23:10 -04:00
|
|
|
<span class="badge-required">{{i18n "admin.badges.mass_award.no_badge_selected"}}</span>
|
2020-01-13 12:44:22 -05:00
|
|
|
{{/if}}
|
|
|
|
{{/d-section}}
|