Bug 25261: (QA follow-up) Non-confirm on return

This patch updates the confirmation from an alert to a dismissable modal
which allows for optionally not checking the item in

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
Martin Renvoize 2020-07-24 12:05:29 +01:00 committed by Jonathan Druart
parent 41589686e8
commit acf11bacfd
2 changed files with 29 additions and 25 deletions

View file

@ -299,6 +299,7 @@ if ($barcode) {
C4::Context->preference("CircConfirmItemParts")
&& $item->materials
&& !$query->param('multiple_confirm');
$template->param('multiple_confirmed' => 1) if $query->param('multiple_confirm');
# do the return
( $returned, $messages, $issue, $borrower ) =

View file

@ -118,30 +118,7 @@
</div>
[% END %]
[% IF needs_confirm %]
<div id="circ_needsconfirmation" class="dialog alert audio-alert-action">
<h3>Please confirm checkin</h3>
<ul>
[% IF additional_materials %]
<li>
Please confirm that the accompanying materials are present: [% additional_materials | html %]
</li>
[% END %]
</ul>
<form method="post" action="/cgi-bin/koha/circ/returns.pl" autocomplete="off">
<input type="hidden" name="barcode" value="[% itembarcode | html %]" />
[% IF additional_materials %]
<input type="hidden" name="multiple_confirm" value="1" />
[% END %]
<button type="submit" class="approve" accesskey="y"><i class="fa fa-check"></i> Yes, checkin (Y)</button>
<button type="submit" class="deny" accesskey="n"><i class="fa fa-times"></i> No, don't checkin (N)</button>
</form>
</div>
[% ELSE %]
[% IF additional_materials %]
[% IF additional_materials && !multiple_confirmed %]
<div class="dialog alert">
<ul>
<li>
@ -149,7 +126,6 @@
</li>
</ul>
</div>
[% END %]
[% END %]
[% IF ( collectionItemNeedsTransferred ) %]
@ -328,6 +304,33 @@
[% END # /IF checkinmsg %]
[% END # /BLOCK all_checkin_messages %]
[% IF needs_confirm %]
<div id="circ-needsconfirmation-modal" class="modal fade audio-alert-action block">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h3>Please confirm checkin</h3>
</div>
<div class="modal-body">
<ul>
<li>
Please confirm that the accompanying materials are present: [% additional_materials | html %]
</li>
</ul>
</div>
<div class="modal-footer">
<form method="post" action="/cgi-bin/koha/circ/returns.pl" autocomplete="off">
<input type="hidden" name="barcode" value="[% itembarcode | html %]" />
<input type="hidden" name="multiple_confirm" value="1" />
<button type="submit" class="approve" accesskey="y"><i class="fa fa-check"></i> Yes, checkin (Y)</button>
</form>
<button type="button" data-dismiss="modal" class="deny" accesskey="n"><i class="fa fa-times"></i> No, don't checkin (N)</button>
</div>
</div>
</div>
</div>
[% END %]
[% IF wrongbranch %]
<div id="wrong-branch-modal" class="modal fade audio-alert-action block">
<div class="modal-dialog">