fix: better msg on web form save
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
frappe.ready(function() {
|
||||
frappe.web_form.after_save = () => {
|
||||
window.location.href = `/courses/${frappe.web_form.doc.course}`;
|
||||
frappe.web_form.after_save = () => {
|
||||
frappe.msgprint(__("Chapter has been saved successfully. Go back to the course and add this chapter to the chapters table."))
|
||||
setTimeout(() => {
|
||||
window.location.href = `/courses/${frappe.web_form.doc.course}`;
|
||||
}, 3000);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -1,15 +1,16 @@
|
||||
frappe.ready(function() {
|
||||
frappe.web_form.after_save = () => {
|
||||
setTimeout(() => {
|
||||
frappe.call({
|
||||
method: "school.lms.doctype.course_lesson.course_lesson.get_lesson_info",
|
||||
args: {
|
||||
"chapter": frappe.web_form.doc.chapter
|
||||
},
|
||||
callback: (data) => {
|
||||
window.location.href = `/courses/${data.message}`;
|
||||
frappe.msgprint(__(`Lesson has been saved successfully. Go back to the chapter and add this lesson to the lessons table.`));
|
||||
setTimeout(() => {
|
||||
window.location.href = `/courses/${data.message}`;
|
||||
}, 3000);
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user