I can only reproduce this in Firefox, not in Chromium. To reproduce: - Add a new subscription - Put cursor in first field for 'Vendor' or 'Biblio' and hit enter - Perl error page is shown: No record at /home/katrin/kohaclone/C4/Serials.pm line 1382 Sending an empty field should open the search pop up and not give a perl error message.
The message is now: You must choose a first publication date. This doesn't make much sense as the field is on the second page of the form and can't be accessed without filling out other mandatory fields first.
Created attachment 37580 [details] [review] Bug 9139: New subscription form - Does not check form on the first page The vendor and Record input try to sent the form if the focus is on the inputs (normal behavior). But the form is on 2 pages, and the popup message ask you to fill info on the second page when you are on the first one. This does not make sense. This patch suggests to launch search when the enter key is press on these inputs. Test plan: 1/ Create a new subscription 2/ Put the focus in the Vendor input and press enter: the vendor search popup should appear 3/ Put the focus in the Record input and press enter: the record search popup should appear
Created attachment 37780 [details] [review] Bug 9139: New subscription form - Does not check form on the first page The vendor and Record input try to sent the form if the focus is on the inputs (normal behavior). But the form is on 2 pages, and the popup message ask you to fill info on the second page when you are on the first one. This does not make sense. This patch suggests to launch search when the enter key is press on these inputs. Test plan: 1/ Create a new subscription 2/ Put the focus in the Vendor input and press enter: the vendor search popup should appear 3/ Put the focus in the Record input and press enter: the record search popup should appear Signed-off-by: Andreas Hedström Mace <andreas.hedstrom.mace@sub.su.se>
I really like that you have the right search now open on pressing enter, but I think the possibility to enter the vendor number or record number directly is kind of a feature, so we should not remove that.
Created attachment 38044 [details] [review] Bug 9139: New subscription form - Does not check form on the first page The vendor and Record input try to sent the form if the focus is on the inputs (normal behavior). But the form is on 2 pages, and the popup message ask you to fill info on the second page when you are on the first one. This does not make sense. This patch suggests to launch search when the enter key is press on these inputs. Test plan: 1/ Create a new subscription 2/ Put the focus in the Vendor input and press enter: the vendor search popup should appear 3/ Put the focus in the Record input and press enter: the record search popup should appear
The preventDefault was bad placed.
Created attachment 38050 [details] [review] Bug 9139: New subscription form - Does not check form on the first page The vendor and Record input try to sent the form if the focus is on the inputs (normal behavior). But the form is on 2 pages, and the popup message ask you to fill info on the second page when you are on the first one. This does not make sense. This patch suggests to launch search when the enter key is press on these inputs. Test plan: 1/ Create a new subscription 2/ Put the focus in the Vendor input and press enter: the vendor search popup should appear 3/ Put the focus in the Record input and press enter: the record search popup should appear Signed-off-by: Andreas Hedström Mace <andreas.hedstrom.mace@sub.su.se>
Created attachment 38071 [details] [review] [PASSED QA] Bug 9139: New subscription form - Does not check form on the first page The vendor and Record input try to sent the form if the focus is on the inputs (normal behavior). But the form is on 2 pages, and the popup message ask you to fill info on the second page when you are on the first one. This does not make sense. This patch suggests to launch search when the enter key is press on these inputs. Test plan: 1/ Create a new subscription 2/ Put the focus in the Vendor input and press enter: the vendor search popup should appear 3/ Put the focus in the Record input and press enter: the record search popup should appear Signed-off-by: Andreas Hedström Mace <andreas.hedstrom.mace@sub.su.se> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Patch pushed to master. Thanks Jonathan!
Pushed to 3.18.x will be in 3.18.7