Bug 8557: Prevents form validation by pressing "Enter"
authorChristophe Croullebois <christophe.croullebois@biblibre.com>
Thu, 20 Sep 2012 14:06:29 +0000 (16:06 +0200)
committerJared Camins-Esakov <jcamins@cpbibliography.com>
Wed, 28 Nov 2012 23:34:48 +0000 (18:34 -0500)
this patch prevents a scan machine to send 'enter' to the form when it is not expected.
The patch is on orderreceive.tt and serials-edit.tt.
Written by Alex Arnaud. MT6626.

Signed-off-by: Marc Veron <veron@veron.ch>
Tested with receiving orders and receiving serials. Could reporduce problem befor applying the patch. After applying the patch both forms behaved as expected.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Checked order receive and serials edit page, barcode + enter does
no longer submit the form.
All tests pass.
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt
koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-edit.tt

index c6559c3..79811bd 100644 (file)
 
 </div>
 </div><div class="yui-g"><fieldset class="action">
-        <input type="submit"  value="Save" />
+        <input type="submit" onclick="return false;" style="display: none;" id="phony_submit" value="phony_submit" name="phony_submit" />
+        <input type="submit"  value="Save" class="button" accesskey="w" />
         <a class="cancel" href="/cgi-bin/koha/acqui/parcel.pl?invoiceid=[% invoiceid %]">Cancel</a>
 </fieldset></div>    </form>
 [% ELSE %]
index 61b76a9..3fe4dc5 100644 (file)
@@ -370,8 +370,11 @@ $(document).ready(function() {
 [% END %]
 
 </table>
-    <fieldset class="action"><input type="submit" value="Save"  class="button" accesskey="w" />
-    [% UNLESS ( serialsadditems ) %]&nbsp;&nbsp;<input type="button" onclick="javascript:generateReceive()" value="Multi receiving">[% END %]
+    <fieldset class="action">
+       <input type="submit" onclick="return false;" style="display: none;" id="phony_submit" value="phony_submit" name="phony_submit" />
+       <input type="submit" value="Save"  class="button" accesskey="w" />
+       [% UNLESS ( serialsadditems ) %]&nbsp;&nbsp;<input type="button" onclick="javascript:generateReceive()" value="Multi receiving">[% END %]
+    </fieldset>
 </form>
 
 </div>