Bug 42423: Fix patron header search
This patch fixes the patron header search, so that you can do patron searches from the header, but empty patron searches are prevented and show a tooltip. Test plan: 0. DO NOT APPLY THE PATCH YET 1. Log into the staff interface and try to search for anything in the "Search patrons" header search 2. Note that nothing happens at all no matter how much you click 3. Apply the patch 4. Refresh the browser page 5. Try to search for anything in the "Seearch patrons" header search 6. Note that it performs the search 7. Empty out the input box and hit Enter or the search button 8. Note that a tooltip appears saying "Please enter a card number or name" Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
parent
08e66b4f8a
commit
833105aa75
|
|
@ -466,8 +466,10 @@ $(document).ready(function () {
|
|||
});
|
||||
|
||||
$("#patron_header_search").on("submit", function (e) {
|
||||
e.preventDefault();
|
||||
validatePatronSearch($(this)[0]);
|
||||
const validated = validatePatronSearch(e.target);
|
||||
if (validated !== true) {
|
||||
e.preventDefault();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue