Bug 11832: fix JavaScript error on staff client place hold screen if record has no items
If a hold operation is blocked because the title has no items attached the patron search autocomplete JavaScript triggers an error. This patch modifies the template so that the JS is loaded only when items are present. To test, find a title which has no items attached. View the holds page for that title. There should be no JavaScript error. Patron search autocomplete should still work correctly for titles which have items attached. Deleted all items from a biblio record. Clicked the holds tab and confirmed using firebug Javascript error occurs. Applied patch, confirmed that the Javascript error described in comment 1 no longer happens. Went to another biblio with items, and confirmed patron auto-complete still functions. Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Galen Charlton <gmc@esilibrary.com> (cherry picked from commit0b5b8cef34) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> (cherry picked from commit07dc616de5)
This commit is contained in:
parent
1c01f5d502
commit
fee8fc3193
|
|
@ -131,7 +131,7 @@ function checkMultiHold() {
|
|||
|
||||
$('#hold-request-form').preventDoubleFormSubmit();
|
||||
|
||||
[% UNLESS ( borrowernumber || borrower_list ) %]
|
||||
[% UNLESS ( borrowernumber || borrower_list || noitems ) %]
|
||||
[% IF ( CircAutocompl ) %]
|
||||
$( "#patron" ).autocomplete({
|
||||
source: "/cgi-bin/koha/circ/ysearch.pl",
|
||||
|
|
|
|||
Loading…
Reference in New Issue