Bugzilla – Attachment 37780 Details for
Bug 9139
Sending empty vendor or biblio when adding subscriptions gives wrong error
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 9139: New subscription form - Does not check form on the first page
Bug-9139-New-subscription-form---Does-not-check-fo.patch (text/plain), 3.01 KB, created by
Andreas Hedström Mace
on 2015-04-13 19:35:50 UTC
(
hide
)
Description:
Bug 9139: New subscription form - Does not check form on the first page
Filename:
MIME Type:
Creator:
Andreas Hedström Mace
Created:
2015-04-13 19:35:50 UTC
Size:
3.01 KB
patch
obsolete
>From 38ac51a921571d8ca799fcd6e7e2d91b39415674 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@biblibre.com> >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=UTF-8 >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 <andreas.hedstrom.mace@sub.su.se> >--- > .../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 8401968..778efcf 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) { >+ e.preventDefault(); >+ if (e.keyCode == 13) { >+ FindAcqui(); >+ } >+ }); >+ $("#biblionumber").on('keypress', function(e) { >+ e.preventDefault(); >+ if (e.keyCode == 13) { >+ Plugin(); >+ } >+ }); > $("select#frequency").change(function(){ > patternneedtobetested = 1; > $("input[name='enddate']").val(''); >@@ -479,7 +491,7 @@ $(document).ready(function() { > [% END %] > <li> > <label for="aqbooksellerid">Vendor: </label> >- <input type="text" name="aqbooksellerid" id="aqbooksellerid" value="[% aqbooksellerid %]" size="8" /> (<input type="text" name="aqbooksellername" value="[% aqbooksellername %]" disabled="disabled" readonly="readonly" />) <a href="#" onclick="FindAcqui(f)">Search for a vendor</a> >+ <input type="text" name="aqbooksellerid" id="aqbooksellerid" value="[% aqbooksellerid %]" size="8" /> (<input type="text" name="aqbooksellername" id="aqbooksellername" value="[% aqbooksellername %]" disabled="disabled" readonly="readonly" />) <a href="#" onclick="FindAcqui(f)">Search for a vendor</a> > </li> > <li> > <label for="biblionumber" class="required" title="Subscriptions must be associated with a bibliographic record">Record:</label> >-- >1.7.10.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 9139
:
37580
|
37780
|
38044
|
38050
|
38071