|
Lines 135-141
my $branchfilter = $input->param('branchcode') || C4::Context->userenv->{'branch
Link Here
|
| 135 |
## |
135 |
## |
| 136 |
|
136 |
|
| 137 |
if ( $op =~ /save/i ) { |
137 |
if ( $op =~ /save/i ) { |
| 138 |
output_and_exit_if_error($input, $cookie, $template, { check => 'csrf_token' }); |
138 |
output_and_exit_if_error($input, $cookie, $template, { module => 'suggestions' , check => 'csrf_token' }); |
| 139 |
my @messages; |
139 |
my @messages; |
| 140 |
my $biblio = MarcRecordFromNewSuggestion({ |
140 |
my $biblio = MarcRecordFromNewSuggestion({ |
| 141 |
title => $suggestion_only->{title}, |
141 |
title => $suggestion_only->{title}, |
|
Lines 254-260
elsif ($op=~/add/) {
Link Here
|
| 254 |
} |
254 |
} |
| 255 |
elsif ($op=~/edit/) { |
255 |
elsif ($op=~/edit/) { |
| 256 |
#Edit suggestion |
256 |
#Edit suggestion |
| 257 |
output_and_exit_if_error($input, $cookie, $template, { check => 'csrf_token' }); |
257 |
output_and_exit_if_error($input, $cookie, $template, { module => 'suggestions', check => 'csrf_token' }); |
| 258 |
$suggestion_ref=&GetSuggestion($$suggestion_ref{'suggestionid'}); |
258 |
$suggestion_ref=&GetSuggestion($$suggestion_ref{'suggestionid'}); |
| 259 |
$suggestion_ref->{reasonsloop} = $reasonsloop; |
259 |
$suggestion_ref->{reasonsloop} = $reasonsloop; |
| 260 |
my $other_reason = 1; |
260 |
my $other_reason = 1; |
|
Lines 269-275
elsif ($op=~/edit/) {
Link Here
|
| 269 |
$op ='save'; |
269 |
$op ='save'; |
| 270 |
} |
270 |
} |
| 271 |
elsif ($op eq "update_status" ) { |
271 |
elsif ($op eq "update_status" ) { |
| 272 |
output_and_exit_if_error($input, $cookie, $template, { check => 'csrf_token' }); |
272 |
output_and_exit_if_error($input, $cookie, $template, { module => 'suggestions', check => 'csrf_token' }); |
| 273 |
my $suggestion; |
273 |
my $suggestion; |
| 274 |
# set accepted/rejected/managed informations if applicable |
274 |
# set accepted/rejected/managed informations if applicable |
| 275 |
# ie= if the librarian has chosen some action on the suggestions |
275 |
# ie= if the librarian has chosen some action on the suggestions |
|
Lines 306-312
elsif ($op eq "update_status" ) {
Link Here
|
| 306 |
} |
306 |
} |
| 307 |
redirect_with_params($input); |
307 |
redirect_with_params($input); |
| 308 |
}elsif ($op eq "delete" ) { |
308 |
}elsif ($op eq "delete" ) { |
| 309 |
output_and_exit_if_error($input, $cookie, $template, { check => 'csrf_token' }); |
309 |
output_and_exit_if_error($input, $cookie, $template, { module => 'suggestions', check => 'csrf_token' }); |
| 310 |
foreach my $delete_field (@editsuggestions) { |
310 |
foreach my $delete_field (@editsuggestions) { |
| 311 |
&DelSuggestion( $borrowernumber, $delete_field,'intranet' ); |
311 |
&DelSuggestion( $borrowernumber, $delete_field,'intranet' ); |
| 312 |
} |
312 |
} |
| 313 |
- |
|
|