// Copyright (c) 2017, InfluxFramework LLC and contributors
// For license information, please see license.txt

influxframework.ui.form.on('Manufacturer', {
	refresh: function(frm) {
		influxframework.dynamic_link = { doc: frm.doc, fieldname: 'name', doctype: 'Manufacturer' };
		if (frm.doc.__islocal) {
			hide_field(['address_html','contact_html']);
			influxframework.contacts.clear_address_and_contact(frm);
		}
		else {
			unhide_field(['address_html','contact_html']);
			influxframework.contacts.render_address_and_contact(frm);
		}
	}
});
