Bug 34601: [22.05.x] Fix edit/delete links on suggestion.tt
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
parent
d459d16f2d
commit
5a6b70efb1
|
|
@ -112,8 +112,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">
|
||||
|
|
@ -841,9 +841,9 @@
|
|||
</td>
|
||||
<td class="actions">
|
||||
<div class="btn-group dropup">
|
||||
<a class="btn btn-default btn-xs" role="button" href="suggestion.pl?suggestionid=[% suggestions_loo.suggestionid | html %]&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>
|
||||
<a class="btn btn-default btn-xs" role="button" href="suggestion.pl?suggestionid=[% suggestions_loo.suggestionid | html %]&op=edit&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>
|
||||
<ul class="dropdown-menu pull-right" role="menu" aria-labelledby="more_actions_[% suggestions_loo.suggestionid | html %]">
|
||||
<li><a class="deletesuggestion" href="suggestion.pl?op=delete&suggestionid=[% suggestions_loo.suggestionid | html %]"><i class="fa fa-trash"></i> Delete</a></li>
|
||||
<li><a class="deletesuggestion" href="suggestion.pl?op=delete&csrf_token=[% csrf_token | html %]&suggestionid=[% suggestions_loo.suggestionid | html %]"><i class="fa fa-trash"></i> Delete</a></li>
|
||||
[% UNLESS suggestions_loo.archived %]
|
||||
<li><a class="archivesuggestion" href="suggestion.pl?op=archive&suggestionid=[% suggestions_loo.suggestionid | html %]"><i class="fa fa-archive"></i> Archive</a></li>
|
||||
[% ELSE %]
|
||||
|
|
|
|||
|
|
@ -34,6 +34,7 @@ use Koha::Libraries;
|
|||
use Koha::Patrons;
|
||||
|
||||
use URI::Escape qw( uri_escape );
|
||||
use Koha::Token;
|
||||
|
||||
sub Init{
|
||||
my $suggestion= shift @_;
|
||||
|
|
@ -489,10 +490,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