Bugzilla – Attachment 103066 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.91 KB, created by
Jonathan Druart
on 2020-04-16 09:52:59 UTC
(
hide
)
Description:
Bug 25136: Make PatronSelfRegistrationLibraryList only effect new registration
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2020-04-16 09:52:59 UTC
Size:
1.91 KB
patch
obsolete
>From c8eb8cc369055b8a09d9e548be31798d4738cbcd 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. > >Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > 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.20.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 25136
:
103042
|
103056
| 103066 |
103067