fix: replaced some dialogs with alerts

This commit is contained in:
Jannat Patel
2022-06-06 11:15:06 +05:30
parent 55a770f129
commit 1f3806a7bd
12 changed files with 89 additions and 74 deletions

View File

@@ -1,6 +1,9 @@
frappe.ready(function() {
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."))
frappe.show_alert({
message:__("Chapter has been saved successfully. Go back to the course and add this chapter to the chapters table."),
indicator:'green'
}, 3);
setTimeout(() => {
window.location.href = `/courses/${frappe.web_form.doc.course}`;
}, 3000);

View File

@@ -49,10 +49,13 @@ const show_upload_modal = () => {
};
const show_success_message = () => {
frappe.msgprint(__(`Lesson has been saved successfully. Go back to the chapter and add this lesson to the lessons table.`));
frappe.show_alert({
message: __(`Lesson has been saved successfully. Go back to the chapter and add this lesson to the lessons table.`),
indicator:'green'
}, 3);
setTimeout(() => {
window.location.href = `/courses/${this.course}`;
}, 2000);
}, 3000);
};
const add_file_upload_component = () => {

View File

@@ -22,7 +22,7 @@
"is_standard": 1,
"login_required": 1,
"max_attachment_size": 0,
"modified": "2022-02-23 09:32:37.352930",
"modified": "2022-06-06 10:38:37.784113",
"modified_by": "Administrator",
"module": "LMS",
"name": "profile",
@@ -83,7 +83,7 @@
"max_length": 0,
"max_value": 0,
"read_only": 0,
"reqd": 0,
"reqd": 1,
"show_in_filter": 0
},
{
@@ -244,7 +244,7 @@
"max_value": 0,
"options": "Work Experience",
"read_only": 0,
"reqd": 1,
"reqd": 0,
"show_in_filter": 0
},
{