Bugzilla – Attachment 89360 Details for
Bug 10910
Add a warn when deleting a patron with pending suggestions
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 10910: Add a warning when deleting a patron with pending suggestions
Bug-10910-Add-a-warning-when-deleting-a-patron-wit.patch (text/plain), 2.33 KB, created by
Jonathan Druart
on 2019-05-05 14:43:25 UTC
(
hide
)
Description:
Bug 10910: Add a warning when deleting a patron with pending suggestions
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2019-05-05 14:43:25 UTC
Size:
2.33 KB
patch
obsolete
>From 2a343c251adf63b8d4d53b4c8363a92ff4615634 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Sun, 5 May 2019 09:42:45 -0500 >Subject: [PATCH] Bug 10910: Add a warning when deleting a patron with pending > suggestions > >--- > koha-tmpl/intranet-tmpl/prog/en/modules/members/deletemem.tt | 3 +++ > members/deletemem.pl | 9 +++++++++ > 2 files changed, 12 insertions(+) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/deletemem.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/deletemem.tt >index f17df687d4..57273813f7 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/deletemem.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/deletemem.tt >@@ -38,6 +38,9 @@ > [%# TODO add "patron does not exist" unless patron %] > <div class="dialog alert"> > <h3>Are you sure you want to delete the patron [% patron.firstname | html %] [% patron.surname | html %]? This cannot be undone.</h3> >+ [% IF pending_suggestions > 0 %] >+ <h3>Note that this patron has [% pending_suggestions %] pending suggestions.</h3> >+ [% END %] > <form action="/cgi-bin/koha/members/deletemem.pl"> > <input type="hidden" name="csrf_token" value="[% csrf_token | html %]" /> > <input type="hidden" name="member" value="[% patron.borrowernumber | html %]"/> >diff --git a/members/deletemem.pl b/members/deletemem.pl >index 3d8712ede7..66b3680a62 100755 >--- a/members/deletemem.pl >+++ b/members/deletemem.pl >@@ -28,6 +28,7 @@ use C4::Context; > use C4::Output; > use C4::Auth; > use C4::Members; >+use C4::Suggestions qw( SearchSuggestion ); > use Koha::Patrons; > use Koha::Token; > use Koha::Patron::Categories; >@@ -100,6 +101,14 @@ if ( $op eq 'delete_confirm' or $countissues > 0 or $charges or $is_guarantor ) > $template->param(guarantees => 1); > } > >+ # Add warning if patron has pending suggestions >+ $template->param( >+ pending_suggestions => scalar @{ >+ C4::Suggestions::SearchSuggestion( >+ { suggestedby => $member, STATUS => 'ASKED' } >+ ) >+ } >+ ); > # This is silly written but reflect the same conditions as above > if ( not $countissues > 0 and not $charges and not $is_guarantor ) { > $template->param( >-- >2.11.0
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 10910
:
89360
|
103903
|
104094
|
104128
|
104129
|
104237
|
104238
|
105752
|
105753