Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
drupal.org
better_exposed_filters
Commits
1d4eba2e
Commit
1d4eba2e
authored
Sep 12, 2020
by
Neslee
Browse files
Issue #3162656 by Radelson, gilles_webstanz: Reset button still appear when there is no user input
parent
c496ee5c
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/Plugin/views/exposed_form/BetterExposedFilters.php
View file @
1d4eba2e
...
...
@@ -819,7 +819,10 @@ class BetterExposedFilters extends InputRequired {
// If our form has no visible filters, hide the submit button.
$has_visible_filters
=
!
empty
(
Element
::
getVisibleChildren
(
$form
))
?:
FALSE
;
$form
[
'actions'
][
'submit'
][
'#access'
]
=
$has_visible_filters
;
$form
[
'actions'
][
'reset'
][
'#access'
]
=
$has_visible_filters
;
// Never enable a reset button that has already been disabled.
if
(
!
isset
(
$form
[
'actions'
][
'reset'
][
'#access'
])
||
$form
[
'actions'
][
'reset'
][
'#access'
]
===
TRUE
)
{
$form
[
'actions'
][
'reset'
][
'#access'
]
=
$has_visible_filters
;
}
// Ensure default process/pre_render callbacks are included when a BEF
// widget has added their own.
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment