Bug 23220: Prevent form submission before redirect
authorNick Clemens <nick@bywatersolutions.com>
Wed, 26 Jun 2019 12:49:14 +0000 (12:49 +0000)
committerLucas Gass <lucas@bywatersolutions.com>
Thu, 25 Jul 2019 20:53:05 +0000 (20:53 +0000)
commite44d62b067db721a930c89cea9df5acd83ee45ee
treec76c3ab264fd15d90b2070484ed43f5df88f2bbd
parent496e507122bc3aa26828bb554db8d11562445eb1
Bug 23220: Prevent form submission before redirect

To test:
 1 - Check in an item to generate a transfer (form another library, no floating)
 2 - Check it in again, click 'Cancel transfer'
 3 - It may or may not work
 4 - To highlight the issue edit return.tt to add the delay line as below:
$('.cancel-transfer').on("click",function(e){
delay(5000);
window.location.href='/cgi-bin/koha/circ/returns.pl?itemnumber=[% itemnumber | html %]&amp;canceltransfer=1'
});
 5 - Check in the item repeatedly, click 'Cancel transfer'
 6 - View the item in the staff or opac and verify it remains in transit
 7 - Undo changes above, apply patch
 8 - Test 'Cancel transfer', note it works
 9 - Add the delay back in, confirm it still works

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 4dcf416dc9547fd28e6ed846d08d6bbecb144552)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 0dd58132e64be0d146d1809967a41730965c5d62)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt