diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt index 66db3065c9..71b45c83be 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt @@ -160,7 +160,13 @@ Home library: [% END %] diff --git a/opac/opac-memberentry.pl b/opac/opac-memberentry.pl index 6dcc832693..34f9ac8289 100755 --- a/opac/opac-memberentry.pl +++ b/opac/opac-memberentry.pl @@ -32,6 +32,7 @@ use Koha::Patron::Modifications; use C4::Scrubber; use Email::Valid; use Koha::DateUtils; +use Koha::Libraries; use Koha::Patron::Images; use Koha::Token; @@ -65,10 +66,16 @@ if ( $action eq q{} ) { 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( /^$branchcode$/, @libraries_to_display ) ? $b : () } @libraries; +} + $template->param( action => $action, hidden => GetHiddenFields( $mandatory, 'registration' ), mandatory => $mandatory, + libraries => \@libraries, OPACPatronDetails => C4::Context->preference('OPACPatronDetails'), );