@@ -, +, @@ --- .../borrowers_primary_contact_method.sql | 2 +- .../prog/en/modules/members/memberentrygen.tt | 5 ++--- .../prog/en/modules/members/moremember-brief.tt | 8 ++++---- .../prog/en/modules/members/moremember.tt | 9 --------- members/moremember.pl | 3 --- opac/opac-memberentry.pl | 22 +++++++++++----------- 6 files changed, 18 insertions(+), 31 deletions(-) --- a/installer/data/mysql/atomicupdate/borrowers_primary_contact_method.sql +++ a/installer/data/mysql/atomicupdate/borrowers_primary_contact_method.sql @@ -1,3 +1,3 @@ -ALTER TABLE `borrowers` ADD COLUMN `primary_contact_method` VARCHAR(45) NULL DEFAULT NULL AFTER `lastseen`; +ALTER TABLE `borrowers` ADD COLUMN `primary_contact_method` VARCHAR(45) NULL DEFAULT NULL AFTER `overdrive_auth_token`; ALTER TABLE `deletedborrowers` ADD COLUMN `primary_contact_method` VARCHAR(45) NULL DEFAULT NULL AFTER `overdrive_auth_token`; ALTER TABLE `borrower_modifications` ADD COLUMN `primary_contact_method` VARCHAR(45) NULL DEFAULT NULL AFTER `extended_attributes`; --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt @@ -432,8 +432,7 @@ [% UNLESS nophone && nophonepro && nomobile && noemail && noemailpro && nofax %]
- Contact -
    + Contact
      [% UNLESS nophone %]
    1. [% IF ( mandatoryphone ) %] @@ -496,7 +495,7 @@ [% IF ( mandatoryemailpro ) %]Required[% END %]
    2. [% END %] - [% UNLESS nofax %] + [% UNLESS nofax %]
    3. [% IF ( mandatoryfax ) %]
    4. - [% ELSIF guarantor %] -
    5. - Guarantor: - [% IF guarantor.borrowernumber AND logged_in_user.can_see_patron_infos( guarantor ) %] - [% guarantor.firstname | html %] [% guarantor.surname | html %] - [% ELSE %] - [% guarantor.firstname | html %] [% guarantor.surname | html %] - [% END %] -
    6. [% END %] [% IF ( primary_contact_method ) %] --- a/members/moremember.pl +++ a/members/moremember.pl @@ -319,9 +319,6 @@ $template->param( patron => $patron, translated_language => $translated_language, detailview => 1, - borrowernumber => $borrowernumber, - othernames => $data->{'othernames'}, - categoryname => $patron->category->description, primary_contact_method => $data->{'primary_contact_method'}, was_renewed => scalar $input->param('was_renewed') ? 1 : 0, todaysdate => output_pref({ dt => dt_from_string, dateformat => 'iso', dateonly => 1 }), --- a/opac/opac-memberentry.pl +++ a/opac/opac-memberentry.pl @@ -95,18 +95,18 @@ $template->param( OPACPatronDetails => C4::Context->preference('OPACPatronDetails'), ); my $check_BorrowerMandatoryField=C4::Context->preference("BorrowerMandatoryField"); - my @field_check=split(/\|/,$check_BorrowerMandatoryField); - my @contactprincipalloop; - my @fieldArray = qw(phone phonepro mobile email emailpro fax); - foreach my $field (@fieldArray) { - if ( !(grep { $field eq $_ } @field_check)){ - push @contactprincipalloop,{ - 'currentis_' . $field => 1 - }; - } - } +my @field_check=split(/\|/,$check_BorrowerMandatoryField); +my @contactprincipalloop; +my @fieldArray = qw(phone phonepro mobile email emailpro fax); +foreach my $field (@fieldArray) { + if ( !(grep { $field eq $_ } @field_check)){ + push @contactprincipalloop,{ + 'currentis_' . $field => 1 + }; + } +} - $template->param('contactprincipalloop' => \@contactprincipalloop); +$template->param('contactprincipalloop' => \@contactprincipalloop); my $attributes = ParsePatronAttributes($borrowernumber,$cgi); my $conflicting_attribute = 0; --