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 186-191 Link Here
186
    </div>
186
    </div>
187
187
188
    <form id="add_additional_content" method="post" action="/cgi-bin/koha/tools/additional-contents.pl" class="validate">
188
    <form id="add_additional_content" method="post" action="/cgi-bin/koha/tools/additional-contents.pl" class="validate">
189
        [% INCLUDE 'csrf-token.inc' %]
189
        <input type="hidden" name="op" value="add_validate" />
190
        <input type="hidden" name="op" value="add_validate" />
190
        <input type="hidden" name="category" value="[% category | html %]" />
191
        <input type="hidden" name="category" value="[% category | html %]" />
191
        <input type="hidden" name="code" value="[% additional_content.code | html %]" />
192
        <input type="hidden" name="code" value="[% additional_content.code | html %]" />
Lines 412-417 Link Here
412
            <fieldset class="action"><input type="submit" class="button" value="Delete selected" /></fieldset>
413
            <fieldset class="action"><input type="submit" class="button" value="Delete selected" /></fieldset>
413
        </form>
414
        </form>
414
        <form action="/cgi-bin/koha/tools/additional-contents.pl" method="post" id="delete_single">
415
        <form action="/cgi-bin/koha/tools/additional-contents.pl" method="post" id="delete_single">
416
            [% INCLUDE 'csrf-token.inc' %]
415
            <input type="hidden" id="del_op" name="op" value="delete_confirmed" />
417
            <input type="hidden" id="del_op" name="op" value="delete_confirmed" />
416
            <input type="hidden" id="del_category" name="category" value="[% category | html %]" />
418
            <input type="hidden" id="del_category" name="category" value="[% category | html %]" />
417
            <input type="hidden" id="del_ids" name="ids" />
419
            <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 202-207 elsif ( $op eq 'add_validate' ) { Link Here
202
    }
203
    }
203
}
204
}
204
elsif ( $op eq 'delete_confirmed' ) {
205
elsif ( $op eq 'delete_confirmed' ) {
206
    output_and_exit_if_error($cgi, $cookie, $template, { check => 'csrf_token' });
205
    my @ids = $cgi->multi_param('ids');
207
    my @ids = $cgi->multi_param('ids');
206
    my $deleted = eval {
208
    my $deleted = eval {
207
209
208
- 

Return to bug 34368