Bug 24085 - Double submission of forms on returns.pl
Summary: Double submission of forms on returns.pl
Status: Pushed to stable
Alias: None
Product: Koha
Classification: Unclassified
Component: Circulation (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Nick Clemens
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-11-21 20:40 UTC by Nick Clemens
Modified: 2020-01-07 22:30 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Who signed the patch off:
Text to go in the release notes:
Version(s) released in:
20.05.00, 19.11.02


Attachments
Bug 24085: Make print and cancel-hold buttons instead of submit (4.72 KB, patch)
2019-11-21 20:44 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 24085: [18.11.x ONLY] Rebased version for testing (4.35 KB, patch)
2019-11-26 18:14 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 24085: Make print and cancel-hold buttons instead of submit (4.77 KB, patch)
2019-12-13 23:04 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 24085: Make print and cancel-hold buttons instead of submit (4.84 KB, patch)
2019-12-16 11:18 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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!