|
|
@@ -8,15 +8,17 @@ $.extend(frappe.geo, { |
|
|
|
|
|
|
|
render_address_and_contact: function(frm) { |
|
|
|
// render address |
|
|
|
$(frm.fields_dict['address_html'].wrapper) |
|
|
|
.html(frappe.render_template("address_list", |
|
|
|
cur_frm.doc.__onload)) |
|
|
|
.find(".btn-address").on("click", function() { |
|
|
|
frappe.new_doc("Address"); |
|
|
|
}); |
|
|
|
if(frm.fields_dict['address_html'] && "addr_list" in frm.doc.__onload) { |
|
|
|
$(frm.fields_dict['address_html'].wrapper) |
|
|
|
.html(frappe.render_template("address_list", |
|
|
|
cur_frm.doc.__onload)) |
|
|
|
.find(".btn-address").on("click", function() { |
|
|
|
frappe.new_doc("Address"); |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
// render contact |
|
|
|
if(frm.fields_dict['contact_html']) { |
|
|
|
if(frm.fields_dict['contact_html'] && "contact_list" in frm.doc.__onload) { |
|
|
|
$(frm.fields_dict['contact_html'].wrapper) |
|
|
|
.html(frappe.render_template("contact_list", |
|
|
|
cur_frm.doc.__onload)) |
|
|
|