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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt (-4 / +4 lines)
Lines 112-119 Link Here
112
                <div class="col-md-8 col-md-offset-2">
112
                <div class="col-md-8 col-md-offset-2">
113
113
114
                    <div id="toolbar" class="btn-toolbar">
114
                    <div id="toolbar" class="btn-toolbar">
115
                        <a class="btn btn-default" id="editsuggestion" href="suggestion.pl?op=edit&amp;suggestionid=[% suggestionid | html %]"><i class="fa fa-pencil"></i> Edit</a>
115
                        <a class="btn btn-default" id="editsuggestion" href="suggestion.pl?op=edit&amp;csrf_token=[% csrf_token | html %]&amp;suggestionid=[% suggestionid | html %]"><i class="fa fa-pencil"></i> Edit</a>
116
                        <a class="btn btn-default deletesuggestion" href="suggestion.pl?op=delete&amp;suggestionid=[% suggestionid | html %]"><i class="fa fa-trash"></i> Delete</a>
116
                        <a class="btn btn-default deletesuggestion" href="suggestion.pl?op=delete&amp;csrf_token=[% csrf_token | html %]&amp;suggestionid=[% suggestionid | html %]"><i class="fa fa-trash"></i> Delete</a>
117
                    </div>
117
                    </div>
118
118
119
                    <fieldset class="rows">
119
                    <fieldset class="rows">
Lines 841-849 Link Here
841
                                                </td>
841
                                                </td>
842
                                                <td class="actions">
842
                                                <td class="actions">
843
                                                    <div class="btn-group dropup">
843
                                                    <div class="btn-group dropup">
844
                                                        <a class="btn btn-default btn-xs" role="button" href="suggestion.pl?suggestionid=[% suggestions_loo.suggestionid | html %]&amp;op=edit"><i class="fa fa-pencil"></i> Edit</a><a class="btn btn-default btn-xs dropdown-toggle" id="more_actions_[% suggestions_loo.suggestionid | html %]" role="button" data-toggle="dropdown" href="#"><b class="caret"></b></a>
844
                                                        <a class="btn btn-default btn-xs" role="button" href="suggestion.pl?suggestionid=[% suggestions_loo.suggestionid | html %]&amp;op=edit&amp;csrf_token=[% csrf_token | html %]"><i class="fa fa-pencil"></i> Edit</a><a class="btn btn-default btn-xs dropdown-toggle" id="more_actions_[% suggestions_loo.suggestionid | html %]" role="button" data-toggle="dropdown" href="#"><b class="caret"></b></a>
845
                                                        <ul class="dropdown-menu pull-right" role="menu" aria-labelledby="more_actions_[% suggestions_loo.suggestionid | html %]">
845
                                                        <ul class="dropdown-menu pull-right" role="menu" aria-labelledby="more_actions_[% suggestions_loo.suggestionid | html %]">
846
                                                            <li><a class="deletesuggestion" href="suggestion.pl?op=delete&amp;suggestionid=[% suggestions_loo.suggestionid | html %]"><i class="fa fa-trash"></i> Delete</a></li>
846
                                                            <li><a class="deletesuggestion" href="suggestion.pl?op=delete&amp;csrf_token=[% csrf_token | html %]&amp;suggestionid=[% suggestions_loo.suggestionid | html %]"><i class="fa fa-trash"></i> Delete</a></li>
847
                                                            [% UNLESS suggestions_loo.archived %]
847
                                                            [% UNLESS suggestions_loo.archived %]
848
                                                                <li><a class="archivesuggestion" href="suggestion.pl?op=archive&amp;suggestionid=[% suggestions_loo.suggestionid | html %]"><i class="fa fa-archive"></i> Archive</a></li>
848
                                                                <li><a class="archivesuggestion" href="suggestion.pl?op=archive&amp;suggestionid=[% suggestions_loo.suggestionid | html %]"><i class="fa fa-archive"></i> Archive</a></li>
849
                                                            [% ELSE %]
849
                                                            [% ELSE %]
(-)a/suggestion/suggestion.pl (-1 / +6 lines)
Lines 34-39 use Koha::Libraries; Link Here
34
use Koha::Patrons;
34
use Koha::Patrons;
35
35
36
use URI::Escape qw( uri_escape );
36
use URI::Escape qw( uri_escape );
37
use Koha::Token;
37
38
38
sub Init{
39
sub Init{
39
    my $suggestion= shift @_;
40
    my $suggestion= shift @_;
Lines 489-498 foreach my $field ( qw(managedby acceptedby suggestedby budgetid) ) { Link Here
489
    $hashlists{ lc($field) . "_loop" } = \@codes_list;
490
    $hashlists{ lc($field) . "_loop" } = \@codes_list;
490
}
491
}
491
492
493
my $csrf_token = Koha::Token->new->generate_csrf({
494
    session_id => scalar $input->cookie('CGISESSID'),
495
});
496
492
$template->param(
497
$template->param(
493
    %hashlists,
498
    %hashlists,
494
    borrowernumber           => ($input->param('borrowernumber') // undef),
499
    borrowernumber           => ($input->param('borrowernumber') // undef),
495
    SuggestionStatuses       => GetAuthorisedValues('SUGGEST_STATUS'),
500
    SuggestionStatuses       => GetAuthorisedValues('SUGGEST_STATUS'),
501
    csrf_token               => $csrf_token,
496
);
502
);
497
output_html_with_http_headers $input, $cookie, $template->output;
503
output_html_with_http_headers $input, $cookie, $template->output;
498
504
499
- 

Return to bug 34601