fix: layout of certification request

This commit is contained in:
Jannat Patel
2023-02-17 10:52:50 +05:30
parent 619a2f9d80
commit 8e1ef1dc77
3 changed files with 26 additions and 10 deletions

View File

@@ -3,7 +3,7 @@
frappe.ui.form.on("LMS Certificate Evaluation", { frappe.ui.form.on("LMS Certificate Evaluation", {
refresh: function (frm) { refresh: function (frm) {
if (frm.doc.status == "Pass") { if (!frm.is_new() && frm.doc.status == "Pass") {
frm.add_custom_button(__("Create LMS Certificate"), () => { frm.add_custom_button(__("Create LMS Certificate"), () => {
frappe.model.open_mapped_doc({ frappe.model.open_mapped_doc({
method: "lms.lms.doctype.lms_certificate_evaluation.lms_certificate_evaluation.create_lms_certificate", method: "lms.lms.doctype.lms_certificate_evaluation.lms_certificate_evaluation.create_lms_certificate",

View File

@@ -3,12 +3,17 @@
frappe.ui.form.on("LMS Certificate Request", { frappe.ui.form.on("LMS Certificate Request", {
refresh: function (frm) { refresh: function (frm) {
frm.add_custom_button(__("Create LMS Certificate Evaluation"), () => { if (!frm.is_new()) {
frm.add_custom_button(
__("Create LMS Certificate Evaluation"),
() => {
frappe.model.open_mapped_doc({ frappe.model.open_mapped_doc({
method: "lms.lms.doctype.lms_certificate_request.lms_certificate_request.create_lms_certificate_evaluation", method: "lms.lms.doctype.lms_certificate_request.lms_certificate_request.create_lms_certificate_evaluation",
frm: frm, frm: frm,
}); });
}); }
);
}
}, },
onload: function (frm) { onload: function (frm) {

View File

@@ -7,12 +7,14 @@
"engine": "InnoDB", "engine": "InnoDB",
"field_order": [ "field_order": [
"course", "course",
"member",
"member_name",
"evaluator", "evaluator",
"column_break_4", "column_break_4",
"member",
"member_name",
"section_break_lifi",
"date", "date",
"day", "day",
"column_break_ddyh",
"start_time", "start_time",
"end_time" "end_time"
], ],
@@ -80,11 +82,19 @@
"fieldtype": "Data", "fieldtype": "Data",
"label": "Member Name", "label": "Member Name",
"read_only": 1 "read_only": 1
},
{
"fieldname": "section_break_lifi",
"fieldtype": "Section Break"
},
{
"fieldname": "column_break_ddyh",
"fieldtype": "Column Break"
} }
], ],
"index_web_pages_for_search": 1, "index_web_pages_for_search": 1,
"links": [], "links": [],
"modified": "2022-04-06 11:33:33.711545", "modified": "2023-02-17 09:26:13.776325",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "LMS", "module": "LMS",
"name": "LMS Certificate Request", "name": "LMS Certificate Request",
@@ -99,6 +109,7 @@
"read": 1, "read": 1,
"report": 1, "report": 1,
"role": "System Manager", "role": "System Manager",
"select": 1,
"share": 1, "share": 1,
"write": 1 "write": 1
} }