From b678c7359e2e7fe33d58d936f3227990911d43b6 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 8 Apr 2015 16:21:15 +0200 Subject: [PATCH] Bug 9139: New subscription form - Does not check form on the first page MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Katrin Fischer Signed-off-by: Tomas Cohen Arazi --- .../prog/en/modules/serials/subscription-add.tt | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-add.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-add.tt index 6bfe8d4bd9..12fc1f218b 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-add.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-add.tt @@ -374,6 +374,18 @@ function show_page_2() { $(document).ready(function() { + $("#aqbooksellerid").on('keypress', function(e) { + if (e.keyCode == 13) { + e.preventDefault(); + FindAcqui(); + } + }); + $("#biblionumber").on('keypress', function(e) { + if (e.keyCode == 13) { + e.preventDefault(); + Plugin(); + } + }); $("select#frequency").change(function(){ patternneedtobetested = 1; $("input[name='enddate']").val(''); @@ -479,7 +491,7 @@ $(document).ready(function() { [% END %]
  • - () Search for a vendor + () Search for a vendor
  • -- 2.39.5