@@ -, +, @@ --- installer/data/mysql/updatedatabase.pl | 8 ++++++ .../prog/en/modules/members/memberentrygen.tt | 26 ++++++++++++++++++++ members/memberentry.pl | 12 +++++++++ 3 files changed, 46 insertions(+), 0 deletions(-) --- a/installer/data/mysql/updatedatabase.pl +++ a/installer/data/mysql/updatedatabase.pl @@ -8012,6 +8012,14 @@ if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { SetVersion($DBversion); } +$DBversion = "XXX"; +if ( CheckVersion($DBversion) ) { + $dbh->do("ALTER TABLE `borrowers` ADD COLUMN `contactprincipal` VARCHAR(45) NULL DEFAULT NULL;"); + print "Upgrade to $DBversion done (Add the contactprincipal column to the borrowers table)\n"; + SetVersion($DBversion); +} + + =head1 FUNCTIONS =head2 TableExists($table) --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt @@ -642,6 +642,32 @@ [% IF ( mandatoryfax ) %]Required[% END %] +
  • + + +
  • [% END %] --- a/members/memberentry.pl +++ a/members/memberentry.pl @@ -525,6 +525,18 @@ foreach (qw(C A S P I X)) { $template->param('typeloop' => \@typeloop, no_categories => $no_categories); if($no_categories){ $no_add = 1; } + +my @contactprincipalloop; +foreach (qw(phone phonepro mobile email emailpro fax)) { + push @contactprincipalloop,{ + 'code' => $_, + 'selected' => (defined($borrower_data->{'contactprincipal'}) && + $_ eq $borrower_data->{'contactprincipal'}), + 'currentis_' . $_ => 1 + }; +} +$template->param('contactprincipalloop' => \@contactprincipalloop); + # test in city if ( $guarantorid ) { $select_city = getidcity($data{city}); --