fix: class issues

This commit is contained in:
Jannat Patel
2023-02-23 12:40:07 +05:30
parent 99a7c47798
commit d87fb81cf3
14 changed files with 173 additions and 83 deletions
+6 -3
View File
@@ -1,7 +1,10 @@
frappe.ready(function () {
frappe.web_form.after_save = () => {
setTimeout(() => {
window.history.back();
});
let data = frappe.web_form.get_values();
if (data.class) {
setTimeout(() => {
window.location.href = `/classes/${data.class}`;
}, 2000);
}
};
});
+53 -39
View File
@@ -10,7 +10,7 @@
"amount_based_on_field": 0,
"apply_document_permissions": 0,
"button_label": "Save",
"creation": "2022-11-23 11:59:33.533053",
"creation": "2023-02-24 11:59:33.533053",
"doc_type": "LMS Certificate Evaluation",
"docstatus": 0,
"doctype": "Web Form",
@@ -20,7 +20,7 @@
"list_columns": [],
"login_required": 1,
"max_attachment_size": 0,
"modified": "2022-11-25 17:05:30.851109",
"modified": "2022-02-26 17:05:30.851110",
"modified_by": "Administrator",
"module": "LMS",
"name": "evaluation",
@@ -29,8 +29,9 @@
"published": 1,
"route": "evaluation",
"show_attachments": 0,
"show_list": 0,
"show_list": 1,
"show_sidebar": 0,
"success_message": "Evaluation has been submitted successfully.",
"title": "Evaluation",
"web_form_fields": [
{
@@ -59,6 +60,31 @@
"reqd": 1,
"show_in_filter": 0
},
{
"allow_read_on_all_link_options": 0,
"fieldname": "summary",
"fieldtype": "Small Text",
"hidden": 0,
"label": "Summary",
"max_length": 0,
"max_value": 0,
"read_only": 0,
"reqd": 0,
"show_in_filter": 0
},
{
"allow_read_on_all_link_options": 0,
"fieldname": "",
"fieldtype": "Column Break",
"hidden": 0,
"label": "",
"max_length": 0,
"max_value": 0,
"options": "",
"read_only": 0,
"reqd": 0,
"show_in_filter": 0
},
{
"allow_read_on_all_link_options": 0,
"fieldname": "date",
@@ -95,31 +121,6 @@
"reqd": 0,
"show_in_filter": 0
},
{
"allow_read_on_all_link_options": 0,
"fieldname": "",
"fieldtype": "Column Break",
"hidden": 0,
"label": "",
"max_length": 0,
"max_value": 0,
"options": "",
"read_only": 0,
"reqd": 0,
"show_in_filter": 0
},
{
"allow_read_on_all_link_options": 0,
"fieldname": "rating",
"fieldtype": "Rating",
"hidden": 0,
"label": "Rating",
"max_length": 0,
"max_value": 0,
"read_only": 0,
"reqd": 1,
"show_in_filter": 0
},
{
"allow_read_on_all_link_options": 0,
"fieldname": "status",
@@ -134,16 +135,29 @@
"show_in_filter": 0
},
{
"allow_read_on_all_link_options": 0,
"fieldname": "summary",
"fieldtype": "Small Text",
"hidden": 0,
"label": "Summary",
"max_length": 0,
"max_value": 0,
"read_only": 0,
"reqd": 0,
"show_in_filter": 0
}
"allow_read_on_all_link_options": 0,
"fieldname": "rating",
"fieldtype": "Rating",
"hidden": 0,
"label": "Rating",
"max_length": 0,
"max_value": 0,
"read_only": 0,
"reqd": 1,
"show_in_filter": 0
},
{
"allow_read_on_all_link_options": 0,
"fieldname": "class",
"fieldtype": "Link",
"hidden": 0,
"label": "Class",
"max_length": 0,
"max_value": 0,
"options": "LMS Class",
"read_only": 1,
"reqd": 0,
"show_in_filter": 0
}
]
}