Bug 32214: Prevent empty search option block in catalog search header
In the header, if "Search catalog" is selected, there is an "option" icon to display some filters. Fitlers are displayed if IntranetCatalogSearchPulldown or IntranetAddMastheadLibraryPulldown is set. If none are set we should hide the icon to avoid and empty div to be displayed Test plan: Confirm that the icon is only displayed if one of the 2 prefs is turned on. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
parent
0583834997
commit
bac0617416
2 changed files with 4 additions and 2 deletions
|
@ -1,3 +1,4 @@
|
|||
[% USE Koha %]
|
||||
[% USE Branches %]
|
||||
[% IF ( CAN_user_catalogue ) %]
|
||||
<div id="catalog_search" class="residentsearch">
|
||||
|
@ -13,7 +14,9 @@
|
|||
<input type="text" name="q" id="search-form" size="20" title="Enter the terms you wish to search for." class="query form-text head-searchbox form-control" placeholder="Enter search keywords" />
|
||||
[% END %]
|
||||
|
||||
<button type="button" class="form-extra-content-toggle"><i class="fa fa-sliders"></i></button>
|
||||
[% IF Koha.Preference('IntranetCatalogSearchPulldown') || Koha.Preference('IntranetAddMastheadLibraryPulldown') %]
|
||||
<button type="button" class="form-extra-content-toggle"><i class="fa fa-sliders"></i></button>
|
||||
[% END %]
|
||||
</span>
|
||||
<button type="submit"><i class="fa fa-arrow-right"></i></button>
|
||||
|
||||
|
|
|
@ -71,7 +71,6 @@ $(document).ready(function() {
|
|||
|
||||
$('#header_search .form-extra-content-toggle').on('click', function () {
|
||||
const extraContent = $(this).closest('form').find('.form-extra-content');
|
||||
console.log(extraContent);
|
||||
if (extraContent.is(':visible')) {
|
||||
extraContent.hide();
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue