Bug 5521 - item edit form appears if no items found

This patch changes the template so that if no items are
found the page doesn't show "The following barcodes were found"
and doesn't show the item edit form.

To test, submit a batch which contains no valid barcodes.
Compare to a batch which contains some or all valid barcodes.

Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
All tests succeed.

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
This commit is contained in:
Owen Leonard 2012-10-30 10:53:39 -04:00 committed by Jared Camins-Esakov
parent 560e2d7f67
commit 4e97465463

View file

@ -81,9 +81,11 @@ $(document).ready(function(){
[% END %] [% END %]
</tbody> </tbody>
</table> </table>
[% IF ( item_loop ) %]
[% UNLESS ( too_many_items ) %] [% UNLESS ( too_many_items ) %]
<h4>The following barcodes were found: </h4> <h4>The following barcodes were found: </h4>
[% END %] [% END %]
[% END %]
[% END %] <!-- /notfoundbarcodes --> [% END %] <!-- /notfoundbarcodes -->
<form name="f" action="batchMod.pl" method="post"> <form name="f" action="batchMod.pl" method="post">
@ -143,6 +145,7 @@ $(document).ready(function(){
[% END %] [% END %]
[% END %]<!-- /too_many_items --> [% END %]<!-- /too_many_items -->
[% IF ( item_loop ) %]
<div id="cataloguing_additem_newitem"> <div id="cataloguing_additem_newitem">
<h2>Edit Items</h2> <h2>Edit Items</h2>
<div class="hint">Checking the box right next the subfield label will disable the entry and delete the subfield on all selected items. Leave fields blank to make no change.</div> <div class="hint">Checking the box right next the subfield label will disable the entry and delete the subfield on all selected items. Leave fields blank to make no change.</div>
@ -182,6 +185,9 @@ $(document).ready(function(){
<a href="/cgi-bin/koha/tools/batchMod.pl" class="cancel" onclick="history.back();return false;">Cancel</a> <a href="/cgi-bin/koha/tools/batchMod.pl" class="cancel" onclick="history.back();return false;">Cancel</a>
</fieldset> </fieldset>
</div> </div>
[% ELSE %]
<p><a href="/cgi-bin/koha/tools/batchMod.pl">Return to batch item modification</a></p>
[% END %]
[% ELSE %] <!-- // show --> [% ELSE %] <!-- // show -->
<fieldset class="action"> <fieldset class="action">
[% IF ( src == 'CATALOGUING') %] [% IF ( src == 'CATALOGUING') %]