Cancel button in User edit now leads to the right page back #1938

This commit is contained in:
Ozzie Isaacs
2021-04-17 18:30:55 +02:00
parent 39bbee0eeb
commit c0a4addf30
6 changed files with 23 additions and 6 deletions

View File

@ -114,6 +114,20 @@ $(document).ready(function() {
}
});
$(".session").click(function() {
window.sessionStorage.setItem("back", window.location.pathname);
});
$("#back").click(function() {
var loc = sessionStorage.getItem("back");
if (!loc) {
loc = $(this).data("back");
}
sessionStorage.removeItem("back");
window.location.href = loc;
});
function confirmDialog(id, dialogid, dataValue, yesFn, noFn) {
var $confirm = $("#" + dialogid);
$confirm.modal('show');