Bugzilla – Attachment 142285 Details for
Bug 31422
Library limitations might cause data loss when editing patrons
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 31422: Add patron's current category to dropdown while editing
Bug-31422-Add-patrons-current-category-to-dropdown.patch (text/plain), 2.23 KB, created by
David Nind
on 2022-10-20 20:12:13 UTC
(
hide
)
Description:
Bug 31422: Add patron's current category to dropdown while editing
Filename:
MIME Type:
Creator:
David Nind
Created:
2022-10-20 20:12:13 UTC
Size:
2.23 KB
patch
obsolete
>From a0dda935e7ebf58f60e05936f4a1a25e030fa33b Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Thu, 20 Oct 2022 14:53:33 +0000 >Subject: [PATCH] Bug 31422: Add patron's current category to dropdown while > editing > >Signed-off-by: David Nind <david@davidnind.com> >--- > .../prog/en/modules/members/memberentrygen.tt | 3 +++ > members/memberentry.pl | 7 ++++++- > 2 files changed, 9 insertions(+), 1 deletion(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt >index 12f5eef2e4..1bbc78e574 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt >@@ -974,6 +974,9 @@ legend:hover { > </optgroup> > [% END %] > </select> >+ [% IF limited_category %] >+ <span style="float:right;" title="The patron's current category ([% patron_category.description | html %]) is limited to other branches"><i class="fa fa-exclamation-circle" aria-hidden="true"></i></span> >+ [% END %] > <span class="required">Required</span> > </li> > >diff --git a/members/memberentry.pl b/members/memberentry.pl >index 95f6e9dd58..ca43a1eede 100755 >--- a/members/memberentry.pl >+++ b/members/memberentry.pl >@@ -658,7 +658,12 @@ my $patron_categories = Koha::Patron::Categories->search_with_library_limits( > ); > my $no_categories = ! $patron_categories->count; > my $categories = {}; >-foreach my $patron_category ($patron_categories->as_list ) { >+my @patron_categories = $patron_categories->as_list; >+unless ( $patron_categories->find( $category->id ) ){ >+ $template->param( limited_category => 1 ); >+ push @patron_categories, $category; >+} >+foreach my $patron_category ( @patron_categories ) { > push @{ $categories->{ $patron_category->category_type } }, $patron_category; > } > >-- >2.30.2
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 31422
:
142259
|
142285
|
143050
|
143051
|
147698