View | Details | Raw Unified | Return to bug 16274
Collapse All | Expand All

(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt (-1 / +7 lines)
Lines 160-166 Link Here
160
                                        Home library:</label>
160
                                        Home library:</label>
161
161
162
                                        <select id="borrower_branchcode" name="borrower_branchcode">
162
                                        <select id="borrower_branchcode" name="borrower_branchcode">
163
                                            [% PROCESS options_for_libraries libraries => Branches.all( selected => borrower.branchcode ) %]
163
                                            [% FOREACH l IN libraries %]
164
                                                [% IF l.branchcode == borrower.branchcode %]
165
                                                    <option value="[% l.branchcode | html %]" selected="selected">[% l.branchname %]</option>
166
                                                [% ELSE %]
167
                                                    <option value="[% l.branchcode | html %]">[% l.branchname %]</option>
168
                                                [% END %]
169
                                            [% END %]
164
                                        </select>
170
                                        </select>
165
                                    </li>
171
                                    </li>
166
                                [% END %]
172
                                [% END %]
(-)a/opac/opac-memberentry.pl (-1 / +7 lines)
Lines 32-37 use Koha::Patron::Modifications; Link Here
32
use C4::Scrubber;
32
use C4::Scrubber;
33
use Email::Valid;
33
use Email::Valid;
34
use Koha::DateUtils;
34
use Koha::DateUtils;
35
use Koha::Libraries;
35
use Koha::Patron::Images;
36
use Koha::Patron::Images;
36
use Koha::Token;
37
use Koha::Token;
37
38
Lines 65-74 if ( $action eq q{} ) { Link Here
65
66
66
my $mandatory = GetMandatoryFields($action);
67
my $mandatory = GetMandatoryFields($action);
67
68
69
my @libraries = Koha::Libraries->search;
70
if ( my @libraries_to_display = split '\|', C4::Context->preference('PatronSelfRegistrationLibraryList') ) {
71
    @libraries = map { my $b = $_; my $branchcode = $_->branchcode; grep( /^$branchcode$/, @libraries_to_display ) ? $b : () } @libraries;
72
}
73
68
$template->param(
74
$template->param(
69
    action            => $action,
75
    action            => $action,
70
    hidden            => GetHiddenFields( $mandatory, 'registration' ),
76
    hidden            => GetHiddenFields( $mandatory, 'registration' ),
71
    mandatory         => $mandatory,
77
    mandatory         => $mandatory,
78
    libraries         => \@libraries,
72
    OPACPatronDetails => C4::Context->preference('OPACPatronDetails'),
79
    OPACPatronDetails => C4::Context->preference('OPACPatronDetails'),
73
);
80
);
74
81
75
- 

Return to bug 16274