diff --git a/community/www/courses/course.html b/community/www/courses/course.html
index b0ecb270..c3fd5f8d 100644
--- a/community/www/courses/course.html
+++ b/community/www/courses/course.html
@@ -88,7 +88,8 @@
{% if can_manage %}
Manage
{% else %}
-
+
{% endif %}
diff --git a/community/www/courses/course.js b/community/www/courses/course.js
index 3ac859b8..ae77bdb0 100644
--- a/community/www/courses/course.js
+++ b/community/www/courses/course.js
@@ -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(() => {
})
})
})
-