mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-06 06:58:27 +00:00
Fixes for camel_case and translations
This commit is contained in:
committed by
Rushabh Mehta
parent
e92b4737e3
commit
35a4e587ee
@@ -19,7 +19,7 @@ frappe.ui.form.on('Training Event', {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
onload: function(frm) {
|
onload: function(frm) {
|
||||||
var params = getSearchParameters();
|
var params = get_search_parameters();
|
||||||
if (params.hasOwnProperty('employee') && params.hasOwnProperty('status')) {
|
if (params.hasOwnProperty('employee') && params.hasOwnProperty('status')) {
|
||||||
var newTemp = frm.doc.employees.filter(function(obj) {
|
var newTemp = frm.doc.employees.filter(function(obj) {
|
||||||
return obj.name == params.employee;
|
return obj.name == params.employee;
|
||||||
@@ -27,8 +27,7 @@ frappe.ui.form.on('Training Event', {
|
|||||||
if (newTemp) {
|
if (newTemp) {
|
||||||
newTemp[0].status = params.status;
|
newTemp[0].status = params.status;
|
||||||
frm.refresh_field("employees");
|
frm.refresh_field("employees");
|
||||||
frappe.msgprint(__(frm.doc.name + ": Status for " + newTemp[0].employee_name +
|
frappe.msgprint(__('{0}: Status for {1} is updated to {2}', [frm.doc.name, newTemp[0].employee_name, newTemp[0].status]));
|
||||||
" is updated to " + newTemp[0].status));
|
|
||||||
frappe.route_options = {};
|
frappe.route_options = {};
|
||||||
frappe.set_route("List", "Training Event");
|
frappe.set_route("List", "Training Event");
|
||||||
}
|
}
|
||||||
@@ -36,7 +35,7 @@ frappe.ui.form.on('Training Event', {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
function getSearchParameters() {
|
function get_search_parameters() {
|
||||||
var prmstr = window.location.href.split('?')[2];
|
var prmstr = window.location.href.split('?')[2];
|
||||||
return prmstr != null && prmstr != "" ? transformToAssocArray(prmstr) : {};
|
return prmstr != null && prmstr != "" ? transformToAssocArray(prmstr) : {};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -62,8 +62,8 @@ class TrainingEvent(Document):
|
|||||||
def send_invitation_email(self, data, sender, subject, message, attachments):
|
def send_invitation_email(self, data, sender, subject, message, attachments):
|
||||||
email = frappe.db.get_value("Employee", data.employee, "company_email")
|
email = frappe.db.get_value("Employee", data.employee, "company_email")
|
||||||
if email:
|
if email:
|
||||||
make(subject = subject, content=message,recipients=email,
|
make(subject=subject, content=message, recipients=email,
|
||||||
sender=sender,attachments = attachments, send_email=True,
|
sender=sender, attachments=attachments, send_email=True,
|
||||||
doctype=self.doctype, name=self.name)
|
doctype=self.doctype, name=self.name)
|
||||||
frappe.msgprint(_("Email sent to {0}").format(data.employee_name))
|
frappe.msgprint(_("Email sent to {0}").format(data.employee_name))
|
||||||
|
|
||||||
@@ -81,4 +81,4 @@ def set_response(event, response):
|
|||||||
if doc:
|
if doc:
|
||||||
doc.status = response
|
doc.status = response
|
||||||
doc.save()
|
doc.save()
|
||||||
frappe.msgprint("Status for this training event as been updated")
|
frappe.msgprint(_("Status for this training event as been updated"))
|
||||||
Reference in New Issue
Block a user