Bug 24085

Summary: Double submission of forms on returns.pl
Product: Koha Reporter: Nick Clemens <nick>
Component: CirculationAssignee: Nick Clemens <nick>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: 1joynelson, gmcharlt, kyle.m.hall, lucas, martin.renvoize, oleonard
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23541
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18372
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
20.05.00, 19.11.02
Bug Depends on:    
Bug Blocks: 28064    
Attachments: Bug 24085: Make print and cancel-hold buttons instead of submit
Bug 24085: [18.11.x ONLY] Rebased version for testing
Bug 24085: Make print and cancel-hold buttons instead of submit
Bug 24085: Make print and cancel-hold buttons instead of submit

Description Nick Clemens 2019-11-21 20:40:31 UTC
The .print and .cancel-hold buttons in returns.tt have an event tied to the click, this adjusts some inputs and submits the forms. 

The buttons themselves are also submit buttons.

We should only have one method of submitting the form.
Comment 1 Nick Clemens 2019-11-21 20:44:09 UTC Comment hidden (obsolete)
Comment 2 Nick Clemens 2019-11-26 18:14:40 UTC
Created attachment 95839 [details] [review]
Bug 24085: [18.11.x ONLY] Rebased version for testing
Comment 3 Owen Leonard 2019-12-13 23:04:03 UTC
Created attachment 96286 [details] [review]
Bug 24085: Make print and cancel-hold buttons instead of submit

To test:
 1 - Place a hold on an item
 2 - Check in the item to trigger the hold
 3 - Test both the print and cancel buttons to make sure all looks
     correct

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 4 Jonathan Druart 2019-12-16 11:18:02 UTC
Created attachment 96313 [details] [review]
Bug 24085: Make print and cancel-hold buttons instead of submit

To test:
 1 - Place a hold on an item
 2 - Check in the item to trigger the hold
 3 - Test both the print and cancel buttons to make sure all looks
     correct

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 5 Martin Renvoize 2019-12-16 21:08:06 UTC
Nice work everyone!

Pushed to master for 20.05
Comment 6 Joy Nelson 2020-01-02 17:21:54 UTC
Pushed to 19.11.x branch for 19.11.02
Comment 7 Lucas Gass 2020-01-07 22:30:42 UTC
For 19.05.x I run into merge conflicts which I am able to solve but the QA tool does not like what I have done:

 FAIL	koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt
   OK	  filters
   OK	  forbidden patterns
   OK	  git manipulation
   OK	  js_in_body
   OK	  spelling
   OK	  tt_valid
   FAIL	  valid_template
		parse error - /kohadevbox/koha/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt line 873: unexpected token (END)
  [% END # /IF WrongTransfer && !transfertodo %]


Please advise!
Comment 8 Martin Renvoize 2021-03-31 09:56:16 UTC
I think this bug may have caused a regression of bug 18372