Skip to content

Commit

Permalink
when hiding, also hide the sidebar entry
Browse files Browse the repository at this point in the history
  • Loading branch information
jambun committed May 26, 2015
1 parent 3090c4a commit 8963026
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions frontend/assets/user_defined_in_basic.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,11 @@ UserDefinedInBasic.prototype.init = function(fields, read_only_view, hide_user_d

// hide the remains of the user defined section if configured thus
if (hide_user_defined_section) {
if (read_only_view) {
$('section[id$=_user_defined_]').hide();
} else {
user_defined_section.hide();
}
$('section[id$=_user_defined_]').hide();
$('li[class^=sidebar-entry][class$=user_defined_]').hide();
} else {
if (!read_only_view) {
// if we're not hiding then disable the remove button
user_defined_section.find('.subrecord-form-remove').attr('disabled', 'disabled');
}
}
Expand Down

0 comments on commit 8963026

Please sign in to comment.