Bug 10291: Clarify misleading variable name

Remove the unrequired extra processing and pass
the array of itemnumbers as itemnumbers_array

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
This commit is contained in:
Colin Campbell 2013-05-20 16:54:53 +01:00 committed by Galen Charlton
parent d7bfba8a10
commit 6c3a28b640
3 changed files with 5 additions and 6 deletions

View file

@ -119,8 +119,8 @@ for( x=0; x<allColumns.length; x++ ){
[% IF ( too_many_items ) %]
<p>Too many items ([% too_many_items %]) to display individually.</p>
[% FOREACH itemnumbers_hashre IN itemnumbers_hashref %]
<input type="hidden" name="itemnumber" value="[% itemnumbers_hashre.itemnumber %]" />
[% FOREACH itemnumber IN itemnumbers_array %]
<input type="hidden" name="itemnumber" value="[% itemnumber %]" />
[% END %]
[% END %]

View file

@ -141,8 +141,8 @@ $(document).ready(function(){
[% IF ( too_many_items ) %]
<p>Too many items ([% too_many_items %]): not displaying each one individually.</p>
[% FOREACH itemnumbers_hashre IN itemnumbers_hashref %]
<input type="hidden" name="itemnumber" value="[% itemnumbers_hashre.itemnumber %]" />
[% FOREACH itemnumber IN itemnumbers_array %]
<input type="hidden" name="itemnumber" value="[% itemnumber %]" />
[% END %]
[% END %]<!-- /too_many_items -->

View file

@ -261,8 +261,7 @@ if ($op eq "show"){
} else {
$template->param("too_many_items" => scalar(@itemnumbers));
# Even if we do not display the items, we need the itemnumbers
my @itemnumbers_hashref = map {{itemnumber => $_}} @itemnumbers;
$template->param("itemnumbers_hashref" => \@itemnumbers_hashref);
$template->param(itemnumbers_array => \@itemnumbers);
}
# now, build the item form for entering a new item
my @loop_data =();