Bug 18047 - JavaScript error on item search form unless LOC defined
authorNick Clemens <nick@bywatersolutions.com>
Fri, 3 Feb 2017 11:38:53 +0000 (11:38 +0000)
committerKyle M Hall <kyle@bywatersolutions.com>
Tue, 14 Feb 2017 14:11:38 +0000 (14:11 +0000)
commitda3ccdc14379816ea849eeb56ab321d8e7db59a2
tree8a5a031dfb27b6285413e620b061b2f86664d6dd
parent680e6ce7d1aa53e716ea9fdab9c67e621fb828e2
Bug 18047 - JavaScript error on item search form unless LOC defined

If LOC is not present, the item search form will raise a JS error:
SyntaxError: expected expression, got '}'

This patch fixes it by handling this specific case.

Note that the "Status" column is still displayed.

Test plan:
Remove your LOC authorised values
Go on the item search form
=> You will not get the JS error and the "Shelving location" bloc is no longer
displayed. There is no need to display it if empty.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt