website_settings: added button to generate html banner
This commit is contained in:
parent
4f20f693c4
commit
d84f299c40
@ -42,3 +42,13 @@ $.extend(cur_frm.cscript, {
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
cur_frm.cscript.set_banner_from_image = function(doc) {
|
||||
if(!doc.banner_image) {
|
||||
msgprint(wn._("Select a Banner Image first."));
|
||||
}
|
||||
var src = doc.banner_image;
|
||||
if(src.indexOf("/")==-1) src = "files/" + src;
|
||||
cur_frm.set_value("banner_html", "<a href='/'><img src='"+ src
|
||||
+"'></a>");
|
||||
}
|
@ -2,7 +2,7 @@
|
||||
{
|
||||
"creation": "2013-03-07 11:55:11",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-03-12 11:17:11",
|
||||
"modified": "2013-03-13 16:25:22",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
@ -78,6 +78,20 @@
|
||||
"fieldtype": "Section Break",
|
||||
"label": "Banner"
|
||||
},
|
||||
{
|
||||
"description": "Select an image of approx width 150px with a transparent background for best results.",
|
||||
"doctype": "DocField",
|
||||
"fieldname": "banner_image",
|
||||
"fieldtype": "Select",
|
||||
"label": "Banner Image",
|
||||
"options": "attach_files:"
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "set_banner_from_image",
|
||||
"fieldtype": "Button",
|
||||
"label": "Set Banner from Image"
|
||||
},
|
||||
{
|
||||
"description": "Banner is above the Top Menu Bar.",
|
||||
"doctype": "DocField",
|
||||
|
Loading…
x
Reference in New Issue
Block a user