Replaced CGI dropdown box call wich is deprecated

Signed-off-by: Colin Campbell <colin.campbell@ptfs-europe.com>
This commit is contained in:
Jean-André Santoni 2010-02-22 11:54:10 +01:00 committed by Colin Campbell
parent df6283ffe9
commit 0efaa6a41c
2 changed files with 25 additions and 8 deletions

View File

@ -165,13 +165,20 @@
<!-- /TMPL_IF -->
<!-- TMPL_UNLESS NAME="letter" --><div class="dialog alert">No claims notice defined. <a href="/cgi-bin/koha/tools/letter.pl">Please define one</a>.</div><!-- /TMPL_UNLESS -->
<form id="claims" name="claims" action="claims.pl" method="post">
<fieldset><label for="supplierid">View: </label>
<select id="supplierid" size="1" name="supplierid">
<!-- TMPL_LOOP NAME="supplier_loop" -->
<option value="<!-- TMPL_VAR NAME="id" -->"<!-- TMPL_IF NAME="selected" --> selected="yes" <!-- /TMPL_IF -->><!-- TMPL_VAR NAME="name" -->
</option>
<!-- /TMPL_LOOP -->
</select>
<fieldset>
<label for="supplierid">Supplier: </label>
<select id="supplierid" name="supplierid">
<!-- TMPL_LOOP name="suploop"-->
<!-- TMPL_IF name="selected" -->
<option value="<!-- TMPL_VAR name="id" -->" selected="selected" >
<!-- TMPL_ELSE -->
<option value="<!-- TMPL_VAR name="id" -->">
<!-- /TMPL_IF -->
<!-- TMPL_VAR name="name" -->
(<!-- TMPL_VAR name="count" -->)
</option>
<!-- /TMPL_LOOP -->
</select>
<input type="submit" value="OK" />
<!-- TMPL_IF name="phone" -->Phone: <!-- TMPL_VAR name="phone" --><!-- /TMPL_IF -->
<!-- TMPL_IF name="booksellerfax" -->Fax: <!-- TMPL_VAR name="booksellerfax" --><!-- /TMPL_IF -->

View File

@ -53,6 +53,16 @@ my ($template, $loggedinuser, $cookie)
debug => 1,
});
my @suploop;
for ( sort {$supplierlist{$a} cmp $supplierlist{$b} } keys %supplierlist ) {
my ($count, @dummy) = GetLateOrMissingIssues($_, "", $order);
push @suploop, {
id => $_,
name => $supplierlist{$_},
count => $count,
selected => $_ == $supplierid,
};
}
my $letters = GetLetters('claimissues');
my @letters;
@ -82,7 +92,7 @@ if($op && $op eq 'preview'){
$template->param('letters'=>\@letters,'letter'=>$letter);
$template->param(
order =>$order,
supplier_loop => $supplierlist,
suploop => \@suploop,
phone => $supplierinfo[0]->{phone},
booksellerfax => $supplierinfo[0]->{booksellerfax},
bookselleremail => $supplierinfo[0]->{bookselleremail},