Bug 34601: [22.11.x]Fix edit/delete links on suggestion.tt
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
This commit is contained in:
parent
46bc558c8e
commit
e75c29a01c
|
|
@ -98,8 +98,8 @@
|
|||
<div class="col-md-8 col-md-offset-2">
|
||||
|
||||
<div id="toolbar" class="btn-toolbar">
|
||||
<a class="btn btn-default" id="editsuggestion" href="suggestion.pl?op=edit&suggestionid=[% suggestionid | html %]"><i class="fa fa-pencil"></i> Edit</a>
|
||||
<a class="btn btn-default deletesuggestion" href="suggestion.pl?op=delete&suggestionid=[% suggestionid | html %]"><i class="fa fa-trash"></i> Delete</a>
|
||||
<a class="btn btn-default" id="editsuggestion" href="suggestion.pl?op=edit&csrf_token=[% csrf_token | html %]&suggestionid=[% suggestionid | html %]"><i class="fa fa-pencil"></i> Edit</a>
|
||||
<a class="btn btn-default deletesuggestion" href="suggestion.pl?op=delete&csrf_token=[% csrf_token | html %]&suggestionid=[% suggestionid | html %]"><i class="fa fa-trash"></i> Delete</a>
|
||||
</div>
|
||||
|
||||
<fieldset class="rows">
|
||||
|
|
@ -845,9 +845,9 @@
|
|||
</td>
|
||||
<td class="actions">
|
||||
<div class="btn-group dropup">
|
||||
<a class="btn btn-default btn-xs" role="button" href="suggestion.pl?suggestionid=[% s.suggestionid | html %]&op=edit"><i class="fa fa-pencil"></i> Edit</a><a class="btn btn-default btn-xs dropdown-toggle" id="more_actions_[% s.suggestionid | html %]" role="button" data-toggle="dropdown" href="#"><b class="caret"></b></a>
|
||||
<a class="btn btn-default btn-xs" role="button" href="suggestion.pl?suggestionid=[% s.suggestionid | html %]&csrf_token=[% csrf_token | html %]&op=edit"><i class="fa fa-pencil"></i> Edit</a><a class="btn btn-default btn-xs dropdown-toggle" id="more_actions_[% s.suggestionid | html %]" role="button" data-toggle="dropdown" href="#"><b class="caret"></b></a>
|
||||
<ul class="dropdown-menu pull-right" role="menu" aria-labelledby="more_actions_[% s.suggestionid | html %]">
|
||||
<li><a class="deletesuggestion" href="suggestion.pl?op=delete&suggestionid=[% s.suggestionid | html %]"><i class="fa fa-trash"></i> Delete</a></li>
|
||||
<li><a class="deletesuggestion" href="suggestion.pl?op=delete&suggestionid=[% s.suggestionid | html %]&csrf_token=[% csrf_token | html %]"><i class="fa fa-trash"></i> Delete</a></li>
|
||||
[% UNLESS s.archived %]
|
||||
<li><a class="archivesuggestion" href="suggestion.pl?op=archive&suggestionid=[% s.suggestionid | html %]"><i class="fa fa-archive"></i> Archive</a></li>
|
||||
[% ELSE %]
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@ use Koha::AuthorisedValues;
|
|||
use Koha::Acquisition::Currencies;
|
||||
use Koha::Libraries;
|
||||
use Koha::Patrons;
|
||||
use Koha::Token;
|
||||
|
||||
use URI::Escape qw( uri_escape );
|
||||
|
||||
|
|
@ -530,10 +531,15 @@ foreach my $field ( qw(managedby acceptedby suggestedby budgetid) ) {
|
|||
$hashlists{ lc($field) . "_loop" } = \@codes_list;
|
||||
}
|
||||
|
||||
my $csrf_token = Koha::Token->new->generate_csrf({
|
||||
session_id => scalar $input->cookie('CGISESSID'),
|
||||
});
|
||||
|
||||
$template->param(
|
||||
%hashlists,
|
||||
borrowernumber => ($input->param('borrowernumber') // undef),
|
||||
SuggestionStatuses => GetAuthorisedValues('SUGGEST_STATUS'),
|
||||
csrf_token => $csrf_token,
|
||||
);
|
||||
output_html_with_http_headers $input, $cookie, $template->output;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue