fix: redirect after login

This commit is contained in:
pateljannat
2021-05-07 18:27:18 +05:30
parent 5edceb2562
commit 911c85bfc8
2 changed files with 4 additions and 4 deletions

View File

@@ -17,7 +17,7 @@ frappe.ready(() => {
$("#apply-now").click((e) => {
e.preventDefault();
if (frappe.session.user == "Guest") {
window.location.href = "/login";
window.location.href = `/login?redirect-to=/courses/${$(e.currentTarget).attr("data-course")}`;
return;
}
frappe.call({
@@ -53,7 +53,7 @@ frappe.ready(() => {
$(".join-batch").click((e) => {
e.preventDefault()
if (frappe.session.user == "Guest") {
window.location.href = "/login";
window.location.href = `/login?redirect-to=/courses/${$(e.currentTarget).attr("data-course")}`;
return;
}
batch = decodeURIComponent($(e.currentTarget).attr("data-batch"))
@@ -70,4 +70,3 @@ frappe.ready(() => {
})
})
})