query => $input,
type => "intranet",
authnotrequired => 0,
- flagsrequired => { parameters => 1},
+ flagsrequired => { parameters => 'parameters_remaining_permissions'},
debug => 1,
}
);
elsif ( $op eq 'delete_category' ) {
# if the user has pressed the "delete branch" button.
- my $message = "MESSAGE8" if CheckBranchCategorycode($categorycode);
- if ($message) {
+ if ( CheckBranchCategorycode($categorycode) ) {
$template->param( else => 1 );
- default($message,$template);
- }
- else {
+ default( 'MESSAGE8', $template );
+ } else {
$template->param( delete_category => 1 );
$template->param( categorycode => $categorycode );
}
#
# We export a "categoryloop" array to the template, each element of which
# contains separate 'categoryname', 'categorycode', 'codedescription', and
- # 'checked' fields. The $checked field is either '' or 'checked="checked"'
+ # 'checked' fields. The $checked field is either empty or 1'
my $catinfo = GetBranchCategory();
my @categoryloop = ();
foreach my $cat (@$catinfo) {
- my $checked = "";
+ my $checked;
my $tmp = quotemeta( $cat->{'categorycode'} );
if ( grep { /^$tmp$/ } @{ $data->{'categories'} } ) {
- $checked = "checked=\"checked\"";
+ $checked = 1;
}
push @categoryloop, {
categoryname => $cat->{'categoryname'},
# - branchfax |
# - branchemail /
# - branchurl /
+ # - opac_info (can contain HTML)
# - address-empty-p (1 if no address information, 0 otherwise)
# - categories (containing a static error message)
# - category_list (loop containing "categoryname")
'branchaddress3', 'branchzip',
'branchcity', 'branchstate', 'branchcountry',
'branchphone', 'branchfax',
- 'branchemail', 'branchurl',
+ 'branchemail', 'branchurl', 'opac_info',
'branchip', 'branchprinter', 'branchnotes'
)
{
categorytype => $cat->{'categorytype'},
};
}
- push @branchcategories, { categorytype => $ctype , $ctype => 1 , catloop => \@categories};
+ push @branchcategories, { categorytype => $ctype , $ctype => 1 , catloop => ( @categories ? \@categories : undef) };
}
$innertemplate->param(
branches => \@loop_data,
branchfax => $data->{'branchfax'},
branchemail => $data->{'branchemail'},
branchurl => $data->{'branchurl'},
+ opac_info => $data->{'opac_info'},
branchip => $data->{'branchip'},
branchnotes => $data->{'branchnotes'},
);