<commit_before>// Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
// License: GNU General Public License v3. See license.txt

frappe.ui.form.on("Campaign", "refresh", function(frm) {
	erpnext.toggle_naming_series();
	if(frm.doc.__islocal) {
		frm.toggle_display("naming_series", frappe.boot.sysdefaults.campaign_naming_by=="Naming Series");
	}
})<commit_msg>view leads button added to campaign<commit_after>// Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
// License: GNU General Public License v3. See license.txt

frappe.ui.form.on("Campaign", "refresh", function(frm) {
	erpnext.toggle_naming_series();
	if(frm.doc.__islocal) {
		frm.toggle_display("naming_series", frappe.boot.sysdefaults.campaign_naming_by=="Naming Series");
	}
	else{
		cur_frm.add_custom_button(__("View Leads"), function() {
			frappe.route_options = {"source": "Campaign","campaign_name": frm.doc.name}
			frappe.set_route("List", "Lead");
		}, "icon-list", true);
	}
})
{'fraction_non_alphanumeric': 0.15415821501014199, 'fraction_numerical': 0.010141987829614604, 'mean_word_length': 5.668918918918919, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7310637', 'n_tokens_mistral': 366, 'n_tokens_neox': 348, 'n_words': 69}