use C4::Auth;
use C4::Context;
use C4::Output;
-use C4::Branch; # GetBranches
use C4::Letters;
use C4::Members::Attributes;
$template->param(
oldbranchcode => $oldbranchcode,
branchcode => $branchcode,
- branchloop => _branchloop($branchcode),
copying => 1,
modify => 0,
);
$template->param(
module => $module,
- branchloop => _branchloop($branchcode),
SQLfieldnames => $field_selection,
branchcode => $branchcode,
);
my $oldmodule = $input->param('oldmodule');
my $code = $input->param('code');
my $name = $input->param('name');
- my @mtt = $input->param('message_transport_type');
- my @title = $input->param('title');
- my @content = $input->param('content');
+ my @mtt = $input->multi_param('message_transport_type');
+ my @title = $input->multi_param('title');
+ my @content = $input->multi_param('content');
for my $mtt ( @mtt ) {
my $is_html = $input->param("is_html_$mtt");
my $title = shift @title;
unless ( defined $branchcode ) {
if ( C4::Context->preference('DefaultToLoggedInLibraryNoticesSlips') ) {
- $branchcode = C4::Branch::mybranch();
+ $branchcode = C4::Context::mybranch();
}
}
$template->param(
letter => $loop_data,
- branchloop => _branchloop($branchcode),
+ branchcode => $branchcode,
);
}
-sub _branchloop {
- my ($branchcode) = @_;
-
- my $branches = GetBranches();
- my @branchloop;
- for my $thisbranch (sort { $branches->{$a}->{branchname} cmp $branches->{$b}->{branchname} } keys %$branches) {
- push @branchloop, {
- value => $thisbranch,
- selected => $branchcode && $thisbranch eq $branchcode,
- branchname => $branches->{$thisbranch}->{'branchname'},
- };
- }
-
- return \@branchloop;
-}
-
sub add_fields {
my @tables = @_;
my @fields = ();