| Summary: | Adding item search fields is broken - can't add more than one field | ||
|---|---|---|---|
| Product: | Koha | Reporter: | David Nind <david> |
| Component: | Searching | Assignee: | Katrin Fischer <katrin.fischer> |
| Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
| Severity: | major | ||
| Priority: | P5 - low | CC: | lucas, martin.renvoize |
| Version: | Main | Keywords: | rel_22_11_candidate |
| Hardware: | All | ||
| OS: | All | ||
| GIT URL: | Initiative type: | --- | |
| Sponsorship status: | --- | Crowdfunding goal: | 0 |
| Patch complexity: | Trivial patch | Documentation contact: | |
| Documentation submission: | Text to go in the release notes: | ||
| Version(s) released in: |
23.05.00, 22.11.01
|
Circulation function: | |
| Bug Depends on: | 31986 | ||
| Bug Blocks: | 31406, 32213 | ||
| Attachments: |
Bug 32126: Fix missing div breaking the form for adding more search fields
Bug 32126: Fix missing div breaking the form for adding more search fields |
||
|
Description
David Nind
2022-11-07 19:27:36 UTC
Confirmed. This is related to our changes on the page, but I haven't quite figured out yet what's going on.
The visibility of the form on the page is managed with Javascript:
$(document).ready(function(){
$("#add_field_form").hide();
$("#new_search_field").on("click",function(e){
e.preventDefault();
$("#add_field_form").show();
$(".dialog").hide();
$("#search_fields_list").hide();
});
$(".hide_form").on("click",function(e){
e.preventDefault();
$("#add_field_form").hide();
$(".dialog").show();
$("#search_fields_list,#toolbar").show();
});
Created attachment 143917 [details] [review] Bug 32126: Fix missing div breaking the form for adding more search fields The missing div caused a problem with the JS that controls visibility of the list of search fields, the form and the toolbar. With the div added, everything should now work as expected. To test: * Add a item search field, everything should work. * Add a second item search field - intead of the form, you'll see an empty page. * Apply patch. * Add second and more search fields, all should work. * Edit search fields. * Delete search fields. Created attachment 143923 [details] [review] Bug 32126: Fix missing div breaking the form for adding more search fields The missing div caused a problem with the JS that controls visibility of the list of search fields, the form and the toolbar. With the div added, everything should now work as expected. To test: * Add a item search field, everything should work. * Add a second item search field - intead of the form, you'll see an empty page. * Apply patch. * Add second and more search fields, all should work. * Edit search fields. * Delete search fields. Signed-off-by: David Nind <david@davidnind.com> Thanks Katrin for fixing! I did note (and it was doing it before this patch) that the form very briefly appears then disappears when there are no item search fields, or when going to Administration > Item search fields. Another bug, or just the way this one works? David Just the way this works - elements get hidden/unhidden with Javascript, that's the flickering you see. (In reply to Katrin Fischer from comment #6) > Just the way this works - elements get hidden/unhidden with Javascript, > that's the flickering you see. Thanks Katrin! A major bug, a silly easy fix, but noone to QA? :( Pushed to master for 22.11. Nice work everyone, thanks! Pushed to 22.11.x for 22.11.01 release. Thanks everyone. |