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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt (-6 / +7 lines)
Lines 596-630 $(document).ready(function() { Link Here
596
[% END %]
596
[% END %]
597
[% IF ( step_3 ) %]
597
[% IF ( step_3 ) %]
598
598
599
  [% SET autoMemberNum = Koha.Preference('autoMemberNum') %]
599
  <fieldset class="rows" id="memberentry_library_management">
600
  <fieldset class="rows" id="memberentry_library_management">
600
    <legend id="library_management_lgd">Library management</legend><ol>
601
    <legend id="library_management_lgd">Library management</legend><ol>
601
      [% UNLESS nocardnumber %]
602
      [% UNLESS nocardnumber %]
602
        <li>
603
        <li>
603
          [% IF mandatorycardnumber and not Koha.Preference('autoMemberNum') %]
604
          [% IF mandatorycardnumber and not autoMemberNum %]
604
            <label for="cardnumber" class="required">
605
            <label for="cardnumber" class="required">
605
          [% ELSE %]
606
          [% ELSE %]
606
            <label for="cardnumber" class="validated">
607
            <label for="cardnumber" class="validated">
607
          [% END %]
608
          [% END %]
608
          [% IF Koha.Preference('autoMemberNum') %]
609
          [% IF autoMemberNum %]
609
              Card number<br>(<u>leave blank for auto calc during registration</u>): </label>
610
              Card number<br>(<u>leave blank for auto calc during registration</u>): </label>
610
          [% ELSE %]
611
          [% ELSE %]
611
              Card number: </label>
612
              Card number: </label>
612
          [% END %]
613
          [% END %]
613
          [% IF minlength_cardnumber == maxlength_cardnumber %]
614
          [% IF minlength_cardnumber == maxlength_cardnumber %]
614
                <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% cardnumber | html %]" minlength="[% minlength_cardnumber %]" maxlength="[% maxlength_cardnumber %]" />
615
                <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% cardnumber | html %]" minlength="[% minlength_cardnumber %]" maxlength="[% maxlength_cardnumber %]" />
615
                [% IF mandatorycardnumber and not Koha.Preference('autoMemberNum') %]<span class="required">Required</span>[% END %]
616
                [% IF mandatorycardnumber and not autoMemberNum %]<span class="required">Required</span>[% END %]
616
                <div class="hint">Card number must be exactly [% minlength_cardnumber %] characters.</div>
617
                <div class="hint">Card number must be exactly [% minlength_cardnumber %] characters.</div>
617
          [% ELSIF minlength_cardnumber && maxlength_cardnumber %]
618
          [% ELSIF minlength_cardnumber && maxlength_cardnumber %]
618
                <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% cardnumber | html %]" minlength="[% minlength_cardnumber %]" maxlength="[% maxlength_cardnumber %]" />
619
                <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% cardnumber | html %]" minlength="[% minlength_cardnumber %]" maxlength="[% maxlength_cardnumber %]" />
619
                [% IF mandatorycardnumber and not Koha.Preference('autoMemberNum') %]<span class="required">Required</span>[% END %]
620
                [% IF mandatorycardnumber and not autoMemberNum %]<span class="required">Required</span>[% END %]
620
                <div class="hint">Card number must be between [% minlength_cardnumber %] and [% maxlength_cardnumber %] characters.</div>
621
                <div class="hint">Card number must be between [% minlength_cardnumber %] and [% maxlength_cardnumber %] characters.</div>
621
          [% ELSIF maxlength_cardnumber %]
622
          [% ELSIF maxlength_cardnumber %]
622
                <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% cardnumber | html %]" maxlength="[% maxlength_cardnumber %]" />
623
                <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% cardnumber | html %]" maxlength="[% maxlength_cardnumber %]" />
623
                [% IF mandatorycardnumber and not Koha.Preference('autoMemberNum') %]<span class="required">Required</span>[% END %]
624
                [% IF mandatorycardnumber and not autoMemberNum %]<span class="required">Required</span>[% END %]
624
                <div class="hint">Card number can be up to [% maxlength_cardnumber %] characters.</div>
625
                <div class="hint">Card number can be up to [% maxlength_cardnumber %] characters.</div>
625
          [% ELSE %]
626
          [% ELSE %]
626
                <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% cardnumber | html %]" />
627
                <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% cardnumber | html %]" />
627
                [% IF mandatorycardnumber and not Koha.Preference('autoMemberNum') %]<span class="required">Required</span>[% END %]
628
                [% IF mandatorycardnumber and not autoMemberNum %]<span class="required">Required</span>[% END %]
628
                <div class="hint">There is no minimum or maximum character length.</div>
629
                <div class="hint">There is no minimum or maximum character length.</div>
629
          [% END %]
630
          [% END %]
630
        </li>
631
        </li>
(-)a/members/memberentry.pl (-7 lines)
Lines 561-572 if ( $op eq "duplicate" ) { Link Here
561
    $data{'cardnumber'} = "";
561
    $data{'cardnumber'} = "";
562
}
562
}
563
563
564
if (C4::Context->preference("autoMemberNum")) {
565
    $template->param( autoMemberNum => 1);
566
} else {
567
    $template->param( autoMemberNum => 0);
568
}
569
570
if(!defined($data{'sex'})){
564
if(!defined($data{'sex'})){
571
    $template->param( none => 1);
565
    $template->param( none => 1);
572
} elsif($data{'sex'} eq 'F'){
566
} elsif($data{'sex'} eq 'F'){
573
- 

Return to bug 6782