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:
parent
d7bfba8a10
commit
6c3a28b640
3 changed files with 5 additions and 6 deletions
|
@ -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 %]
|
||||
|
||||
|
|
|
@ -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 -->
|
||||
|
||||
|
|
|
@ -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 =();
|
||||
|
|
Loading…
Reference in a new issue