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

(-)a/installer/data/mysql/updatedatabase.pl (+8 lines)
Lines 8012-8017 if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { Link Here
8012
    SetVersion($DBversion);
8012
    SetVersion($DBversion);
8013
}
8013
}
8014
8014
8015
$DBversion = "XXX";
8016
if ( CheckVersion($DBversion) ) {
8017
    $dbh->do("ALTER TABLE `borrowers` ADD COLUMN `contactprincipal` VARCHAR(45) NULL DEFAULT NULL;");
8018
    print "Upgrade to $DBversion done (Add the contactprincipal column to the borrowers table)\n";
8019
    SetVersion($DBversion);
8020
}
8021
8022
8015
=head1 FUNCTIONS
8023
=head1 FUNCTIONS
8016
8024
8017
=head2 TableExists($table)
8025
=head2 TableExists($table)
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt (+26 lines)
Lines 642-647 Link Here
642
        <input type="text" id="fax" name="fax" value="[% fax %]" class="[% focusAction %]" />
642
        <input type="text" id="fax" name="fax" value="[% fax %]" class="[% focusAction %]" />
643
	  [% IF ( mandatoryfax ) %]<span class="required">Required</span>[% END %]
643
	  [% IF ( mandatoryfax ) %]<span class="required">Required</span>[% END %]
644
    </li>
644
    </li>
645
    <li>
646
        <label for="contactprincipal">Main Contact Method</label>
647
        <select id="contactprincipal" name="contactprincipal">
648
            <option value=""></option>
649
        [% FOREACH contactprincipalloo IN contactprincipalloop %]
650
            [% IF ( contactprincipalloo.currentis_phone ) %]
651
                <option value="phone" [% IF ( contactprincipalloo.selected ) %]selected="selected"[% END %]>Phone (home)</option>
652
            [% END %]
653
            [% IF ( contactprincipalloo.currentis_phonepro ) %]
654
                <option value="phonepro" [% IF ( contactprincipalloo.selected ) %]selected="selected"[% END %]>Phone (work)</option>
655
            [% END %]
656
            [% IF ( contactprincipalloo.currentis_mobile ) %]
657
                <option value="mobile" [% IF ( contactprincipalloo.selected ) %]selected="selected"[% END %]>Phone (cell)</option>
658
            [% END %]
659
            [% IF ( contactprincipalloo.currentis_email ) %]
660
                <option value="email" [% IF ( contactprincipalloo.selected ) %]selected="selected"[% END %]>Email (home)</option>
661
            [% END %]
662
            [% IF ( contactprincipalloo.currentis_emailpro ) %]
663
                <option value="emailpro" [% IF ( contactprincipalloo.selected ) %]selected="selected"[% END %]>Email (work)</option>
664
            [% END %]
665
            [% IF ( contactprincipalloo.currentis_fax ) %]
666
                <option value="fax" [% IF ( contactprincipalloo.selected ) %]selected="selected"[% END %]>Fax</option>
667
            [% END %]
668
       [% END %]
669
       </select>
670
    </li>
645
        [% END %]
671
        [% END %]
646
	</ol>
672
	</ol>
647
  </fieldset>
673
  </fieldset>
(-)a/members/memberentry.pl (-1 / +12 lines)
Lines 525-530 foreach (qw(C A S P I X)) { Link Here
525
$template->param('typeloop' => \@typeloop,
525
$template->param('typeloop' => \@typeloop,
526
        no_categories => $no_categories);
526
        no_categories => $no_categories);
527
if($no_categories){ $no_add = 1; }
527
if($no_categories){ $no_add = 1; }
528
529
my @contactprincipalloop;
530
foreach (qw(phone phonepro mobile email emailpro fax)) {
531
	push @contactprincipalloop,{
532
        'code' => $_,
533
        'selected' => (defined($borrower_data->{'contactprincipal'}) &&
534
            $_ eq $borrower_data->{'contactprincipal'}),
535
        'currentis_' . $_ => 1
536
	};
537
}
538
$template->param('contactprincipalloop' => \@contactprincipalloop);
539
528
# test in city
540
# test in city
529
if ( $guarantorid ) {
541
if ( $guarantorid ) {
530
    $select_city = getidcity($data{city});
542
    $select_city = getidcity($data{city});
531
- 

Return to bug 11879