// Copyright (c) 2016, JINGROW
// For license information, please see license.txt

jingrow.ui.form.on("Address Template", {
	refresh: function (frm) {
		if (frm.is_new() && !frm.pg.template) {
			// set default template via js so that it is translated
			jingrow.call({
				method: "jingrow.contacts.pagetype.address_template.address_template.get_default_address_template",
				callback: function (r) {
					frm.set_value("template", r.message);
				},
			});
		}
	},
});
