Bug 21398: Make search field mandatory when adding to a basket from an existing record
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Sat, 22 Sep 2018 14:08:16 +0000 (11:08 -0300)
committerNick Clemens <nick@bywatersolutions.com>
Fri, 28 Sep 2018 19:21:24 +0000 (19:21 +0000)
Test plan:
- Create a basket
- Click the "Add to basket" button
- Click "Search" on the first line
=> Without this patch you get an ugly screen: https://snag.gy/U8X3ZK.jpg
=> With this patch applied you will not be able to submit without
filling the input in

QA note: Yes, we could handle that controller side as well, but much
more work.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
koha-tmpl/intranet-tmpl/prog/en/includes/acquisitions-add-to-basket.inc

index 64234df..0bf4418 100644 (file)
@@ -5,7 +5,7 @@
         <li>
           <form action="/cgi-bin/koha/acqui/neworderbiblio.pl" method="post">
             <label>From an existing record:
         <li>
           <form action="/cgi-bin/koha/acqui/neworderbiblio.pl" method="post">
             <label>From an existing record:
-                <input type="text"  size="25" name="q" />
+                <input type="text"  size="25" name="q" required="required"/>
             </label>
             <input type="hidden" name="booksellerid" value="[% booksellerid | html %]" />
             <input type="hidden" name="basketno" value="[% basketno | html %]" />
             </label>
             <input type="hidden" name="booksellerid" value="[% booksellerid | html %]" />
             <input type="hidden" name="basketno" value="[% basketno | html %]" />