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

(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/virtualshelves-toolbar.inc (-2 / +2 lines)
Lines 16-23 Link Here
16
        <div class="btn-group">
16
        <div class="btn-group">
17
            <button class="btn btn-default dropdown-toggle" data-toggle="dropdown"><i class="fa-solid fa-pencil" aria-hidden="true"></i> Edit <span class="caret"></span></button>
17
            <button class="btn btn-default dropdown-toggle" data-toggle="dropdown"><i class="fa-solid fa-pencil" aria-hidden="true"></i> Edit <span class="caret"></span></button>
18
            <ul class="dropdown-menu">
18
            <ul class="dropdown-menu">
19
                <li><a href="/cgi-bin/koha/virtualshelves/shelves.pl?op=edit_form&amp;shelfnumber=[% shelf.shelfnumber | uri %]&amp;referer=[% op | uri %]">Edit list</a></li>
19
                <li><a href="/cgi-bin/koha/virtualshelves/shelves.pl?op=edit_form&amp;shelfnumber=[% shelf.shelfnumber | uri %]&amp;csrf_token=[% csrf_token | uri %]&amp;referer=[% op | uri %]">Edit list</a></li>
20
                <li><a id="deleteshelf" href="/cgi-bin/koha/virtualshelves/shelves.pl?op=delete&amp;shelfnumber=[% shelf.shelfnumber | html %]">Delete list</a></li>
20
                <li><a id="deleteshelf" href="/cgi-bin/koha/virtualshelves/shelves.pl?op=delete&amp;shelfnumber=[% shelf.shelfnumber | html %]&amp;csrf_token=[% csrf_token | html %]">Delete list</a></li>
21
            </ul>
21
            </ul>
22
        </div>
22
        </div>
23
        [% END %]
23
        [% END %]
(-)a/virtualshelves/shelves.pl (-1 / +8 lines)
Lines 39-44 use Koha::ItemTypes; Link Here
39
use Koha::CsvProfiles;
39
use Koha::CsvProfiles;
40
use Koha::Patrons;
40
use Koha::Patrons;
41
use Koha::Virtualshelves;
41
use Koha::Virtualshelves;
42
use Koha::Token;
42
43
43
use constant ANYONE    => 2;
44
use constant ANYONE    => 2;
44
use constant STAFF     => 3;
45
use constant STAFF     => 3;
Lines 385-390 if ( $op eq 'view' ) { Link Here
385
        # this check only serves for button display
386
        # this check only serves for button display
386
}
387
}
387
388
389
my $csrf_token = Koha::Token->new->generate_csrf(
390
    {
391
        session_id => scalar $query->cookie('CGISESSID'),
392
    }
393
);
394
388
$template->param(
395
$template->param(
389
    op       => $op,
396
    op       => $op,
390
    referer  => $referer,
397
    referer  => $referer,
Lines 394-399 $template->param( Link Here
394
    print    => scalar $query->param('print') || 0,
401
    print    => scalar $query->param('print') || 0,
395
    csv_profiles => [ Koha::CsvProfiles->search({ type => 'marc', used_for => 'export_records' })->as_list ],
402
    csv_profiles => [ Koha::CsvProfiles->search({ type => 'marc', used_for => 'export_records' })->as_list ],
396
    allow_transfer => $allow_transfer,
403
    allow_transfer => $allow_transfer,
404
    csrf_token   => $csrf_token,
397
);
405
);
398
406
399
output_html_with_http_headers $query, $cookie, $template->output;
407
output_html_with_http_headers $query, $cookie, $template->output;
400
- 

Return to bug 34650