From c80648938ccd1e17c80d6be6b676260fda505aa8 Mon Sep 17 00:00:00 2001 From: alaurin Date: Mon, 12 Jun 2006 09:38:52 +0000 Subject: [PATCH] bug fixing : - Printer selection for add a new branch, is now working - the branchname of librarian is not display automaticly if you add a new branch - the printqueue is now displayed on branches infos page and edit branch page --- admin/branches.pl | 22 +++++++++---------- .../intranet-tmpl/prog/en/admin/branches.tmpl | 2 +- 2 files changed, 11 insertions(+), 13 deletions(-) diff --git a/admin/branches.pl b/admin/branches.pl index 32e5c3e6fa..4e730e8577 100755 --- a/admin/branches.pl +++ b/admin/branches.pl @@ -204,14 +204,14 @@ sub editbranchform { my $selected = 1 if $oldprinter eq $printers->{$thisprinter}->{'printqueue'}; my %row =(value => $thisprinter, selected => $selected, - branchprinter => $printers->{$thisprinter}->{'printername'}, + branchprinter => $printers->{$thisprinter}->{'printqueue'}, ); push @printerloop, \%row; } $template->param(printerloop => \@printerloop ); $template->param(branchcode => $data->{'branchcode'}); - $template->param(branchname => $data->{'branchname'}); + $template->param(branch_name => $data->{'branchname'}); $template->param(branchaddress1 => $data->{'branchaddress1'}); $template->param(branchaddress2 => $data->{'branchaddress2'}); $template->param(branchaddress3 => $data->{'branchaddress3'}); @@ -220,17 +220,15 @@ sub editbranchform { $template->param(branchemail => $data->{'branchemail'}); $template->param(branchip => $data->{'branchip'}); } - else { -# on add new branch mode, simple scrolling list - $CGIprinter=CGI::scrolling_list( -name => 'branchprinter', - -id => 'branchprinter', - -values => \@printerloop, - -size => 1, - -multiple => 0 ); - + else { #case of an add branch select printer + foreach my $thisprinter (keys %$printers) { + my %row =(value => $thisprinter, + branchprinter => $printers->{$thisprinter}->{'printqueue'}, + ); + push @printerloop, \%row; + } + $template->param(printerloop => \@printerloop ); } -# sending the cgiprinter to the template -# $template->param(printerloop => $CGIprinter); # make the checkboxs..... # diff --git a/koha-tmpl/intranet-tmpl/prog/en/admin/branches.tmpl b/koha-tmpl/intranet-tmpl/prog/en/admin/branches.tmpl index 7957ed2a66..074649af79 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/admin/branches.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/admin/branches.tmpl @@ -25,7 +25,7 @@ Name - " />  + " />  -- 2.20.1