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

(-)a/installer/data/mysql/updatedatabase.pl (-6 / +7 lines)
Lines 8672-8683 if ( CheckVersion($DBversion) ) { Link Here
8672
    print "Upgrade to $DBversion done (Bug 10402: Move bookseller contacts to separate table)\n";
8672
    print "Upgrade to $DBversion done (Bug 10402: Move bookseller contacts to separate table)\n";
8673
    SetVersion($DBversion);
8673
    SetVersion($DBversion);
8674
}
8674
}
8675
$DBversion = "XXX";
8676
if ( CheckVersion($DBversion) ) {
8677
    $dbh->do("ALTER TABLE `borrowers` ADD COLUMN `primary_contact_method` VARCHAR(45) NULL DEFAULT NULL;");
8678
    print "Upgrade to $DBversion done (Bug 11879: Add a new borrower field : main contact method)\n";
8679
    SetVersion($DBversion);
8680
}
8681
8675
8682
$DBversion = "3.17.00.017";
8676
$DBversion = "3.17.00.017";
8683
if ( CheckVersion($DBversion) ) {
8677
if ( CheckVersion($DBversion) ) {
Lines 9591-9596 if ( CheckVersion($DBversion) ) { Link Here
9591
    SetVersion ($DBversion);
9585
    SetVersion ($DBversion);
9592
}
9586
}
9593
9587
9588
$DBversion = "XXX";
9589
if ( CheckVersion($DBversion) ) {
9590
    $dbh->do("ALTER TABLE `borrowers` ADD COLUMN `primary_contact_method` VARCHAR(45) NULL DEFAULT NULL;");
9591
    print "Upgrade to $DBversion done (Bug 11879: Add a new borrower field : main contact method)\n";
9592
    SetVersion($DBversion);
9593
}
9594
9594
=head1 FUNCTIONS
9595
=head1 FUNCTIONS
9595
9596
9596
=head2 TableExists($table)
9597
=head2 TableExists($table)
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt (-27 / +41 lines)
Lines 637-643 Link Here
637
	  [% IF ( mandatoryemailpro ) %]<span class="required">Required</span>[% END %]
637
	  [% IF ( mandatoryemailpro ) %]<span class="required">Required</span>[% END %]
638
    </li>
638
    </li>
639
        [% END %]
639
        [% END %]
640
        [% UNLESS nofax %]
640
    [% UNLESS nofax %]
641
    <li>
641
    <li>
642
      [% IF ( mandatoryfax ) %]
642
      [% IF ( mandatoryfax ) %]
643
      <label for="fax" class="required">
643
      <label for="fax" class="required">
Lines 648-691 Link Here
648
        <input type="text" id="fax" name="fax" value="[% fax %]" />
648
        <input type="text" id="fax" name="fax" value="[% fax %]" />
649
	  [% IF ( mandatoryfax ) %]<span class="required">Required</span>[% END %]
649
	  [% IF ( mandatoryfax ) %]<span class="required">Required</span>[% END %]
650
    </li>
650
    </li>
651
   [% END %]
651
    <li>
652
    <li>
652
       <label for="primary_contact_method">Main Contact Method</label>
653
       <label for="primary_contact_method">Main Contact Method</label>
653
       <select id="primary_contact_method" name="primary_contact_method">
654
       <select id="primary_contact_method" name="primary_contact_method">
654
       <option value=""></option>
655
       <option value=""></option>
655
            [% IF ( primary_contact_method == 'phone' ) %]
656
         [% FOREACH contactprincipalloo IN contactprincipalloop %]
656
                <option value="phone" selected="selected">Primary phone</option>
657
            [% IF ( contactprincipalloo.currentis_phone ) %]
657
            [% ELSE %]
658
               [% IF ( primary_contact_method == 'phone' ) %]
658
                <option value="phone">Primary phone</option>
659
                 <option value="phone" selected="selected">Primary phone</option>
660
               [% ELSE %]
661
                 <option value="phone">Primary phone</option>
662
               [% END %]
659
            [% END %]
663
            [% END %]
660
            [% IF ( primary_contact_method == 'phonepro' ) %]
664
            [% IF ( contactprincipalloo.currentis_phonepro ) %]
661
                <option value="phonepro" selected="selected">Secondary phone</option>
665
               [% IF ( primary_contact_method == 'phonepro' ) %]
662
            [% ELSE %]
666
                 <option value="phonepro" selected="selected">Secondary phone</option>
663
                <option value="phonepro">Secondary phone</option>
667
               [% ELSE %]
668
                 <option value="phonepro">Secondary phone</option>
669
               [% END %]
664
            [% END %]
670
            [% END %]
665
            [% IF ( primary_contact_method == 'mobile' ) %]
671
            [% IF ( contactprincipalloo.currentis_mobile ) %]
666
                <option value="mobile" selected="selected">Other phone</option>
672
               [% IF ( primary_contact_method == 'mobile' ) %]
667
            [% ELSE %]
673
                 <option value="mobile" selected="selected">Mobile phone</option>
668
                <option value="mobile">Other phone</option>
674
               [% ELSE %]
675
                 <option value="mobile">Mobile phone</option>
676
               [% END %]
669
            [% END %]
677
            [% END %]
670
            [% IF ( primary_contact_method == 'email' ) %]
678
            [% IF ( contactprincipalloo.currentis_email ) %]
671
                <option value="email" selected="selected">Primary email</option>
679
               [% IF ( primary_contact_method == 'email' ) %]
672
            [% ELSE %]
680
                 <option value="email" selected="selected">Primary email</option>
673
                <option value="email">Primary email</option>
681
               [% ELSE %]
682
                 <option value="email">Primary email</option>
683
               [% END %]
674
            [% END %]
684
            [% END %]
675
            [% IF ( primary_contact_method == 'emailpro' ) %]
685
            [% IF ( contactprincipalloo.currentis_emailpro ) %]
676
                <option value="emailpro" selected="selected">Secondary email</option>
686
               [% IF ( primary_contact_method == 'emailpro' ) %]
677
            [% ELSE %]
687
                 <option value="emailpro" selected="selected">Secondary email</option>
678
                <option value="emailpro">Secondary email</option>
688
               [% ELSE %]
689
                 <option value="emailpro">Secondary email</option>
690
               [% END %]
679
            [% END %]
691
            [% END %]
680
            [% IF ( primary_contact_method == 'fax' ) %]
692
            [% IF ( contactprincipalloo.currentis_fax ) %]
681
                <option value="fax" selected="selected">Fax</option>
693
               [% IF ( primary_contact_method == 'fax' ) %]
682
            [% ELSE %]
694
                 <option value="fax" selected="selected">Fax</option>
683
                <option value="fax">Fax</option>
695
               [% ELSE %]
696
                 <option value="fax">Fax</option>
697
               [% END %]
684
            [% END %]
698
            [% END %]
699
         [% END %]
685
       </select>
700
       </select>
686
    </li>
701
    </li>
687
        [% END %]
702
    </ol>
688
	</ol>
689
  </fieldset>
703
  </fieldset>
690
[%END # hide fieldset %]
704
[%END # hide fieldset %]
691
705
(-)a/members/memberentry.pl (-1 / +12 lines)
Lines 547-552 foreach (qw(C A S P I X)) { Link Here
547
$template->param('typeloop' => \@typeloop,
547
$template->param('typeloop' => \@typeloop,
548
        no_categories => $no_categories);
548
        no_categories => $no_categories);
549
if($no_categories){ $no_add = 1; }
549
if($no_categories){ $no_add = 1; }
550
551
my @contactprincipalloop;
552
my @fieldArray = qw(phone phonepro mobile email emailpro fax);
553
foreach my $field (@fieldArray) {
554
   if ( !(grep { $field eq $_ } @field_check)){
555
        push @contactprincipalloop,{
556
            'currentis_' . $field => 1
557
        };
558
    }
559
}
560
$template->param('contactprincipalloop' => \@contactprincipalloop);
561
550
# test in city
562
# test in city
551
if ( $guarantorid ) {
563
if ( $guarantorid ) {
552
    $select_city = getidcity($data{city});
564
    $select_city = getidcity($data{city});
553
- 

Return to bug 11879