$op = 'else' unless $op;
my ( $template, $borrowernumber, $cookie );
-
+my $deleted = $input->param('deleted');
+my $submitted = $input->param('submitted');
if ( C4::Context->preference("AnonSuggestions") ) {
( $template, $borrowernumber, $cookie ) = get_template_and_user(
$$suggestion{suggestedby} ||= $borrowernumber unless ($allsuggestions);
}
# warn "bornum:",$borrowernumber;
-use YAML;
+
my $suggestions_loop =
&SearchSuggestion( $suggestion);
if ( $op eq "add_confirm" ) {
&SearchSuggestion( $suggestion );
}
$op = 'else';
+ print $input->redirect("/cgi-bin/koha/opac-suggestions.pl?op=else&submitted=1");
+ exit;
}
if ( $op eq "delete_confirm" ) {
&DelSuggestion( $borrowernumber, $delete_field );
}
$op = 'else';
+ print $input->redirect("/cgi-bin/koha/opac-suggestions.pl?op=else&deleted=1");
+ exit;
}
map{ $_->{'branchcodesuggestedby'}=GetBranchInfo($_->{'branchcodesuggestedby'})->[0]->{'branchname'}} @$suggestions_loop;
my $supportlist=GetSupportList();
} else {
$suggestion->{'showcheckbox'} = 0;
}
+ if($suggestion->{'patronreason'}){
+ $suggestion->{'patronreason'} = GetKohaAuthorisedValueLib("OPAC_SUG",$suggestion->{'patronreason'},1);
+ }
}
+my $patron_reason_loop = GetAuthorisedValues("OPAC_SUG");
+
$template->param(
%$suggestion,
itemtypeloop=> $supportlist,
suggestions_loop => $suggestions_loop,
+ patron_reason_loop => $patron_reason_loop,
showall => $allsuggestions,
"op_$op" => 1,
- suggestionsview => 1
+ suggestionsview => 1,
);
-
output_html_with_http_headers $input, $cookie, $template->output;