Skip to content

Commit 8963026

Browse files
committed
when hiding, also hide the sidebar entry
1 parent 3090c4a commit 8963026

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

frontend/assets/user_defined_in_basic.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,11 @@ UserDefinedInBasic.prototype.init = function(fields, read_only_view, hide_user_d
2020

2121
// hide the remains of the user defined section if configured thus
2222
if (hide_user_defined_section) {
23-
if (read_only_view) {
24-
$('section[id$=_user_defined_]').hide();
25-
} else {
26-
user_defined_section.hide();
27-
}
23+
$('section[id$=_user_defined_]').hide();
24+
$('li[class^=sidebar-entry][class$=user_defined_]').hide();
2825
} else {
2926
if (!read_only_view) {
27+
// if we're not hiding then disable the remove button
3028
user_defined_section.find('.subrecord-form-remove').attr('disabled', 'disabled');
3129
}
3230
}

0 commit comments

Comments
 (0)