[form] show website link for website generator
This commit is contained in:
parent
e6370860a0
commit
98ae5bd9db
@ -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('<a href="/%(website_route)s" target="_blank">/%(website_route)s</a>', 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);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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('<a href="/%(website_route)s" target="_blank">/%(website_route)s</a>', doc.__onload)]));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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('<a href="/%(website_route)s" target="_blank">/%(website_route)s</a>', doc.__onload)]), true);
|
||||
}
|
||||
|
||||
erpnext.item.toggle_reqd(cur_frm);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user