Revert "link the different doctype in the school module (#8844)"

This reverts commit c320537e4ca682c6139fd5cb40fa0cf61a0cd2bb.
This commit is contained in:
Nabin Hait 2017-05-24 17:31:58 +05:30
parent b3d4326dcc
commit fdce7a0dc3
4 changed files with 1 additions and 49 deletions

View File

@ -1,30 +1,18 @@
frappe.ui.form.on("Course", "refresh", function(frm) {
if(!cur_frm.doc.__islocal) {
frm.add_custom_button(__("Program"), function() {
frappe.route_options = {
"Program Course.course": frm.doc.name
}
frappe.set_route("List", "Program");
});
frm.add_custom_button(__("Student Group"), function() {
frappe.route_options = {
course: frm.doc.name
}
frappe.set_route("List", "Student Group");
});
frm.add_custom_button(__("Course Schedule"), function() {
frappe.route_options = {
course: frm.doc.name
}
frappe.set_route("List", "Course Schedule");
});
frm.add_custom_button(__("Assessment Plan"), function() {
frappe.route_options = {
course: frm.doc.name
}
frappe.set_route("List", "Assessment Plan");
});
}

View File

@ -6,37 +6,22 @@ cur_frm.add_fetch('fee_structure', 'total_amount', 'amount');
frappe.ui.form.on("Program", "refresh", function(frm) {
if(!frm.doc.__islocal) {
frm.add_custom_button(__("Student Applicant"), function() {
frappe.route_options = {
program: frm.doc.name
}
frappe.set_route("List", "Student Applicant");
});
frm.add_custom_button(__("Program Enrollment"), function() {
frappe.route_options = {
program: frm.doc.name
}
frappe.set_route("List", "Program Enrollment");
});
frm.add_custom_button(__("Student Group"), function() {
frappe.route_options = {
program: frm.doc.name
}
frappe.set_route("List", "Student Group");
});
frm.add_custom_button(__("Fee Structure"), function() {
frappe.route_options = {
program: frm.doc.name
}
frappe.set_route("List", "Fee Structure");
});
frm.add_custom_button(__("Fees"), function() {
frappe.route_options = {
program: frm.doc.name
}
frappe.set_route("List", "Fees");
});
}

View File

@ -4,12 +4,6 @@ frappe.provide("schools")
frappe.ui.form.on('Student Attendance Tool', {
refresh: function(frm) {
if (frappe.route_options) {
frm.set_value("based_on", frappe.route_options.based_on);
frm.set_value("student_group", frappe.route_options.student_group);
frm.set_value("course_schedule", frappe.route_options.course_schedule);
frappe.route_options = null;
}
frm.disable_save();
},

View File

@ -13,23 +13,11 @@ frappe.ui.form.on("Student Group", {
refresh: function(frm) {
if (!frm.doc.__islocal) {
frm.add_custom_button(__("Attendance"), function() {
frappe.route_options = {
based_on: "Student Group",
student_group: frm.doc.name
}
frappe.set_route("List", "Student Attendance Tool");
});
frm.add_custom_button(__("Course Schedule"), function() {
frappe.route_options = {
student_group: frm.doc.name
}
frappe.set_route("List", "Course Schedule");
});
frm.add_custom_button(__("Assessment Plan"), function() {
frappe.route_options = {
student_group: frm.doc.name
}
frappe.set_route("List", "Assessment Plan");
});
frm.add_custom_button(__("Update Email Group"), function() {
@ -42,9 +30,6 @@ frappe.ui.form.on("Student Group", {
});
});
frm.add_custom_button(__("Newsletter"), function() {
frappe.route_options = {
"Newsletter Email Group.email_group": frm.doc.name
}
frappe.set_route("List", "Newsletter");
});
}