Bugzilla – Attachment 125991 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.58 KB, created by
Andrii Veremeienko
on 2021-10-09 11:34:36 UTC
(
hide
)
Description:
Bug 23479: Hold cancellation confirmation too generic
Filename:
MIME Type:
Creator:
Andrii Veremeienko
Created:
2021-10-09 11:34:36 UTC
Size:
4.58 KB
patch
obsolete
>From c0bb72939c508bbb33d50fed288ac90179261ebf Mon Sep 17 00:00:00 2001 >From: Andrii Veremeienko <averemeienko@jabra.com> >Date: Sat, 9 Oct 2021 14:32:13 +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 contains patron's name and biblio's title; >--- > koha-tmpl/intranet-tmpl/prog/en/includes/holds_table.inc | 7 ++++++- > koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt | 7 ++++++- > reserve/request.pl | 1 + > 3 files changed, 13 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 59f33cd2a0..ded18c2297 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/holds_table.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/holds_table.inc >@@ -196,7 +196,12 @@ > [% 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 f54ac0d32a..9be6f972f5 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt >@@ -1038,7 +1038,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') %] >@@ -1533,6 +1533,11 @@ > let cancel_link; > $(".cancel-hold").on("click",function(e) { > e.preventDefault; >+ var borrower_name = $(this).data('borrower-name'); >+ var biblio_title = $(this).data('biblio-title'); >+ >+ $("#cancellation-text").html(`Are you sure you want to cancel hold of <b>${biblio_title}</b> for <b>${borrower_name}</b>?`); >+ > cancel_link = $(this); > $('#cancelModal').modal(); > return false; >diff --git a/reserve/request.pl b/reserve/request.pl >index 6ab8ba7ac5..ea69bc8e0c 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