Bug 21389: Correct Javascript error on article requests page
authorFridolin Somers <fridolin.somers@biblibre.com>
Fri, 21 Sep 2018 09:17:25 +0000 (11:17 +0200)
committerFridolin Somers <fridolin.somers@biblibre.com>
Fri, 9 Nov 2018 07:09:28 +0000 (08:09 +0100)
commitc29f4cb590003ef78390d93f927f2d1df6e29e78
treee931753087cb215c7d6d5c1b9df334e6fe55a7a8
parentb16052bd4f7310eb198619a0e39e23a4b3bbb446
Bug 21389: Correct Javascript error on article requests page

Bug 21076 fixed a Javascript error on article requests page when patron is found.

There is also an error when patron is not found, with message :
  Patron not found
  No patron with this name, please, try another

This patch fixes by replacing TT condition by a JS condition testing the existance of the patron input.

Test plan:
1 - Do not apply patch
2 - Enable article requests
3 - Search on staff client and click 'Request article'
4 - Search for a patron that does not exist
5 - You get a yellow message "Patron not found"
6 - View error in console
7 - Apply patch
8 - Reload
9 - Not error is gone
10 - Search for a patron that does exist
11 - Check there is no error in console
12 - Check that autocompletion works

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit b27db0fbfc0b715df1b63c57228a9945d4834f29)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit b0f3bc8c134c195e3d943a0f7f9d5ff6a064da79)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
koha-tmpl/intranet-tmpl/prog/en/modules/circ/request-article.tt