Bug 31486: Redirect to proper page after message deletion

To test:
1. Go to a patron account and create some messages
2. Try deleting some from both the patron details page and the patron checkout page.
3. Notice that is you are on the patron checkout page and delete a message you are then redirected to the patron details page.
4. Apply patch
5. Try deleting messages from both pages and confirm you are redirected back to that same page and the message is properly deleted.

Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit a93d6fa853)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 0c91e94999)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
This commit is contained in:
Lucas Gass 2022-08-29 21:48:01 +00:00 committed by Arthur Suzuki
parent 58d5f00142
commit 45fd9c2e52
2 changed files with 5 additions and 1 deletions

View File

@ -218,7 +218,11 @@
<em>"[% patron_message.message | html %]"</em>
</span>
[% IF patron_message.branchcode == Branches.GetLoggedInBranchcode OR Koha.Preference('AllowAllMessageDeletion') %]
[% IF moremember %]
<a class="btn btn-link delete_message" href="/cgi-bin/koha/circ/del_message.pl?message_id=[% patron_message.message_id | html %]&amp;borrowernumber=[% patron_message.borrowernumber | html %]&amp;from=moremember"><i class="fa fa-trash"></i> Delete</a>
[% ELSE %]
<a class="btn btn-link delete_message" href="/cgi-bin/koha/circ/del_message.pl?message_id=[% patron_message.message_id | html %]&amp;borrowernumber=[% patron_message.borrowernumber | html %]"><i class="fa fa-trash"></i> Delete</a>
[% END %]
[% END %]
</li>
[% END %]

View File

@ -99,7 +99,7 @@
[% END %]
<div id="patron_messages" class="circmessage attention">
[% INCLUDE 'patron_messages.inc' %]
[% INCLUDE 'patron_messages.inc' moremember = 1 %]
</div>
<div class="col-sm-6">