Bugzilla – Attachment 126986 Details for
Bug 23479
Hold cancellation confirmation too generic
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 23479: Hold cancellation confirmation too generic
Bug-23479-Hold-cancellation-confirmation-too-gener.patch (text/plain), 4.82 KB, created by
Andrii Veremeienko
on 2021-10-27 12:35:05 UTC
(
hide
)
Description:
Bug 23479: Hold cancellation confirmation too generic
Filename:
MIME Type:
Creator:
Andrii Veremeienko
Created:
2021-10-27 12:35:05 UTC
Size:
4.82 KB
patch
obsolete
>From 0e94dc2908fe90c01973e6567697cef6415989ba Mon Sep 17 00:00:00 2001 >From: Andrii Veremeienko <averemeienko@jabra.com> >Date: Wed, 27 Oct 2021 15:34:11 +0300 >Subject: [PATCH] Bug 23479: Hold cancellation confirmation too generic >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >Solution was to specify patron's name in format <patron.firstname> <patron.surname> (<patron.cardnumber>)" >and biblio's title in the hold cancellation message. > >e.g.: >'Are you sure you want to cancel hold of "ÐÑÑана окÑÑжаÑÑей ÑÑÐµÐ´Ñ Ð² ÑепÑблике ÐелаÑÑÑÑ" for "John Doe (12)"?' > >How to test: >1. Go to the item search; >2. Search for the book you want to place hold for; >3. Select existing patron to place hold for him; >4. Place hold; >5. Go to koha/reserve/request.pl; >6. Click on "Cancel hold" button for hold from the list (red X icon on the grid); >7. Observe that text displayed on cancellation modal window is very general and doesn't contains patron's name and biblio's title; >8. Apply patch; >9. Go through steps 1-6; >10. Observe that cancellation text contains patron's name and biblio's title; >--- > koha-tmpl/intranet-tmpl/prog/en/includes/holds_table.inc | 7 ++++++- > .../intranet-tmpl/prog/en/modules/reserve/request.tt | 8 +++++++- > reserve/request.pl | 1 + > 3 files changed, 14 insertions(+), 2 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/holds_table.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/holds_table.inc >index 516b04f322..2bc30c7a54 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/holds_table.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/holds_table.inc >@@ -190,7 +190,12 @@ > [%- END -%] > [%- END -%] > <td> >- <a class="cancel-hold" title="Cancel hold" data-borrowernumber="[% hold.borrowernumber | html %]" data-biblionumber="[% hold.biblionumber | html %]" data-id="[% hold.reserve_id | html %]" href="request.pl?action=cancel&borrowernumber=[% hold.borrowernumber | html %]&biblionumber=[% hold.biblionumber | html %]&reserve_id=[% hold.reserve_id | html %]&date=[% hold.date | html %]"> >+ <a class="cancel-hold" title="Cancel hold" >+ data-borrower-name="[% hold.patron.firstname | html %] [% hold.patron.surname | html %] ([% hold.patron.cardnumber | html %])" >+ data-biblio-title="[% hold.biblio_title | html %]" >+ data-borrowernumber="[% hold.borrowernumber | html %]" data-biblionumber="[% hold.biblionumber | html %]" >+ data-id="[% hold.reserve_id | html %]" >+ href="request.pl?action=cancel&borrowernumber=[% hold.borrowernumber | html %]&biblionumber=[% hold.biblionumber | html %]&reserve_id=[% hold.reserve_id | html %]&date=[% hold.date | html %]"> > <img src="[% interface | html %]/[% theme | html %]/img/x.png" alt="Cancel" /> > </a> > </td> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt >index 8e9bf1fd4f..260350467f 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt >@@ -1043,7 +1043,7 @@ > </div> > > <div class="modal-body"> >- <p>Are you sure you want to cancel this hold?</p> >+ <p id="cancellation-text"></p> > > <fieldset class="action"> > [% SET hold_cancellation = AuthorisedValues.GetAuthValueDropbox('HOLD_CANCELLATION') %] >@@ -1560,6 +1560,12 @@ > let cancel_link; > $(".cancel-hold").on("click",function(e) { > e.preventDefault; >+ let borrower_name = $(this).data('borrower-name')?.trim(); >+ let biblio_title = $(this).data('biblio-title')?.trim(); >+ >+ let cancellation_text = _(`Are you sure you want to cancel hold on "${biblio_title}" for "${borrower_name}"?`); >+ $("#cancellation-text").html(cancellation_text); >+ > cancel_link = $(this); > $('#cancelModal').modal(); > return false; >diff --git a/reserve/request.pl b/reserve/request.pl >index 10fa575f11..2d25528935 100755 >--- a/reserve/request.pl >+++ b/reserve/request.pl >@@ -695,6 +695,7 @@ foreach my $biblionumber (@biblionumbers) { > $reserve{'date'} = $res->reservedate; > $reserve{'borrowernumber'} = $res->borrowernumber(); > $reserve{'biblionumber'} = $res->biblionumber(); >+ $reserve{'biblio_title'} = $biblio->title; > $reserve{'patron'} = $res->borrower; > $reserve{'notes'} = $res->reservenotes(); > $reserve{'waiting_date'} = $res->waitingdate(); >-- >2.17.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 23479
:
125991
|
125993
|
126986
|
127003
|
127004
|
127005
|
127006