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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt (-42 / +49 lines)
Lines 602-655 Link Here
602
            </li>
602
            </li>
603
        [% END %]
603
        [% END %]
604
    <li>
604
    <li>
605
       <label for="primary_contact_method">Main contact method:</label>
605
        [% IF mandatoryprimary_contact_method %]
606
       <select id="primary_contact_method" name="primary_contact_method">
606
       <label for="primary_contact_method" class="required">
607
       <option value=""></option>
607
       [% ELSE %]
608
         [% FOREACH contactprincipalloo IN contactprincipalloop %]
608
       <label for="primary_contact_method">
609
            [% IF ( contactprincipalloo.currentis_phone ) %]
609
       [% END %]
610
               [% IF ( primary_contact_method == 'phone' ) %]
610
       Main contact method: </label>
611
                 <option value="phone" selected="selected">Primary phone</option>
611
612
               [% ELSE %]
612
        <select id="primary_contact_method" name="primary_contact_method">
613
                 <option value="phone">Primary phone</option>
613
        <option value=""></option>
614
               [% END %]
614
        [% UNLESS nophone %]
615
            [% IF ( primary_contact_method == 'phone' ) %]
616
                <option value="phone" selected="selected">Primary phone</option>
617
            [% ELSE %]
618
                <option value="phone">Primary phone</option>
615
            [% END %]
619
            [% END %]
616
            [% IF ( contactprincipalloo.currentis_phonepro ) %]
620
        [% END %]
617
               [% IF ( primary_contact_method == 'phonepro' ) %]
621
        [% UNLESS nophonepro %]
618
                 <option value="phonepro" selected="selected">Secondary phone</option>
622
            [% IF ( primary_contact_method == 'phonepro' ) %]
619
               [% ELSE %]
623
                <option value="phonepro" selected="selected">Secondary phone</option>
620
                 <option value="phonepro">Secondary phone</option>
624
            [% ELSE %]
621
               [% END %]
625
                <option value="phonepro">Secondary phone</option>
622
            [% END %]
626
            [% END %]
623
            [% IF ( contactprincipalloo.currentis_mobile ) %]
627
        [% END %]
624
               [% IF ( primary_contact_method == 'mobile' ) %]
628
        [% UNLESS nomobile %]
625
                 <option value="mobile" selected="selected">Other phone</option>
629
            [% IF ( primary_contact_method == 'mobile' ) %]
626
               [% ELSE %]
630
                <option value="mobile" selected="selected">Other phone</option>
627
                 <option value="mobile">Other phone</option>
631
            [% ELSE %]
628
               [% END %]
632
                <option value="mobile">Other phone</option>
629
            [% END %]
633
            [% END %]
630
            [% IF ( contactprincipalloo.currentis_email ) %]
634
        [% END %]
631
               [% IF ( primary_contact_method == 'email' ) %]
635
        [% UNLESS noemail %]
632
                 <option value="email" selected="selected">Primary email</option>
636
            [% IF ( primary_contact_method == 'email' ) %]
633
               [% ELSE %]
637
                <option value="email" selected="selected">Primary email</option>
634
                 <option value="email">Primary email</option>
638
            [% ELSE %]
635
               [% END %]
639
                <option value="email">Primary email</option>
636
            [% END %]
640
            [% END %]
637
            [% IF ( contactprincipalloo.currentis_emailpro ) %]
641
        [% END %]
638
               [% IF ( primary_contact_method == 'emailpro' ) %]
642
        [% UNLESS noemailpro %]
639
                 <option value="emailpro" selected="selected">Secondary email</option>
643
            [% IF ( primary_contact_method == 'emailpro' ) %]
640
               [% ELSE %]
644
                <option value="emailpro" selected="selected">Secondary email</option>
641
                 <option value="emailpro">Secondary email</option>
645
            [% ELSE %]
642
               [% END %]
646
                <option value="emailpro">Secondary email</option>
643
            [% END %]
647
            [% END %]
644
            [% IF ( contactprincipalloo.currentis_fax ) %]
648
        [% END %]
645
               [% IF ( primary_contact_method == 'fax' ) %]
649
        [% UNLESS nofax %]
646
                 <option value="fax" selected="selected">Fax</option>
650
            [% IF ( primary_contact_method == 'fax' ) %]
647
               [% ELSE %]
651
                <option value="fax" selected="selected">Fax</option>
648
                 <option value="fax">Fax</option>
652
            [% ELSE %]
649
               [% END %]
653
                <option value="fax">Fax</option>
650
            [% END %]
654
            [% END %]
651
         [% END %]
655
        [% END %]
652
       </select>
656
        </select>
657
        [% IF mandatoryprimary_contact_method %]
658
            <span class="required">Required</span>
659
        [% END %]
653
    </li>
660
    </li>
654
    </ol>
661
    </ol>
655
662
(-)a/members/memberentry.pl (-11 lines)
Lines 640-656 $template->param( Link Here
640
);
640
);
641
if($no_categories){ $no_add = 1; }
641
if($no_categories){ $no_add = 1; }
642
642
643
my @contactprincipalloop;
644
my @fieldArray = qw(phone phonepro mobile email emailpro fax);
645
foreach my $field (@fieldArray) {
646
   if ( !(grep { $field eq $_ } @field_check)){
647
        push @contactprincipalloop,{
648
            'currentis_' . $field => 1
649
        };
650
    }
651
}
652
$template->param('contactprincipalloop' => \@contactprincipalloop);
653
654
my $cities = Koha::Cities->search( {}, { order_by => 'city_name' } );
643
my $cities = Koha::Cities->search( {}, { order_by => 'city_name' } );
655
my $roadtypes = C4::Koha::GetAuthorisedValues( 'ROADTYPE' );
644
my $roadtypes = C4::Koha::GetAuthorisedValues( 'ROADTYPE' );
656
$template->param(
645
$template->param(
(-)a/members/moremember.pl (-2 lines)
Lines 204-210 $template->param( Link Here
204
    fines           => $patron->account->balance,
204
    fines           => $patron->account->balance,
205
    translated_language => $translated_language,
205
    translated_language => $translated_language,
206
    detailview      => 1,
206
    detailview      => 1,
207
    primary_contact_method  => $data->{'primary_contact_method'},
208
    was_renewed     => scalar $input->param('was_renewed') ? 1 : 0,
207
    was_renewed     => scalar $input->param('was_renewed') ? 1 : 0,
209
    $category_type  => 1, # [% IF ( I ) %] = institutional/organisation
208
    $category_type  => 1, # [% IF ( I ) %] = institutional/organisation
210
    housebound_role => scalar $patron->housebound_role,
209
    housebound_role => scalar $patron->housebound_role,
211
- 

Return to bug 11879