mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FEATURE: Replace existing badge owners when using the bulk award feature (#8770)
* FEATURE: Replace existing badge owners when using the bulk award feature * Use ActiveRecord to sanitize title update query, Change replace checkbox text Co-Authored-By: Robin Ward <robin.ward@gmail.com> Co-authored-by: Robin Ward <robin.ward@gmail.com>
This commit is contained in:
@@ -4,6 +4,7 @@ import { popupAjaxError } from "discourse/lib/ajax-error";
|
||||
|
||||
export default Controller.extend({
|
||||
saving: false,
|
||||
replaceBadgeOwners: false,
|
||||
|
||||
actions: {
|
||||
massAward() {
|
||||
@@ -18,6 +19,7 @@ export default Controller.extend({
|
||||
};
|
||||
|
||||
options.data.append("file", file);
|
||||
options.data.append("replace_badge_owners", this.replaceBadgeOwners);
|
||||
|
||||
this.set("saving", true);
|
||||
|
||||
|
||||
@@ -16,6 +16,12 @@
|
||||
<h4>{{I18n 'admin.badges.mass_award.upload_csv'}}</h4>
|
||||
<input type='file' id='massAwardCSVUpload' accept='.csv' />
|
||||
</div>
|
||||
<div>
|
||||
<label>
|
||||
{{input type="checkbox" checked=replaceBadgeOwners}}
|
||||
{{i18n 'admin.badges.mass_award.replace_owners'}}
|
||||
</label>
|
||||
</div>
|
||||
{{d-button
|
||||
class="btn-primary"
|
||||
action=(action 'massAward')
|
||||
|
||||
Reference in New Issue
Block a user