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 (-6 / +1 lines)
Lines 8719-8730 if ( CheckVersion($DBversion) ) { Link Here
8719
    print "Upgrade to $DBversion done (Bug 10402: Move bookseller contacts to separate table)\n";
8719
    print "Upgrade to $DBversion done (Bug 10402: Move bookseller contacts to separate table)\n";
8720
    SetVersion($DBversion);
8720
    SetVersion($DBversion);
8721
}
8721
}
8722
$DBversion = "XXX";
8723
if ( CheckVersion($DBversion) ) {
8724
    $dbh->do("ALTER TABLE `borrowers` ADD COLUMN `primary_contact_method` VARCHAR(45) NULL DEFAULT NULL;");
8725
    print "Upgrade to $DBversion done (Bug 11879: Add a new borrower field : main contact method)\n";
8726
    SetVersion($DBversion);
8727
}
8728
8722
8729
$DBversion = "3.17.00.017";
8723
$DBversion = "3.17.00.017";
8730
if ( CheckVersion($DBversion) ) {
8724
if ( CheckVersion($DBversion) ) {
Lines 10727-10732 foreach my $file ( sort readdir $dirh ) { Link Here
10727
    }
10721
    }
10728
}
10722
}
10729
10723
10724
10730
=head1 FUNCTIONS
10725
=head1 FUNCTIONS
10731
10726
10732
=head2 TableExists($table)
10727
=head2 TableExists($table)
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt (-27 / +41 lines)
Lines 566-572 Link Here
566
	  [% IF ( mandatoryemailpro ) %]<span class="required">Required</span>[% END %]
566
	  [% IF ( mandatoryemailpro ) %]<span class="required">Required</span>[% END %]
567
    </li>
567
    </li>
568
        [% END %]
568
        [% END %]
569
        [% UNLESS nofax %]
569
    [% UNLESS nofax %]
570
    <li>
570
    <li>
571
      [% IF ( mandatoryfax ) %]
571
      [% IF ( mandatoryfax ) %]
572
      <label for="fax" class="required">
572
      <label for="fax" class="required">
Lines 577-620 Link Here
577
        <input type="text" id="fax" name="fax" value="[% fax %]" />
577
        <input type="text" id="fax" name="fax" value="[% fax %]" />
578
	  [% IF ( mandatoryfax ) %]<span class="required">Required</span>[% END %]
578
	  [% IF ( mandatoryfax ) %]<span class="required">Required</span>[% END %]
579
    </li>
579
    </li>
580
   [% END %]
580
    <li>
581
    <li>
581
       <label for="primary_contact_method">Main Contact Method</label>
582
       <label for="primary_contact_method">Main Contact Method</label>
582
       <select id="primary_contact_method" name="primary_contact_method">
583
       <select id="primary_contact_method" name="primary_contact_method">
583
       <option value=""></option>
584
       <option value=""></option>
584
            [% IF ( primary_contact_method == 'phone' ) %]
585
         [% FOREACH contactprincipalloo IN contactprincipalloop %]
585
                <option value="phone" selected="selected">Primary phone</option>
586
            [% IF ( contactprincipalloo.currentis_phone ) %]
586
            [% ELSE %]
587
               [% IF ( primary_contact_method == 'phone' ) %]
587
                <option value="phone">Primary phone</option>
588
                 <option value="phone" selected="selected">Primary phone</option>
589
               [% ELSE %]
590
                 <option value="phone">Primary phone</option>
591
               [% END %]
588
            [% END %]
592
            [% END %]
589
            [% IF ( primary_contact_method == 'phonepro' ) %]
593
            [% IF ( contactprincipalloo.currentis_phonepro ) %]
590
                <option value="phonepro" selected="selected">Secondary phone</option>
594
               [% IF ( primary_contact_method == 'phonepro' ) %]
591
            [% ELSE %]
595
                 <option value="phonepro" selected="selected">Secondary phone</option>
