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

(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt (-2 / +17 lines)
Lines 137-144 Link Here
137
                                    [% IF borrower && !(cardnumber_wrong_length || cardnumber_already_exists) %]
137
                                    [% IF borrower && !(cardnumber_wrong_length || cardnumber_already_exists) %]
138
                                        [% borrower.cardnumber %]
138
                                        [% borrower.cardnumber %]
139
                                    [% ELSE %]
139
                                    [% ELSE %]
140
                                        <input type="text" id="borrower_cardnumber" name="borrower_cardnumber" value="[% borrower.cardnumber %]" />
140
                                        [% IF minlength_cardnumber == maxlength_cardnumber %]
141
                                        [% IF mandatory.defined('cardnumber') %]<span class="required">Required</span>[% END %]
141
                                            <input type="text" id="borrower_cardnumber" name="borrower_cardnumber" size="20" value="[% borrower.cardnumber %]" minlength="[% minlength_cardnumber %]" maxlength="[% maxlength_cardnumber %]" />
142
                                            [% IF ( mandatory.defined('cardnumber') ) %]<span class="required">Required</span>[% END %]
143
                                            <div class="hint">Card number must be exactly [% minlength_cardnumber %] characters.</div>
144
                                        [% ELSIF minlength_cardnumber && maxlength_cardnumber %]
145
                                            <input type="text" id="borrower_cardnumber" name="borrower_cardnumber" size="20" value="[% borrower.cardnumber %]" minlength="[% minlength_cardnumber %]" maxlength="[% maxlength_cardnumber %]" />
146
                                            [% IF ( mandatory.defined('cardnumber') ) %]<span class="required">Required</span>[% END %]
147
                                            <div class="hint">Card number must be between [% minlength_cardnumber %] and [% maxlength_cardnumber %] characters.</div>
148
                                        [% ELSIF maxlength_cardnumber %]
149
                                            <input type="text" id="borrower_cardnumber" name="borrower_cardnumber" size="20" value="[% borrower.cardnumber %]" maxlength="[% maxlength_cardnumber %]" />
150
                                            [% IF ( mandatory.defined('cardnumber') ) %]<span class="required">Required</span>[% END %]
151
                                            <div class="hint">Card number can be up to [% maxlength_cardnumber %] characters.</div>
152
                                        [% ELSE %]
153
                                            <input type="text" id="borrower_cardnumber" name="borrower_cardnumber" size="20" value="[% borrower.cardnumber %]" />
154
                                            [% IF ( mandatory.defined('cardnumber') ) %]<span class="required">Required</span>[% END %]
155
                                            <div class="hint">There is no minimum or maximum character length.</div>
156
                                        [% END %]
142
                                    [% END %]
157
                                    [% END %]
143
                                </li>
158
                                </li>
144
                                [% END %]
159
                                [% END %]
(-)a/opac/opac-memberentry.pl (-1 / +7 lines)
Lines 70-75 my @libraries = Koha::Libraries->search; Link Here
70
if ( my @libraries_to_display = split '\|', C4::Context->preference('PatronSelfRegistrationLibraryList') ) {
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;
71
    @libraries = map { my $b = $_; my $branchcode = $_->branchcode; grep( /^$branchcode$/, @libraries_to_display ) ? $b : () } @libraries;
72
}
72
}
73
my ( $min, $max ) = C4::Members::get_cardnumber_length();
74
if ( defined $min ) {
75
     $template->param(
76
         minlength_cardnumber => $min,
77
         maxlength_cardnumber => $max
78
     );
79
 }
73
80
74
$template->param(
81
$template->param(
75
    action            => $action,
82
    action            => $action,
76
- 

Return to bug 17213