Commit 204bd3e2 authored by dragonwize's avatar dragonwize
Browse files

Fixed empty fieldset from showing some times.

parent 17c7c18f
......@@ -104,11 +104,6 @@ function better_formats_filter_process_format($element) {
if (!$show_tips_link) {
$element['format']['help']['#access'] = FALSE;
}
// Hide the entire text format fieldset if the user is not supposed to see
// anything inside it.
if (!$show_selection && !$show_tips && !$show_tips_link) {
$element['format']['#access'] = FALSE;
}
// If the element represents a field attached to an entity, we may need to
// adjust the allowed text format options. However, we don't want to touch
......@@ -202,6 +197,12 @@ function better_formats_filter_process_format($element) {
}
}
// Hide the entire text format fieldset if the user is not supposed to see
// anything inside it.
if (!$show_selection && !$show_tips && !$show_tips_link) {
$element['format']['#access'] = FALSE;
}
return $element;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment