Fixes for camel_case and translations
This commit is contained in:
parent
e92b4737e3
commit
35a4e587ee
@ -19,7 +19,7 @@ frappe.ui.form.on('Training Event', {
|
||||
}
|
||||
},
|
||||
onload: function(frm) {
|
||||
var params = getSearchParameters();
|
||||
var params = get_search_parameters();
|
||||
if (params.hasOwnProperty('employee') && params.hasOwnProperty('status')) {
|
||||
var newTemp = frm.doc.employees.filter(function(obj) {
|
||||
return obj.name == params.employee;
|
||||
@ -27,8 +27,7 @@ frappe.ui.form.on('Training Event', {
|
||||
if (newTemp) {
|
||||
newTemp[0].status = params.status;
|
||||
frm.refresh_field("employees");
|
||||
frappe.msgprint(__(frm.doc.name + ": Status for " + newTemp[0].employee_name +
|
||||
" is updated to " + newTemp[0].status));
|
||||
frappe.msgprint(__('{0}: Status for {1} is updated to {2}', [frm.doc.name, newTemp[0].employee_name, newTemp[0].status]));
|
||||
frappe.route_options = {};
|
||||
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];
|
||||
return prmstr != null && prmstr != "" ? transformToAssocArray(prmstr) : {};
|
||||
}
|
||||
|
@ -62,8 +62,8 @@ class TrainingEvent(Document):
|
||||
def send_invitation_email(self, data, sender, subject, message, attachments):
|
||||
email = frappe.db.get_value("Employee", data.employee, "company_email")
|
||||
if email:
|
||||
make(subject = subject, content=message,recipients=email,
|
||||
sender=sender,attachments = attachments, send_email=True,
|
||||
make(subject=subject, content=message, recipients=email,
|
||||
sender=sender, attachments=attachments, send_email=True,
|
||||
doctype=self.doctype, name=self.name)
|
||||
frappe.msgprint(_("Email sent to {0}").format(data.employee_name))
|
||||
|
||||
@ -81,4 +81,4 @@ def set_response(event, response):
|
||||
if doc:
|
||||
doc.status = response
|
||||
doc.save()
|
||||
frappe.msgprint("Status for this training event as been updated")
|
||||
frappe.msgprint(_("Status for this training event as been updated"))
|
Loading…
x
Reference in New Issue
Block a user