592
                <option value="phonepro">Secondary phone</option>
596
               [% ELSE %]
597
                 <option value="phonepro">Secondary phone</option>
598
               [% END %]
593
            [% END %]
599
            [% END %]
594
            [% IF ( primary_contact_method == 'mobile' ) %]
600
            [% IF ( contactprincipalloo.currentis_mobile ) %]
595
                <option value="mobile" selected="selected">Other phone</option>
601
               [% IF ( primary_contact_method == 'mobile' ) %]
596
            [% ELSE %]
602
                 <option value="mobile" selected="selected">Mobile phone</option>
597
                <option value="mobile">Other phone</option>
603
               [% ELSE %]
604
                 <option value="mobile">Mobile phone</option>
605
               [% END %]
598
            [% END %]
606
            [% END %]
599
            [% IF ( primary_contact_method == 'email' ) %]
607
            [% IF ( contactprincipalloo.currentis_email ) %]
600
                <option value="email" selected="selected">Primary email</option>
608
               [% IF ( primary_contact_method == 'email' ) %]
601
            [% ELSE %]
609
                 <option value="email" selected="selected">Primary email</option>
602
                <option value="email">Primary email</option>
610
               [% ELSE %]
611
                 <option value="email">Primary email</option>
612
               [% END %]
603
            [% END %]
613
            [% END %]
604
            [% IF ( primary_contact_method == 'emailpro' ) %]
614
            [% IF ( contactprincipalloo.currentis_emailpro ) %]
605
                <option value="emailpro" selected="selected">Secondary email</option>
615
               [% IF ( primary_contact_method == 'emailpro' ) %]
606
            [% ELSE %]
616
                 <option value="emailpro" selected="selected">Secondary email</option>
607
                <option value="emailpro">Secondary email</option>
617
               [% ELSE %]
618
                 <option value="emailpro">Secondary email</option>
619
               [% END %]
608
            [% END %]
620
            [% END %]
609
            [% IF ( primary_contact_method == 'fax' ) %]
621
            [% IF ( contactprincipalloo.currentis_fax ) %]
610
                <option value="fax" selected="selected">Fax</option>
622
               [% IF ( primary_contact_method == 'fax' ) %]
611
            [% ELSE %]
623
                 <option value="fax" selected="selected">Fax</option>
612
                <option value="fax">Fax</option>
624
               [% ELSE %]
625
                 <option value="fax">Fax</option>
626
               [% END %]
613
            [% END %]
627
            [% END %]
628
         [% END %]
614
       </select>
629
       </select>
615
    </li>
630
    </li>
616
        [% END %]
631
    </ol>
617
	</ol>
618
  </fieldset>
632
  </fieldset>
619
[%END # hide fieldset %]
633
[%END # hide fieldset %]
620
634
(-)a/members/memberentry.pl (-1 / +12 lines)
Lines 551-556 foreach (qw(C A S P I X)) { Link Here
551
$template->param('typeloop' => \@typeloop,
551
$template->param('typeloop' => \@typeloop,
552
        no_categories => $no_categories);
552
        no_categories => $no_categories);
553
if($no_categories){ $no_add = 1; }
553
if($no_categories){ $no_add = 1; }
554
555
my @contactprincipalloop;
556
my @fieldArray = qw(phone phonepro mobile email emailpro fax);
557
foreach my $field (@fieldArray) {
558
   if ( !(grep { $field eq $_ } @field_check)){
559
        push @contactprincipalloop,{
560
            'currentis_' . $field => 1
561
        };
562
    }
563
}
564
$template->param('contactprincipalloop' => \@contactprincipalloop);
565
554
# test in city
566
# test in city
555
if ( $guarantorid ) {
567
if ( $guarantorid ) {
556
    $select_city = getidcity($data{city});
568
    $select_city = getidcity($data{city});
557
- 

Return to bug 11879