If LOC is not present, the item search form will raise a JS error: SyntaxError: expected expression, got '}'
Created attachment 59875 [details] [review] 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.
Didn't cleanly apply without applying 16115 first. :)
Created attachment 60135 [details] [review] 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>
Created attachment 60179 [details] [review] 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>
Pushed to master for 17.05, thanks Nick!
This patch has been pushed to 16.11.x and will be in 16.11.04.
Pushed to 3.22.x for 3.22.17
Pushed to 16.05.x, for 16.05.10 release