crud with conditions
This commit is contained in:
+8
-1
@@ -13,7 +13,14 @@ function documentReady() {
|
||||
openDialog.close();
|
||||
window.location.reload();
|
||||
} else {
|
||||
document.querySelector("dialog").showModal()
|
||||
const dialog = document.querySelector("dialog")
|
||||
if (iframe.contentWindow.location.href.split("/").pop() === "create") {
|
||||
dialog.className = 'create';
|
||||
} else {
|
||||
dialog.className = 'update';
|
||||
}
|
||||
dialog.showModal()
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user