Bugzilla – Attachment 103042 Details for
Bug 25136
PatronSelfRegistrationLibraryList controls both self-reg and self-modification
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 25136: Make PatronSelfRegistrationLibraryList only effect new registration
Bug-25136-Make-PatronSelfRegistrationLibraryList-o.patch (text/plain), 1.77 KB, created by
Lucas Gass (lukeg)
on 2020-04-15 22:47:58 UTC
(
hide
)
Description:
Bug 25136: Make PatronSelfRegistrationLibraryList only effect new registration
Filename:
MIME Type:
Creator:
Lucas Gass (lukeg)
Created:
2020-04-15 22:47:58 UTC
Size:
1.77 KB
patch
obsolete
>From cabb3d8297e6b8abab95cb428163d2cb396ee0f8 Mon Sep 17 00:00:00 2001 >From: Lucas Gass <lucas@bywatersolutions.com> >Date: Wed, 15 Apr 2020 22:46:23 +0000 >Subject: [PATCH] Bug 25136: Make PatronSelfRegistrationLibraryList only effect > new registration > >This patch makes it so PatronSelfRegistrationLibraryList will only effect the registration from and not the modification form. >TO TEST: >1. Turn on self reg and add some libaries to PatronSelfRegistrationLibraryList. >2. Notice that the libaries that display in the borrower_branchcode dropdown are the ones you selected on both the new registration from and the modification form. >3. Apply patch. >4. Now only the new registration from should show libaries on PatronSelfRegistrationLibraryList. >5. The modifciation dropdown should still show all libraries. >--- > opac/opac-memberentry.pl | 12 +++++++----- > 1 file changed, 7 insertions(+), 5 deletions(-) > >diff --git a/opac/opac-memberentry.pl b/opac/opac-memberentry.pl >index e954587d81..05241589b6 100755 >--- a/opac/opac-memberentry.pl >+++ b/opac/opac-memberentry.pl >@@ -76,11 +76,13 @@ my $mandatory = GetMandatoryFields($action); > > my @libraries = Koha::Libraries->search; > if ( my @libraries_to_display = split '\|', C4::Context->preference('PatronSelfRegistrationLibraryList') ) { >- @libraries = map { >- my $b = $_; >- my $branchcode = $_->branchcode; >- ( grep { $_ eq $branchcode } @libraries_to_display ) ? $b : () >- } @libraries; >+ if ( $action eq 'new' ) { >+ @libraries = map { >+ my $b = $_; >+ my $branchcode = $_->branchcode; >+ ( grep { $_ eq $branchcode } @libraries_to_display ) ? $b : () >+ } @libraries; >+ } > } > my ( $min, $max ) = C4::Members::get_cardnumber_length(); > if ( defined $min ) { >-- >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 25136
:
103042
|
103056
|
103066
|
103067