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 483-536 Link Here
483
483
484
   [% END %]
484
   [% END %]
485
    <li>
485
    <li>
486
       <label for="primary_contact_method">Main contact method:</label>
486
        [% IF mandatoryprimary_contact_method %]
487
       <select id="primary_contact_method" name="primary_contact_method">
487
       <label for="primary_contact_method" class="required">
488
       <option value=""></option>
488
       [% ELSE %]
489
         [% FOREACH contactprincipalloo IN contactprincipalloop %]
489
       <label for="primary_contact_method">
490
            [% IF ( contactprincipalloo.currentis_phone ) %]
490
       [% END %]
491
               [% IF ( primary_contact_method == 'phone' ) %]
491
       Main contact method: </label>
492
                 <option value="phone" selected="selected">Primary phone</option>
492
493
               [% ELSE %]
493
        <select id="primary_contact_method" name="primary_contact_method">
494
                 <option value="phone">Primary phone</option>
494
        <option value=""></option>
495
               [% END %]
495
        [% UNLESS nophone %]
496
            [% IF ( primary_contact_method == 'phone' ) %]
497
                <option value="phone" selected="selected">Primary phone</option>
498
            [% ELSE %]
499
                <option value="phone">Primary phone</option>
496
            [% END %]
500
            [% END %]
497
            [% IF ( contactprincipalloo.currentis_phonepro ) %]
501
        [% END %]
498
               [% IF ( primary_contact_method == 'phonepro' ) %]
502
        [% UNLESS nophonepro %]
499
                 <option value="phonepro" selected="selected">Secondary phone</option>
503
            [% IF ( primary_contact_method == 'phonepro' ) %]
500
               [% ELSE %]
504
                <option value="phonepro" selected="selected">Secondary phone</option>
501
                 <option value="phonepro">Secondary phone</option>
505
            [% ELSE %]
502
               [% END %]
506
                <option value="phonepro">Secondary phone</option>
503
            [% END %]
507
            [% END %]
504
            [% IF ( contactprincipalloo.currentis_mobile ) %]
508
        [% END %]
505
               [% IF ( primary_contact_method == 'mobile' ) %]
509
        [% UNLESS nomobile %]
506
                 <option value="mobile" selected="selected">Other phone</option>
510
            [% IF ( primary_contact_method == 'mobile' ) %]
507
               [% ELSE %]
511
                <option value="mobile" selected="selected">Other phone</option>
508
                 <option value="mobile">Other phone</option>
512
            [% ELSE %]
509
               [% END %]
513
                <option value="mobile">Other phone</option>
510
            [% END %]
514
            [% END %]
511
            [% IF ( contactprincipalloo.currentis_email ) %]
515
        [% END %]
512
               [% IF ( primary_contact_method == 'email' ) %]
516
        [% UNLESS noemail %]
513
                 <option value="email" selected="selected">Primary email</option>
517
            [% IF ( primary_contact_method == 'email' ) %]
514
               [% ELSE %]
518
                <option value="email" selected="selected">Primary email</option>
515
                 <option value="email">Primary email</option>
519
            [% ELSE %]
516
               [% END %]
520
                <option value="email">Primary email</option>
517
            [% END %]
521
            [% END %]
518
            [% IF ( contactprincipalloo.currentis_emailpro ) %]
522
        [% END %]
519
               [% IF ( primary_contact_method == 'emailpro' ) %]
523
        [% UNLESS noemailpro %]
520
                 <option value="emailpro" selected="selected">Secondary email</option>
524
            [% IF ( primary_contact_method == 'emailpro' ) %]
521
               [% ELSE %]
525
                <option value="emailpro" selected="selected">Secondary email</option>
522
                 <option value="emailpro">Secondary email</option>
526
            [% ELSE %]
523
               [% END %]
527
                <option value="emailpro">Secondary email</option>
524
            [% END %]
528
            [% END %]
525
            [% IF ( contactprincipalloo.currentis_fax ) %]
529
        [% END %]
526
               [% IF ( primary_contact_method == 'fax' ) %]
530
        [% UNLESS nofax %]
527
                 <option value="fax" selected="selected">Fax</option>
531
            [% IF ( primary_contact_method == 'fax' ) %]
528
               [% ELSE %]
532
                <option value="fax" selected="selected">Fax</option>
529
                 <option value="fax">Fax</option>
533
            [% ELSE %]
530
               [% END %]
534
                <option value="fax">Fax</option>
531
            [% END %]
535
            [% END %]
532
         [% END %]
536
        [% END %]
533
       </select>
537
        </select>
538
        [% IF mandatoryprimary_contact_method %]
539
            <span class="required">Required</span>
540
        [% END %]
534
    </li>
541
    </li>
535
    </ol>
542
    </ol>
536
543
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt (-2 / +2 lines)
Lines 172-181 Link Here
172
                [% END %]
172
                [% END %]
173
            </li>
173
            </li>
174
        [% END %]
174
        [% END %]
175
        [% IF ( primary_contact_method ) %]
175
        [% IF patron.primary_contact_method %]
176
            <li>
176
            <li>
177
                <span class="label">Main contact method: </span>
177
                <span class="label">Main contact method: </span>
178
                [% SWITCH primary_contact_method %]
178
                [% SWITCH patron.primary_contact_method %]
179
                    [% CASE 'phone' %]
179
                    [% CASE 'phone' %]
180
                        Primary phone
180
                        Primary phone
181
                    [% CASE 'phonepro' %]
181
                    [% CASE 'phonepro' %]
(-)a/members/memberentry.pl (-11 lines)
Lines 632-648 $template->param('typeloop' => \@typeloop, Link Here
632
        no_categories => $no_categories);
632
        no_categories => $no_categories);
633
if($no_categories){ $no_add = 1; }
633
if($no_categories){ $no_add = 1; }
634
634
635
my @contactprincipalloop;
636
my @fieldArray = qw(phone phonepro mobile email emailpro fax);
637
foreach my $field (@fieldArray) {
638
   if ( !(grep { $field eq $_ } @field_check)){
639
        push @contactprincipalloop,{
640
            'currentis_' . $field => 1
641
        };
642
    }
643
}
644
$template->param('contactprincipalloop' => \@contactprincipalloop);
645
646
my $cities = Koha::Cities->search( {}, { order_by => 'city_name' } );
635
my $cities = Koha::Cities->search( {}, { order_by => 'city_name' } );
647
my $roadtypes = C4::Koha::GetAuthorisedValues( 'ROADTYPE' );
636
my $roadtypes = C4::Koha::GetAuthorisedValues( 'ROADTYPE' );
648
$template->param(
637
$template->param(
(-)a/members/moremember.pl (-2 lines)
Lines 333-339 $template->param( Link Here
333
    patron          => $patron,
333
    patron          => $patron,
334
    translated_language => $translated_language,
334
    translated_language => $translated_language,
335
    detailview      => 1,
335
    detailview      => 1,
336
    primary_contact_method  => $data->{'primary_contact_method'},
337
    was_renewed     => scalar $input->param('was_renewed') ? 1 : 0,
336
    was_renewed     => scalar $input->param('was_renewed') ? 1 : 0,
338
    todaysdate      => output_pref({ dt => dt_from_string, dateformat => 'iso', dateonly => 1 }),
337
    todaysdate      => output_pref({ dt => dt_from_string, dateformat => 'iso', dateonly => 1 }),
339
    totalprice      => sprintf("%.2f", $totalprice),
338
    totalprice      => sprintf("%.2f", $totalprice),
340
- 

Return to bug 11879