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 507-560 Link Here
507
507
508
   [% END %]
508
   [% END %]
509
    <li>
509
    <li>
510
       <label for="primary_contact_method">Main contact method:</label>
510
        [% IF mandatoryprimary_contact_method %]
511
       <select id="primary_contact_method" name="primary_contact_method">
511
       <label for="primary_contact_method" class="required">
512
       <option value=""></option>
512
       [% ELSE %]
513
         [% FOREACH contactprincipalloo IN contactprincipalloop %]
513
       <label for="primary_contact_method">
514
            [% IF ( contactprincipalloo.currentis_phone ) %]
514
       [% END %]
515
               [% IF ( primary_contact_method == 'phone' ) %]
515
       Main contact method: </label>
516
                 <option value="phone" selected="selected">Primary phone</option>
516
517
               [% ELSE %]
517
        <select id="primary_contact_method" name="primary_contact_method">
518
                 <option value="phone">Primary phone</option>
518
        <option value=""></option>
519
               [% END %]
519
        [% UNLESS nophone %]
520
            [% IF ( primary_contact_method == 'phone' ) %]
521
                <option value="phone" selected="selected">Primary phone</option>
522
            [% ELSE %]
523
                <option value="phone">Primary phone</option>
520
            [% END %]
524
            [% END %]
521
            [% IF ( contactprincipalloo.currentis_phonepro ) %]
525
        [% END %]
522
               [% IF ( primary_contact_method == 'phonepro' ) %]
526
        [% UNLESS nophonepro %]
523
                 <option value="phonepro" selected="selected">Secondary phone</option>
527
            [% IF ( primary_contact_method == 'phonepro' ) %]
524
               [% ELSE %]
528
                <option value="phonepro" selected="selected">Secondary phone</option>
525
                 <option value="phonepro">Secondary phone</option>
529
            [% ELSE %]
526
               [% END %]
530
                <option value="phonepro">Secondary phone</option>
527
            [% END %]
531
            [% END %]
528
            [% IF ( contactprincipalloo.currentis_mobile ) %]
532
        [% END %]
529
               [% IF ( primary_contact_method == 'mobile' ) %]
533
        [% UNLESS nomobile %]
530
                 <option value="mobile" selected="selected">Other phone</option>
534
            [% IF ( primary_contact_method == 'mobile' ) %]
531
               [% ELSE %]
535
                <option value="mobile" selected="selected">Other phone</option>
532
                 <option value="mobile">Other phone</option>
536
            [% ELSE %]
533
               [% END %]
537
                <option value="mobile">Other phone</option>
534
            [% END %]
538
            [% END %]
535
            [% IF ( contactprincipalloo.currentis_email ) %]
539
        [% END %]
536
               [% IF ( primary_contact_method == 'email' ) %]
540
        [% UNLESS noemail %]
537
                 <option value="email" selected="selected">Primary email</option>
541
            [% IF ( primary_contact_method == 'email' ) %]
538
               [% ELSE %]
542
                <option value="email" selected="selected">Primary email</option>
539
                 <option value="email">Primary email</option>
543
            [% ELSE %]
540
               [% END %]
544
                <option value="email">Primary email</option>
541
            [% END %]
545
            [% END %]
542
            [% IF ( contactprincipalloo.currentis_emailpro ) %]
546
        [% END %]
543
               [% IF ( primary_contact_method == 'emailpro' ) %]
547
        [% UNLESS noemailpro %]
544
                 <option value="emailpro" selected="selected">Secondary email</option>
548
            [% IF ( primary_contact_method == 'emailpro' ) %]
545
               [% ELSE %]
549
                <option value="emailpro" selected="selected">Secondary email</option>
546
                 <option value="emailpro">Secondary email</option>
550
            [% ELSE %]
547
               [% END %]
551
                <option value="emailpro">Secondary email</option>
548
            [% END %]
552
            [% END %]
549
            [% IF ( contactprincipalloo.currentis_fax ) %]
553
        [% END %]
550
               [% IF ( primary_contact_method == 'fax' ) %]
554
        [% UNLESS nofax %]
551
                 <option value="fax" selected="selected">Fax</option>
555
            [% IF ( primary_contact_method == 'fax' ) %]
552
               [% ELSE %]
556
                <option value="fax" selected="selected">Fax</option>
553
                 <option value="fax">Fax</option>
557
            [% ELSE %]
554
               [% END %]
558
                <option value="fax">Fax</option>
555
            [% END %]
559
            [% END %]
556
         [% END %]
560
        [% END %]
557
       </select>
561
        </select>
562
        [% IF mandatoryprimary_contact_method %]
563
            <span class="required">Required</span>
564
        [% END %]
558
    </li>
565
    </li>
559
    </ol>
566
    </ol>
560
567
(-)a/members/memberentry.pl (-11 lines)
Lines 640-656 $template->param('typeloop' => \@typeloop, Link Here
640
        no_categories => $no_categories);
640
        no_categories => $no_categories);
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 313-319 $template->param( Link Here
313
    patron          => $patron,
313
    patron          => $patron,
314
    translated_language => $translated_language,
314
    translated_language => $translated_language,
315
    detailview      => 1,
315
    detailview      => 1,
316
    primary_contact_method  => $data->{'primary_contact_method'},
317
    was_renewed     => scalar $input->param('was_renewed') ? 1 : 0,
316
    was_renewed     => scalar $input->param('was_renewed') ? 1 : 0,
318
    todaysdate      => output_pref({ dt => dt_from_string, dateformat => 'iso', dateonly => 1 }),
317
    todaysdate      => output_pref({ dt => dt_from_string, dateformat => 'iso', dateonly => 1 }),
319
    totalprice      => sprintf("%.2f", $totalprice),
318
    totalprice      => sprintf("%.2f", $totalprice),
320
- 

Return to bug 11879