FIX: Only confirm bookmark delete if a reminder has been set (#9484)
We do not need a secondary bootbox confirm if the bookmark has no reminder, because nothing really will be lost in that case.
This commit is contained in:
parent
a781ef7662
commit
d123138d3a
|
@ -436,8 +436,7 @@ export default Controller.extend(ModalFunctionality, {
|
||||||
|
|
||||||
delete() {
|
delete() {
|
||||||
this._deleting = true;
|
this._deleting = true;
|
||||||
bootbox.confirm(I18n.t("bookmarks.confirm_delete"), result => {
|
let deleteAction = () => {
|
||||||
if (result) {
|
|
||||||
this._closeWithoutSaving = true;
|
this._closeWithoutSaving = true;
|
||||||
this._deleteBookmark()
|
this._deleteBookmark()
|
||||||
.then(() => {
|
.then(() => {
|
||||||
|
@ -445,8 +444,17 @@ export default Controller.extend(ModalFunctionality, {
|
||||||
this.send("closeModal");
|
this.send("closeModal");
|
||||||
})
|
})
|
||||||
.catch(e => this._handleSaveError(e));
|
.catch(e => this._handleSaveError(e));
|
||||||
|
};
|
||||||
|
|
||||||
|
if (this._existingBookmarkHasReminder()) {
|
||||||
|
bootbox.confirm(I18n.t("bookmarks.confirm_delete"), result => {
|
||||||
|
if (result) {
|
||||||
|
deleteAction();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
} else {
|
||||||
|
deleteAction();
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
closeWithoutSavingBookmark() {
|
closeWithoutSavingBookmark() {
|
||||||
|
|
|
@ -312,7 +312,7 @@ en:
|
||||||
created_with_at_desktop_reminder: "you've bookmarked this post and will be reminded next time you are at your desktop"
|
created_with_at_desktop_reminder: "you've bookmarked this post and will be reminded next time you are at your desktop"
|
||||||
remove: "Remove Bookmark"
|
remove: "Remove Bookmark"
|
||||||
delete: "Delete Bookmark"
|
delete: "Delete Bookmark"
|
||||||
confirm_delete: "Are you sure you want to delete this bookmark? If you set a reminder it will also be deleted."
|
confirm_delete: "Are you sure you want to delete this bookmark? The reminder will also be deleted."
|
||||||
confirm_clear: "Are you sure you want to clear all your bookmarks from this topic?"
|
confirm_clear: "Are you sure you want to clear all your bookmarks from this topic?"
|
||||||
save: "Save"
|
save: "Save"
|
||||||
no_timezone: 'You have not set a timezone yet. You will not be able to set reminders. Set one up <a href="%{basePath}/my/preferences/profile">in your profile</a>.'
|
no_timezone: 'You have not set a timezone yet. You will not be able to set reminders. Set one up <a href="%{basePath}/my/preferences/profile">in your profile</a>.'
|
||||||
|
|
Loading…
Reference in New Issue