Bug 21232: Add a client-side check on biblionumber when creating a subscription
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Fri, 13 Dec 2019 11:41:20 +0000 (12:41 +0100)
committerJoy Nelson <joy@bywatersolutions.com>
Mon, 6 Jan 2020 21:26:53 +0000 (21:26 +0000)
commit90374dacb97a69d5774234cedeeb7d741232cb53
treefab7f63089591aed8dd0771a096fd0d60f92f5c2
parent972607628e0b67edf3dbd9536e7aafb5007a7e8f
Bug 21232: Add a client-side check on biblionumber when creating a subscription

This patch adds an AJAX call to the REST API (/api/v1/biblios/) to
retrieve and display the biblio's title.
On clicking the "next" button a check is done to make sure the title
exists, which means the biblionumber we manually entered is valid (can
we assume a title is mandatory?)

Test plan:
- Create or edit a new subscription
- Enter an invalid biblionumber in the input
=> A friendly note is telling you that the biblio does not exist
- Try to switch to the next screen
=> You get an alert
- Enter a valid biblionumber in the input
=> The title is displayed
=> Try to switch to the next screen
=> It works!

Signed-off-by: hc <hc@interleaf.ie>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-add.tt
koha-tmpl/intranet-tmpl/prog/js/subscription-add.js