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

(-)a/installer/data/mysql/atomicupdate/borrowers_primary_contact_method.sql (+1 lines)
Line 0 Link Here
1
ALTER TABLE `borrowers` ADD COLUMN `primary_contact_method` VARCHAR(45) NULL DEFAULT NULL;
(-)a/installer/data/mysql/updatedatabase.pl (+1 lines)
Lines 12655-12660 foreach my $file ( sort readdir $dirh ) { Link Here
12655
    }
12655
    }
12656
}
12656
}
12657
12657
12658
12658
=head1 FUNCTIONS
12659
=head1 FUNCTIONS
12659
12660
12660
=head2 TableExists($table)
12661
=head2 TableExists($table)
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt (-2 / +53 lines)
Lines 462-468 $(document).ready(function() { Link Here
462
	  [% IF ( mandatoryemailpro ) %]<span class="required">Required</span>[% END %]
462
	  [% IF ( mandatoryemailpro ) %]<span class="required">Required</span>[% END %]
463
    </li>
463
    </li>
464
        [% END %]
464
        [% END %]
465
        [% UNLESS nofax %]
465
    [% UNLESS nofax %]
466
    <li>
466
    <li>
467
      [% IF ( mandatoryfax ) %]
467
      [% IF ( mandatoryfax ) %]
468
      <label for="fax" class="required">
468
      <label for="fax" class="required">
Lines 474-480 $(document).ready(function() { Link Here
474
	  [% IF ( mandatoryfax ) %]<span class="required">Required</span>[% END %]
474
	  [% IF ( mandatoryfax ) %]<span class="required">Required</span>[% END %]
475
    </li>
475
    </li>
476
        [% END %]
476
        [% END %]
477
	</ol>
477
   [% END %]
478
    <li>
479
       <label for="primary_contact_method">Main Contact Method</label>
480
       <select id="primary_contact_method" name="primary_contact_method">
481
       <option value=""></option>
482
         [% FOREACH contactprincipalloo IN contactprincipalloop %]
483
            [% IF ( contactprincipalloo.currentis_phone ) %]
484
               [% IF ( primary_contact_method == 'phone' ) %]
485
                 <option value="phone" selected="selected">Primary phone</option>
486
               [% ELSE %]
487
                 <option value="phone">Primary phone</option>
488
               [% END %]
489
            [% END %]
490
            [% IF ( contactprincipalloo.currentis_phonepro ) %]
491
               [% IF ( primary_contact_method == 'phonepro' ) %]
492
                 <option value="phonepro" selected="selected">Secondary phone</option>
493
               [% ELSE %]
494
                 <option value="phonepro">Secondary phone</option>
495
               [% END %]
496
            [% END %]
497
            [% IF ( contactprincipalloo.currentis_mobile ) %]
498
               [% IF ( primary_contact_method == 'mobile' ) %]
499
                 <option value="mobile" selected="selected">Mobile phone</option>
500
               [% ELSE %]
501
                 <option value="mobile">Mobile phone</option>
502
               [% END %]
503
            [% END %]
504
            [% IF ( contactprincipalloo.currentis_email ) %]
505
               [% IF ( primary_contact_method == 'email' ) %]
506
                 <option value="email" selected="selected">Primary email</option>
507
               [% ELSE %]
508
                 <option value="email">Primary email</option>
509
               [% END %]
510
            [% END %]
511
            [% IF ( contactprincipalloo.currentis_emailpro ) %]
512
               [% IF ( primary_contact_method == 'emailpro' ) %]
513
                 <option value="emailpro" selected="selected">Secondary email</option>
514
               [% ELSE %]
515
                 <option value="emailpro">Secondary email</option>
516
               [% END %]
517
            [% END %]
518
            [% IF ( contactprincipalloo.currentis_fax ) %]
519
               [% IF ( primary_contact_method == 'fax' ) %]
520
                 <option value="fax" selected="selected">Fax</option>
521
               [% ELSE %]
522
                 <option value="fax">Fax</option>
523
               [% END %]
524
            [% END %]
525
         [% END %]
526
       </select>
527
    </li>
528
    </ol>
478
  </fieldset>
529
  </fieldset>
479
[%END # hide fieldset %]
530
[%END # hide fieldset %]
480
531
(-)a/members/memberentry.pl (-1 / +10 lines)
Lines 537-542 $template->param('typeloop' => \@typeloop, Link Here
537
        no_categories => $no_categories);
537
        no_categories => $no_categories);
538
if($no_categories){ $no_add = 1; }
538
if($no_categories){ $no_add = 1; }
539
539
540
my @contactprincipalloop;
541
my @fieldArray = qw(phone phonepro mobile email emailpro fax);
542
foreach my $field (@fieldArray) {
543
   if ( !(grep { $field eq $_ } @field_check)){
544
        push @contactprincipalloop,{
545
            'currentis_' . $field => 1
546
        };
547
    }
548
}
549
$template->param('contactprincipalloop' => \@contactprincipalloop);
540
550
541
my $cities = Koha::Cities->search( {}, { order_by => 'city_name' } );
551
my $cities = Koha::Cities->search( {}, { order_by => 'city_name' } );
542
my $roadtypes = C4::Koha::GetAuthorisedValues( 'ROADTYPE' );
552
my $roadtypes = C4::Koha::GetAuthorisedValues( 'ROADTYPE' );
543
- 

Return to bug 11879