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 11756-11761 foreach my $file ( sort readdir $dirh ) { Link Here
11756
    }
11750
    }
11757
}
11751
}
11758
11752
11753
11759
=head1 FUNCTIONS
11754
=head1 FUNCTIONS
11760
11755
11761
=head2 TableExists($table)
11756
=head2 TableExists($table)
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt (-27 / +41 lines)
Lines 582-588 Link Here
582
	  [% IF ( mandatoryemailpro ) %]<span class="required">Required</span>[% END %]
582
	  [% IF ( mandatoryemailpro ) %]<span class="required">Required</span>[% END %]
583
    </li>
583
    </li>
584
        [% END %]
584
        [% END %]
585
        [% UNLESS nofax %]
585
    [% UNLESS nofax %]
586
    <li>
586
    <li>
587
      [% IF ( mandatoryfax ) %]
587
      [% IF ( mandatoryfax ) %]
588
      <label for="fax" class="required">
588
      <label for="fax" class="required">
Lines 593-636 Link Here
593
        <input type="text" id="fax" name="fax" value="[% fax %]" />
593
        <input type="text" id="fax" name="fax" value="[% fax %]" />
594
	  [% IF ( mandatoryfax ) %]<span class="required">Required</span>[% END %]
594
	  [% IF ( mandatoryfax ) %]<span class="required">Required</span>[% END %]
595
    </li>
595
    </li>
596
   [% END %]
596
    <li>
597
    <li>
597
       <label for="primary_contact_method">Main Contact Method</label>
598
       <label for="primary_contact_method">Main Contact Method</label>
598
       <select id="primary_contact_method" name="primary_contact_method">
599
       <select id="primary_contact_method" name="primary_contact_method">
599
       <option value=""></option>
600
       <option value=""></option>
600
            [% IF ( primary_contact_method == 'phone' ) %]
601
         [% FOREACH contactprincipalloo IN contactprincipalloop %]
601
                <option value="phone" selected="selected">Primary phone</option>
602
            [% IF ( contactprincipalloo.currentis_phone ) %]
602
            [% ELSE %]
603
               [% IF ( primary_contact_method == 'phone' ) %]
603
                <option value="phone">Primary phone</option>
604
                 <option value="phone" selected="selected">Primary phone</option>
605
               [% ELSE %]
606
                 <option value="phone">Primary phone</option>
607
               [% END %]
604
            [% END %]
608
            [% END %]
605
            [% IF ( primary_contact_method == 'phonepro' ) %]
609
            [% IF ( contactprincipalloo.currentis_phonepro ) %]
606
                <option value="phonepro" selected="selected">Secondary phone</option>
610
               [% IF ( primary_contact_method == 'phonepro' ) %]
607
            [% ELSE %]
611
                 <option value="phonepro" selected="selected">Secondary phone</option>
608
                <option value="phonepro">Secondary phone</option>
612
               [% ELSE %]
613
                 <option value="phonepro">Secondary phone</option>
614
               [% END %]
609
            [% END %]
615
            [% END %]
610
            [% IF ( primary_contact_method == 'mobile' ) %]
616
            [% IF ( contactprincipalloo.currentis_mobile ) %]
611
                <option value="mobile" selected="selected">Other phone</option>
617
               [% IF ( primary_contact_method == 'mobile' ) %]
612
            [% ELSE %]
618
                 <option value="mobile" selected="selected">Mobile phone</option>
613
                <option value="mobile">Other phone</option>
619
               [% ELSE %]
620
                 <option value="mobile">Mobile phone</option>
621
               [% END %]
614
            [% END %]
622
            [% END %]
615
            [% IF ( primary_contact_method == 'email' ) %]
623
            [% IF ( contactprincipalloo.currentis_email ) %]
616
                <option value="email" selected="selected">Primary email</option>
624
               [% IF ( primary_contact_method == 'email' ) %]
617
            [% ELSE %]
625
                 <option value="email" selected="selected">Primary email</option>
618
                <option value="email">Primary email</option>
626
               [% ELSE %]
627
                 <option value="email">Primary email</option>
628
               [% END %]
619
            [% END %]
629
            [% END %]
620
            [% IF ( primary_contact_method == 'emailpro' ) %]
630
            [% IF ( contactprincipalloo.currentis_emailpro ) %]
621
                <option value="emailpro" selected="selected">Secondary email</option>
631
               [% IF ( primary_contact_method == 'emailpro' ) %]
622
            [% ELSE %]
632
                 <option value="emailpro" selected="selected">Secondary email</option>
623
                <option value="emailpro">Secondary email</option>
633
               [% ELSE %]
634
                 <option value="emailpro">Secondary email</option>
635
               [% END %]
624
            [% END %]
636
            [% END %]
625
            [% IF ( primary_contact_method == 'fax' ) %]
637
            [% IF ( contactprincipalloo.currentis_fax ) %]
626
                <option value="fax" selected="selected">Fax</option>
638
               [% IF ( primary_contact_method == 'fax' ) %]
627
            [% ELSE %]
639
                 <option value="fax" selected="selected">Fax</option>
628
                <option value="fax">Fax</option>
640
               [% ELSE %]
641
                 <option value="fax">Fax</option>
642
               [% END %]
629
            [% END %]
643
            [% END %]
644
         [% END %]
630
       </select>
645
       </select>
631
    </li>
646
    </li>
632
        [% END %]
647
    </ol>
633
	</ol>
634
  </fieldset>
648
  </fieldset>
635
[%END # hide fieldset %]
649
[%END # hide fieldset %]
636
650
(-)a/members/memberentry.pl (-1 / +12 lines)
Lines 531-536 foreach (qw(C A S P I X)) { Link Here
531
$template->param('typeloop' => \@typeloop,
531
$template->param('typeloop' => \@typeloop,
532
        no_categories => $no_categories);
532
        no_categories => $no_categories);
533
if($no_categories){ $no_add = 1; }
533
if($no_categories){ $no_add = 1; }
534
535
my @contactprincipalloop;
536
my @fieldArray = qw(phone phonepro mobile email emailpro fax);
537
foreach my $field (@fieldArray) {
538
   if ( !(grep { $field eq $_ } @field_check)){
539
        push @contactprincipalloop,{
540
            'currentis_' . $field => 1
541
        };
542
    }
543
}
544
$template->param('contactprincipalloop' => \@contactprincipalloop);
545
534
# test in city
546
# test in city
535
if ( $guarantorid ) {
547
if ( $guarantorid ) {
536
    $select_city = getidcity($data{city});
548
    $select_city = getidcity($data{city});
537
- 

Return to bug 11879