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 509-562 Link Here
509
509
510
   [% END %]
510
   [% END %]
511
    <li>
511
    <li>
512
       <label for="primary_contact_method">Main contact method:</label>
512
        [% IF mandatoryprimary_contact_method %]
513
       <select id="primary_contact_method" name="primary_contact_method">
513
       <label for="primary_contact_method" class="required">
514
       <option value=""></option>
514
       [% ELSE %]
515
         [% FOREACH contactprincipalloo IN contactprincipalloop %]
515
       <label for="primary_contact_method">
516
            [% IF ( contactprincipalloo.currentis_phone ) %]
516
       [% END %]
517
               [% IF ( primary_contact_method == 'phone' ) %]
517
       Main contact method: </label>
518
                 <option value="phone" selected="selected">Primary phone</option>
518
519
               [% ELSE %]
519
        <select id="primary_contact_method" name="primary_contact_method">
520
                 <option value="phone">Primary phone</option>
520
        <option value=""></option>
521
               [% END %]
521
        [% UNLESS nophone %]
522
            [% IF ( primary_contact_method == 'phone' ) %]
523
                <option value="phone" selected="selected">Primary phone</option>
524
            [% ELSE %]
525
                <option value="phone">Primary phone</option>
522
            [% END %]
526
            [% END %]
523
            [% IF ( contactprincipalloo.currentis_phonepro ) %]
527
        [% END %]
524
               [% IF ( primary_contact_method == 'phonepro' ) %]
528
        [% UNLESS nophonepro %]
525
                 <option value="phonepro" selected="selected">Secondary phone</option>
529
            [% IF ( primary_contact_method == 'phonepro' ) %]
526
               [% ELSE %]
530
                <option value="phonepro" selected="selected">Secondary phone</option>
527
                 <option value="phonepro">Secondary phone</option>
531
            [% ELSE %]
528
               [% END %]
532
                <option value="phonepro">Secondary phone</option>
529
            [% END %]
533
            [% END %]
530
            [% IF ( contactprincipalloo.currentis_mobile ) %]
534
        [% END %]
531
               [% IF ( primary_contact_method == 'mobile' ) %]
535
        [% UNLESS nomobile %]
532
                 <option value="mobile" selected="selected">Other phone</option>
536
            [% IF ( primary_contact_method == 'mobile' ) %]
533
               [% ELSE %]
537
                <option value="mobile" selected="selected">Other phone</option>
534
                 <option value="mobile">Other phone</option>
538
            [% ELSE %]
535
               [% END %]
539
                <option value="mobile">Other phone</option>
536
            [% END %]
540
            [% END %]
537
            [% IF ( contactprincipalloo.currentis_email ) %]
541
        [% END %]
538
               [% IF ( primary_contact_method == 'email' ) %]
542
        [% UNLESS noemail %]
539
                 <option value="email" selected="selected">Primary email</option>
543
            [% IF ( primary_contact_method == 'email' ) %]
540
               [% ELSE %]
544
                <option value="email" selected="selected">Primary email</option>
541
                 <option value="email">Primary email</option>
545
            [% ELSE %]
542
               [% END %]
546
                <option value="email">Primary email</option>
543
            [% END %]
547
            [% END %]
544
            [% IF ( contactprincipalloo.currentis_emailpro ) %]
548
        [% END %]
545
               [% IF ( primary_contact_method == 'emailpro' ) %]
549
        [% UNLESS noemailpro %]
546
                 <option value="emailpro" selected="selected">Secondary email</option>
550
            [% IF ( primary_contact_method == 'emailpro' ) %]
547
               [% ELSE %]
551
                <option value="emailpro" selected="selected">Secondary email</option>
548
                 <option value="emailpro">Secondary email</option>
552
            [% ELSE %]
549
               [% END %]
553
                <option value="emailpro">Secondary email</option>
550
            [% END %]
554
            [% END %]
551
            [% IF ( contactprincipalloo.currentis_fax ) %]
555
        [% END %]
552
               [% IF ( primary_contact_method == 'fax' ) %]
556
        [% UNLESS nofax %]
553
                 <option value="fax" selected="selected">Fax</option>
557
            [% IF ( primary_contact_method == 'fax' ) %]
554
               [% ELSE %]
558
                <option value="fax" selected="selected">Fax</option>
555
                 <option value="fax">Fax</option>
559
            [% ELSE %]
556
               [% END %]
560
                <option value="fax">Fax</option>
557
            [% END %]
561
            [% END %]
558
         [% END %]
562
        [% END %]
559
       </select>
563
        </select>
564
        [% IF mandatoryprimary_contact_method %]
565
            <span class="required">Required</span>
566
        [% END %]
560
    </li>
567
    </li>
561
    </ol>
568
    </ol>
562
569
(-)a/members/memberentry.pl (-11 lines)
Lines 645-661 $template->param('typeloop' => \@typeloop, Link Here
645
        no_categories => $no_categories);
645
        no_categories => $no_categories);
646
if($no_categories){ $no_add = 1; }
646
if($no_categories){ $no_add = 1; }
647
647
648
my @contactprincipalloop;
649
my @fieldArray = qw(phone phonepro mobile email emailpro fax);
650
foreach my $field (@fieldArray) {
651
   if ( !(grep { $field eq $_ } @field_check)){
652
        push @contactprincipalloop,{
653
            'currentis_' . $field => 1
654
        };
655
    }
656
}
657
$template->param('contactprincipalloop' => \@contactprincipalloop);
658
659
my $cities = Koha::Cities->search( {}, { order_by => 'city_name' } );
648
my $cities = Koha::Cities->search( {}, { order_by => 'city_name' } );
660
my $roadtypes = C4::Koha::GetAuthorisedValues( 'ROADTYPE' );
649
my $roadtypes = C4::Koha::GetAuthorisedValues( 'ROADTYPE' );
661
$template->param(
650
$template->param(
(-)a/members/moremember.pl (-2 lines)
Lines 319-325 $template->param( Link Here
319
    patron          => $patron,
319
    patron          => $patron,
320
    translated_language => $translated_language,
320
    translated_language => $translated_language,
321
    detailview      => 1,
321
    detailview      => 1,
322
    primary_contact_method  => $data->{'primary_contact_method'},
323
    was_renewed     => scalar $input->param('was_renewed') ? 1 : 0,
322
    was_renewed     => scalar $input->param('was_renewed') ? 1 : 0,
324
    todaysdate      => output_pref({ dt => dt_from_string, dateformat => 'iso', dateonly => 1 }),
323
    todaysdate      => output_pref({ dt => dt_from_string, dateformat => 'iso', dateonly => 1 }),
325
    totalprice      => sprintf("%.2f", $totalprice),
324
    totalprice      => sprintf("%.2f", $totalprice),
326
- 

Return to bug 11879