From 98ae5bd9db985c52e56754e8e5b5ce2a284c7212 Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Fri, 31 Oct 2014 14:28:28 +0530 Subject: [PATCH] [form] show website link for website generator --- erpnext/setup/doctype/item_group/item_group.js | 9 +-------- erpnext/setup/doctype/sales_partner/sales_partner.js | 5 ----- erpnext/stock/doctype/item/item.js | 10 ++-------- 3 files changed, 3 insertions(+), 21 deletions(-) diff --git a/erpnext/setup/doctype/item_group/item_group.js b/erpnext/setup/doctype/item_group/item_group.js index 954f6c58b5..f7ffe5ee49 100644 --- a/erpnext/setup/doctype/item_group/item_group.js +++ b/erpnext/setup/doctype/item_group/item_group.js @@ -8,20 +8,13 @@ cur_frm.cscript.refresh = function(doc, cdt, cdn) { cur_frm.appframe.add_button(__("Item Group Tree"), function() { frappe.set_route("Sales Browser", "Item Group"); }, "icon-sitemap") - - if (!doc.__islocal && doc.show_in_website) { - cur_frm.set_intro(__("Published on website at: {0}", - [repl('/%(website_route)s', doc.__onload)])); - } } cur_frm.cscript.set_root_readonly = function(doc) { // read-only for root item group if(!doc.parent_item_group) { cur_frm.set_read_only(); - cur_frm.set_intro(__("This is a root item group and cannot be edited.")); - } else { - cur_frm.set_intro(null); + cur_frm.set_intro(__("This is a root item group and cannot be edited."), true); } } diff --git a/erpnext/setup/doctype/sales_partner/sales_partner.js b/erpnext/setup/doctype/sales_partner/sales_partner.js index 118d2e29b4..baec9b952d 100644 --- a/erpnext/setup/doctype/sales_partner/sales_partner.js +++ b/erpnext/setup/doctype/sales_partner/sales_partner.js @@ -17,11 +17,6 @@ cur_frm.cscript.refresh = function(doc,dt,dn){ // make lists cur_frm.cscript.make_address(doc,dt,dn); cur_frm.cscript.make_contact(doc,dt,dn); - - if (doc.show_in_website) { - cur_frm.set_intro(__("Published on website at: {0}", - [repl('/%(website_route)s', doc.__onload)])); - } } } diff --git a/erpnext/stock/doctype/item/item.js b/erpnext/stock/doctype/item/item.js index b05ce2579c..096c1e8f94 100644 --- a/erpnext/stock/doctype/item/item.js +++ b/erpnext/stock/doctype/item/item.js @@ -9,15 +9,14 @@ cur_frm.cscript.refresh = function(doc) { cur_frm.cscript.make_dashboard(); - cur_frm.set_intro(); if (cur_frm.doc.has_variants) { - cur_frm.set_intro(__("This Item is a Template and cannot be used in transactions. Item attributes will be copied over into the variants unless 'No Copy' is set")); + cur_frm.set_intro(__("This Item is a Template and cannot be used in transactions. Item attributes will be copied over into the variants unless 'No Copy' is set"), true); cur_frm.add_custom_button(__("Show Variants"), function() { frappe.set_route("List", "Item", {"variant_of": cur_frm.doc.name}); }, "icon-list", "btn-default"); } if (cur_frm.doc.variant_of) { - cur_frm.set_intro(__("This Item is a Variant of {0} (Template). Attributes will be copied over from the template unless 'No Copy' is set", [cur_frm.doc.variant_of])); + cur_frm.set_intro(__("This Item is a Variant of {0} (Template). Attributes will be copied over from the template unless 'No Copy' is set", [cur_frm.doc.variant_of]), true); } if (frappe.defaults.get_default("item_naming_by")!="Naming Series") { @@ -34,11 +33,6 @@ cur_frm.cscript.refresh = function(doc) { (doc.__onload && doc.__onload.sle_exists=="exists") ? false : true); } - if (!doc.__islocal && doc.show_in_website) { - cur_frm.set_intro(__("Published on website at: {0}", - [repl('/%(website_route)s', doc.__onload)]), true); - } - erpnext.item.toggle_reqd(cur_frm); }