mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-03 20:29:09 +00:00
don't request another ajax call if one is pending (#9620)
This commit is contained in:
committed by
Rushabh Mehta
parent
35ecab6a52
commit
77aa4762b8
@@ -135,22 +135,24 @@ schools.StudentsEditor = Class.extend({
|
|||||||
frappe.confirm(__("Do you want to update attendance?<br>Present: {0}\
|
frappe.confirm(__("Do you want to update attendance?<br>Present: {0}\
|
||||||
<br>Absent: {1}", [students_present.length, students_absent.length]),
|
<br>Absent: {1}", [students_present.length, students_absent.length]),
|
||||||
function() { //ifyes
|
function() { //ifyes
|
||||||
frappe.call({
|
if(!frappe.request.ajax_count) {
|
||||||
method: "erpnext.schools.api.mark_attendance",
|
frappe.call({
|
||||||
freeze: true,
|
method: "erpnext.schools.api.mark_attendance",
|
||||||
freeze_message: "Marking attendance",
|
freeze: true,
|
||||||
args: {
|
freeze_message: "Marking attendance",
|
||||||
"students_present": students_present,
|
args: {
|
||||||
"students_absent": students_absent,
|
"students_present": students_present,
|
||||||
"student_group": frm.doc.student_group,
|
"students_absent": students_absent,
|
||||||
"course_schedule": frm.doc.course_schedule,
|
"student_group": frm.doc.student_group,
|
||||||
"date": frm.doc.date
|
"course_schedule": frm.doc.course_schedule,
|
||||||
},
|
"date": frm.doc.date
|
||||||
callback: function(r) {
|
},
|
||||||
$(me.wrapper.find(".btn-mark-att")).attr("disabled", false);
|
callback: function(r) {
|
||||||
frm.trigger("student_group");
|
$(me.wrapper.find(".btn-mark-att")).attr("disabled", false);
|
||||||
}
|
frm.trigger("student_group");
|
||||||
});
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
},
|
},
|
||||||
function() { //ifno
|
function() { //ifno
|
||||||
$(me.wrapper.find(".btn-mark-att")).attr("disabled", false);
|
$(me.wrapper.find(".btn-mark-att")).attr("disabled", false);
|
||||||
|
|||||||
Reference in New Issue
Block a user