Fix: bulk add - delete existing link
Do not send redirect response in bookmark delete controller if the request comes from bulk creation page. Fixes #1683
This commit is contained in:
parent
ffa39719a1
commit
93175b6e9d
3 changed files with 50 additions and 3 deletions
assets/common/js
|
@ -26,9 +26,9 @@ const sendBookmarkForm = (basePath, formElement) => {
|
|||
const sendBookmarkDelete = (buttonElement, formElement) => (
|
||||
new Promise((resolve, reject) => {
|
||||
const xhr = new XMLHttpRequest();
|
||||
xhr.open('GET', buttonElement.href);
|
||||
xhr.open('GET', `${buttonElement.href}&source=batch`);
|
||||
xhr.onload = () => {
|
||||
if (xhr.status !== 200) {
|
||||
if (xhr.status !== 204) {
|
||||
alert(`An error occurred. Return code: ${xhr.status}`);
|
||||
reject();
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue