Commit 3cd2b97b authored by Nicolas Pernoud's avatar Nicolas Pernoud
Browse files

fix: added object in delete confirmation modal

parent e735f26b
Pipeline #7609 passed with stages
in 2 minutes and 21 seconds
......@@ -225,7 +225,7 @@ function displayApps(inApps) {
document.getElementById(`apps-app-delete-${app.id}`).addEventListener("click", function () {
new Delete(() => {
deleteApp(app);
});
}, app.name);
});
}
if (user.isAdmin || !app.secured || app.roles.some((r) => user.memberOf.includes(r))) {
......
......@@ -208,7 +208,7 @@ function displayDavs(inDavs) {
document.getElementById(`davs-dav-delete-${dav.id}`).addEventListener("click", function () {
new Delete(() => {
deleteDav(dav);
});
}, dav.name);
});
}
if (user.isAdmin || !dav.secured || dav.roles.some((r) => user.memberOf.includes(r))) {
......
......@@ -430,7 +430,7 @@ export class Explorer {
} catch (e) {
HandleError(e);
}
});
}, file.name);
}
async upload(files) {
......
......@@ -170,7 +170,7 @@ function displayUsers() {
document.getElementById(`users-user-delete-${user.id}`).addEventListener("click", function () {
new Delete(() => {
deleteUser(user);
});
}, user.login);
});
});
}
......
......@@ -2,7 +2,7 @@
import { AnimateCSS } from "/services/common/common.js";
export class Delete {
constructor(okFunction) {
constructor(okFunction, what) {
let deleteModal = document.createElement("div");
deleteModal.classList.add("modal", "animate__animated", "animate__fadeIn", "is-active");
deleteModal.innerHTML = /* HTML */ `
......@@ -10,7 +10,7 @@ export class Delete {
<div class="modal-content">
<div class="box">
<div class="field">
<label class="label">Confirm</label>
<label class="label">Confirm deletion of <i>${what}</i> ?</label>
</div>
<div class="field is-grouped">
<div class="control">
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment