Bug 23888: Do not allow invalid vendor id on creating a subscription
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 11 Nov 2019 11:14:50 +0000 (12:14 +0100)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Fri, 27 Mar 2020 12:14:09 +0000 (12:14 +0000)
commitc52e15689f123faa083626d725420def07dbfdc5
treeb7cd2d2a04e9b988157d9f465e28f1100cb617db
parent01551437c0c99b9e6308e109ceeef5bc3f7b5cec
Bug 23888: Do not allow invalid vendor id on creating a subscription

It will avoid crash and invalid data when creating/updating a
subscription.

This could have been done with a AJAX query but seems more convenient
this way.

Test plan:
- Create or update a subscription
- In the "Vendor" input try an empty string, a valid vendor's id, and
invalid one.
=> With an empty string you get the existing alert message
=> With a valid id you do not get any messages
=> With an invalid id you are not allowed to go to page 2

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-add.tt
koha-tmpl/intranet-tmpl/prog/js/subscription-add.js
serials/subscription-add.pl