mirror of
https://github.com/discourse/discourse.git
synced 2026-08-10 04:58:31 -05:00
Merge pull request #6761 from mrfinch/saurabh/show-popup
FIX:show popup before bulk invite
This commit is contained in:
committed by
Gerhard Schlager
parent
126be6c478
commit
f4d8a330c3
@@ -25,5 +25,22 @@ export default Em.Component.extend(UploadMixin, {
|
||||
|
||||
uploadDone() {
|
||||
bootbox.alert(I18n.t("user.invited.bulk_invite.success"));
|
||||
}
|
||||
},
|
||||
|
||||
uploadOptions() {
|
||||
return { autoUpload: false };
|
||||
},
|
||||
|
||||
_init: function() {
|
||||
const $upload = this.$();
|
||||
|
||||
$upload.on("fileuploadadd", (e, data) => {
|
||||
bootbox.confirm(
|
||||
I18n.t("user.invited.bulk_invite.confirmation_message"),
|
||||
I18n.t("cancel"),
|
||||
I18n.t("go_ahead"),
|
||||
result => (result ? data.submit() : data.abort())
|
||||
);
|
||||
});
|
||||
}.on("didInsertElement")
|
||||
});
|
||||
|
||||
@@ -96,7 +96,9 @@ export default Em.Mixin.create({
|
||||
});
|
||||
|
||||
$upload.on("fileuploadfail", (e, data) => {
|
||||
displayErrorForUpload(data);
|
||||
if (!data || (data && data.errorThrown !== "abort")) {
|
||||
displayErrorForUpload(data);
|
||||
}
|
||||
reset();
|
||||
});
|
||||
}.on("didInsertElement"),
|
||||
|
||||
Reference in New Issue
Block a user