mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-29 18:04:46 +00:00
form bugfix and otehr minor fixes
This commit is contained in:
@@ -39,14 +39,14 @@ header .topbar .container {
|
||||
margin: auto;
|
||||
}
|
||||
|
||||
.web-head-section {
|
||||
margin-bottom: 20px
|
||||
}
|
||||
|
||||
.web-content input[type="text"], .web-content input[type="password"], .web-content select {
|
||||
min-width: 180px;
|
||||
}
|
||||
|
||||
.web-head-section {
|
||||
margin-bottom: 20px
|
||||
}
|
||||
|
||||
.web-main-section {
|
||||
width: 65%;
|
||||
float: left;
|
||||
|
||||
28
erpnext/website/doctype/website_settings/website_settings.js
Normal file
28
erpnext/website/doctype/website_settings/website_settings.js
Normal file
@@ -0,0 +1,28 @@
|
||||
// update parent select
|
||||
|
||||
$.extend(cur_frm.cscript, {
|
||||
|
||||
onload_post_render: function(doc) {
|
||||
// get labels of parent items
|
||||
var get_parent_options = function(table_field) {
|
||||
var items = getchildren('Top Bar Item', doc.name, table_field);
|
||||
var main_items = [''];
|
||||
for(var i in items) {
|
||||
var d = items[i];
|
||||
if(!d.parent_label) {
|
||||
main_items.push(d.label);
|
||||
}
|
||||
}
|
||||
return main_items.join('\n');
|
||||
}
|
||||
|
||||
// bind function to refresh fields
|
||||
// when "Parent Label" is select, it
|
||||
// should automatically update
|
||||
// options
|
||||
$(cur_frm.fields_dict['top_bar_items'].grid.get_field('parent_label').wrapper)
|
||||
.bind('refresh', function() {
|
||||
this.fieldobj.refresh_options(get_parent_options('top_bar_items'));
|
||||
});
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user