fix: minor UI

This commit is contained in:
Jannat Patel
2022-08-30 12:50:26 +05:30
parent 7a7bc3e0db
commit b3a9274cd3
5 changed files with 48 additions and 38 deletions

View File

@@ -48,25 +48,25 @@
<script>
frappe.ready(() => {
$("#confirm").click((e) => {
frappe.call({
"method": "lms.lms.doctype.lms_batch_membership.lms_batch_membership.create_membership",
"args": {
"batch": {{ batch.name }},
"course": {{ batch.course }}
},
"callback": (data) => {
if (data.message == "OK") {
frappe.msgprint({
message: __("You are now a member of this batch!"),
clear: true
});
setTimeout(function () {
window.location.href = "/courses/{{ batch.course }}/home";
}, 2000);
}
}
})
})
})
frappe.call({
"method": "lms.lms.doctype.lms_batch_membership.lms_batch_membership.create_membership",
"args": {
"batch": {{ batch.name }},
"course": {{ batch.course }}
},
"callback": (data) => {
if (data.message == "OK") {
frappe.msgprint({
message: __("You are now a member of this batch!"),
clear: true
});
setTimeout(function () {
window.location.href = "/courses/{{ batch.course }}/home";
}, 1000);
}
}
});
});
});
</script>
{% endblock %}