|
Lines 28-34
use C4::Auth qw(get_template_and_user);
Link Here
|
| 28 |
use C4::Koha; |
28 |
use C4::Koha; |
| 29 |
use C4::Context; |
29 |
use C4::Context; |
| 30 |
use C4::Log qw( logaction ); |
30 |
use C4::Log qw( logaction ); |
| 31 |
use C4::Output qw(output_html_with_http_headers); |
31 |
use C4::Output qw(output_html_with_http_headers output_and_exit_if_error); |
| 32 |
use C4::Languages qw(getTranslatedLanguages); |
32 |
use C4::Languages qw(getTranslatedLanguages); |
| 33 |
use Koha::DateUtils qw( dt_from_string output_pref ); |
33 |
use Koha::DateUtils qw( dt_from_string output_pref ); |
| 34 |
|
34 |
|
|
Lines 62-68
my ( $template, $borrowernumber, $cookie ) = get_template_and_user(
Link Here
|
| 62 |
|
62 |
|
| 63 |
my @messages; |
63 |
my @messages; |
| 64 |
if ( $op eq 'add_form' ) { |
64 |
if ( $op eq 'add_form' ) { |
| 65 |
|
|
|
| 66 |
my $additional_content = Koha::AdditionalContents->find($id); |
65 |
my $additional_content = Koha::AdditionalContents->find($id); |
| 67 |
my $translated_contents; |
66 |
my $translated_contents; |
| 68 |
if ( $additional_content ) { |
67 |
if ( $additional_content ) { |
|
Lines 84-89
if ( $op eq 'add_form' ) {
Link Here
|
| 84 |
); |
83 |
); |
| 85 |
} |
84 |
} |
| 86 |
elsif ( $op eq 'add_validate' ) { |
85 |
elsif ( $op eq 'add_validate' ) { |
|
|
86 |
output_and_exit_if_error($cgi, $cookie, $template, { check => 'csrf_token' }); |
| 87 |
my $location = $cgi->param('location'); |
87 |
my $location = $cgi->param('location'); |
| 88 |
my $code = $cgi->param('code'); |
88 |
my $code = $cgi->param('code'); |
| 89 |
my $branchcode = $cgi->param('branchcode') || undef; |
89 |
my $branchcode = $cgi->param('branchcode') || undef; |
|
Lines 199-204
elsif ( $op eq 'add_validate' ) {
Link Here
|
| 199 |
} |
199 |
} |
| 200 |
} |
200 |
} |
| 201 |
elsif ( $op eq 'delete_confirmed' ) { |
201 |
elsif ( $op eq 'delete_confirmed' ) { |
|
|
202 |
output_and_exit_if_error($cgi, $cookie, $template, { check => 'csrf_token' }); |
| 202 |
my @ids = $cgi->multi_param('ids'); |
203 |
my @ids = $cgi->multi_param('ids'); |
| 203 |
my $deleted = eval { |
204 |
my $deleted = eval { |
| 204 |
|
205 |
|
| 205 |
- |
|
|