View | Details | Raw Unified | Return to bug 34368
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/additional-contents.tt (+2 lines)
Lines 201-206 Link Here
201
    </div>
201
    </div>
202
202
203
    <form id="add_additional_content" method="post" action="/cgi-bin/koha/tools/additional-contents.pl" class="validate">
203
    <form id="add_additional_content" method="post" action="/cgi-bin/koha/tools/additional-contents.pl" class="validate">
204
        [% INCLUDE 'csrf-token.inc' %]
204
        <input type="hidden" name="op" value="add_validate" />
205
        <input type="hidden" name="op" value="add_validate" />
205
        <input type="hidden" name="category" value="[% category | html %]" />
206
        <input type="hidden" name="category" value="[% category | html %]" />
206
        <input type="hidden" name="code" value="[% additional_content.code | html %]" />
207
        <input type="hidden" name="code" value="[% additional_content.code | html %]" />
Lines 454-459 Link Here
454
                <fieldset class="action"><input type="submit" class="btn btn-primary" value="Delete selected" /></fieldset>
455
                <fieldset class="action"><input type="submit" class="btn btn-primary" value="Delete selected" /></fieldset>
455
            </form>
456
            </form>
456
            <form action="/cgi-bin/koha/tools/additional-contents.pl" method="post" id="delete_single">
457
            <form action="/cgi-bin/koha/tools/additional-contents.pl" method="post" id="delete_single">
458
                [% INCLUDE 'csrf-token.inc' %]
457
                <input type="hidden" id="del_op" name="op" value="delete_confirmed" />
459
                <input type="hidden" id="del_op" name="op" value="delete_confirmed" />
458
                <input type="hidden" id="del_category" name="category" value="[% category | html %]" />
460
                <input type="hidden" id="del_category" name="category" value="[% category | html %]" />
459
                <input type="hidden" id="del_ids" name="ids" />
461
                <input type="hidden" id="del_ids" name="ids" />
(-)a/tools/additional-contents.pl (-2 / +3 lines)
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 84-89 if ( $op eq 'add_form' ) { Link Here
84
    );
84
    );
85
}
85
}
86
elsif ( $op eq 'add_validate' ) {
86
elsif ( $op eq 'add_validate' ) {
87
    output_and_exit_if_error($cgi, $cookie, $template, { check => 'csrf_token' });
87
    my $location   = $cgi->param('location');
88
    my $location   = $cgi->param('location');
88
    my $code       = $cgi->param('code');
89
    my $code       = $cgi->param('code');
89
    my $branchcode = $cgi->param('branchcode') || undef;
90
    my $branchcode = $cgi->param('branchcode') || undef;
Lines 199-204 elsif ( $op eq 'add_validate' ) { Link Here
199
    }
200
    }
200
}
201
}
201
elsif ( $op eq 'delete_confirmed' ) {
202
elsif ( $op eq 'delete_confirmed' ) {
203
    output_and_exit_if_error($cgi, $cookie, $template, { check => 'csrf_token' });
202
    my @ids = $cgi->multi_param('ids');
204
    my @ids = $cgi->multi_param('ids');
203
    my $deleted = eval {
205
    my $deleted = eval {
204
206
205
- 

Return to bug 34368