Bugzilla – Attachment 189791 Details for
Bug 34069
Add ability to restore a recently deleted borrower from deletedborrowers
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 34069: Fix categorycode/branch info, open in new tab, and other fixes
Bug-34069-Fix-categorycodebranch-info-open-in-new-.patch (text/plain), 5.73 KB, created by
Lucas Gass (lukeg)
on 2025-11-20 14:42:45 UTC
(
hide
)
Description:
Bug 34069: Fix categorycode/branch info, open in new tab, and other fixes
Filename:
MIME Type:
Creator:
Lucas Gass (lukeg)
Created:
2025-11-20 14:42:45 UTC
Size:
5.73 KB
patch
obsolete
>From d1549e0281393a735ee0b105e7cd845305ced7da Mon Sep 17 00:00:00 2001 >From: Lucas Gass <lucas@bywatersolutions.com> >Date: Wed, 19 Nov 2025 19:54:20 +0000 >Subject: [PATCH] Bug 34069: Fix categorycode/branch info, open in new tab, and > other fixes > >--- > .../intranet-tmpl/prog/en/includes/tools-menu.inc | 3 +++ > .../intranet-tmpl/prog/en/modules/members/deletemem.tt | 1 - > .../prog/en/modules/tools/restore_deleted_borrowers.tt | 10 +++++----- > tools/restore_deleted_borrowers.pl | 3 +++ > 4 files changed, 11 insertions(+), 6 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/tools-menu.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/tools-menu.inc >index d436580537f..04538627dcb 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/tools-menu.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/tools-menu.inc >@@ -15,6 +15,9 @@ > [% IF (CAN_user_clubs) %] > <li><a href="/cgi-bin/koha/clubs/clubs.pl">Patron clubs</a></li> > [% END %] >+ [% IF ( CAN_user_tools_restore_deleted_borrowers && Koha.Preference('AllowDeletedPatronRestoration') ) %] >+ <li><a href="/cgi-bin/koha/tools/restore_deleted_borrowers.pl">Restore deleted patrons</a></li> >+ [% END %] > [% IF ( CAN_user_tools_moderate_comments ) %] > <li><a href="/cgi-bin/koha/reviews/reviewswaiting.pl">Comments</a></li> > [% END %] >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 a345c395d87..8db47e13e4f 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/deletemem.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/deletemem.tt >@@ -69,7 +69,6 @@ > </ul> > [% END %] > <h1>Are you sure you want to delete the patron [% patron.firstname | html %] [% patron.surname | html %]?</h1> >- <p>This cannot be undone.</p> > <form method="post" action="/cgi-bin/koha/members/deletemem.pl"> > [% INCLUDE 'csrf-token.inc' %] > <input type="hidden" name="member" value="[% patron.borrowernumber | html %]" /> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/restore_deleted_borrowers.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/restore_deleted_borrowers.tt >index 21c684788ed..08e7814683c 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/restore_deleted_borrowers.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/restore_deleted_borrowers.tt >@@ -195,8 +195,8 @@ > <td>[% patron.borrowernumber | html %]</td> > <td>[% patron.surname | html %]</td> > <td>[% patron.firstname | html %]</td> >- <td>[% patron.category.description | html %]</td> >- <td>[% patron.library.branchname | html %]</td> >+ <td>[% Categories.GetName( patron.categorycode ) | html %]</td> >+ <td>[% Branches.GetName( patron.branchcode ) | html %]</td> > <td>[% patron.updated_on | $KohaDates %]</td> > </tr> > [% END %] >@@ -240,10 +240,10 @@ > <td>[% patron.cardnumber | html %]</td> > <td>[% patron.borrowernumber | html %]</td> > <td>[% patron.firstname | html %] [% patron.surname | html %]</td> >- <td>[% patron.category.description | html %]</td> >- <td>[% patron.library.branchname | html %]</td> >+ <td>[% Categories.GetName( patron.categorycode ) | html %]</td> >+ <td>[% Branches.GetName( patron.branchcode ) | html %]</td> > <td> >- <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% patron.borrowernumber | uri %]" class="btn btn-default btn-xs"> <i class="fa fa-user"></i> View patron </a> >+ <a target="_blank" href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% patron.borrowernumber | uri %]" class="btn btn-default btn-xs"> <i class="fa fa-user"></i> View patron </a> > </td> > </tr> > [% END %] >diff --git a/tools/restore_deleted_borrowers.pl b/tools/restore_deleted_borrowers.pl >index 79946512722..417b5e15087 100755 >--- a/tools/restore_deleted_borrowers.pl >+++ b/tools/restore_deleted_borrowers.pl >@@ -136,6 +136,7 @@ if ( $op eq 'search' ) { > email => $patron->email, > branchcode => $patron->branchcode, > updated_on => $patron->updated_on, >+ categorycode => $patron->categorycode, > }; > > push @deleted_patrons, $patron_data; >@@ -181,6 +182,8 @@ if ( $op eq 'search' ) { > cardnumber => $restored_patron->cardnumber, > firstname => $restored_patron->firstname, > surname => $restored_patron->surname, >+ branchcode => $restored_patron->branchcode, >+ categorycode => $restored_patron->categorycode, > }; > } catch { > push @errors, "Error restoring borrower $borrowernumber: $_"; >-- >2.39.5
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 34069
:
188299
|
188302
|
188988
|
188989
|
188990
|
189027
|
189028
|
189029
|
189030
|
189037
|
189066
|
189067
|
189370
|
189371
|
189372
|
189373
|
189374
|
189375
|
189376
|
189377
|
189642
|
189645
|
189718
|
189773
|
189774
|
189779
|
189780
|
189781
|
189782
|
189783
|
189784
|
189785
|
189786
|
189787
|
189788
|
189789
|
189790
|
189791
|
189792
|
189793
|
189794
|
189795
|
189940
|
189941
|
189942
|
189943
|
189944
|
189945
|
189946
|
189947
|
189948
|
189949
|
189950
|
189951
|
189952
|
189953
|
189954