UX: add a confirmation modal to "Remove All Tags" action (#11973)

UX: update label for "Remove Tags" action
This commit is contained in:
Arpit Jalan 2021-02-04 18:30:01 +05:30 committed by GitHub
parent 06225abe93
commit 309adb82ba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 2 deletions

View File

@ -255,7 +255,16 @@ export default Controller.extend(ModalFunctionality, {
},
removeTags() {
this.performAndRefresh({ type: "remove_tags" });
bootbox.confirm(
I18n.t("topics.bulk.confirm_remove_tags", {
count: this.get("model.topics").length,
}),
(result) => {
if (result) {
this.performAndRefresh({ type: "remove_tags" });
}
}
);
},
},
});

View File

@ -2266,7 +2266,10 @@ en:
choose_new_tags: "Choose new tags for these topics:"
choose_append_tags: "Choose new tags to append for these topics:"
changed_tags: "The tags of those topics were changed."
remove_tags: "Remove Tags"
remove_tags: "Remove All Tags"
confirm_remove_tags:
one: "All tags will be removed from this topic. Are you sure?"
other: "All tags will be removed from <b>%{count}</b> topics. Are you sure?"
progress:
one: "Progress: <strong>%{count}</strong> topic"
other: "Progress: <strong>%{count}</strong> topics"