@@ -, +, @@ - adds the field required is defined in BorrowerMandatoryField (staff - removes code from controller (not needed, we can follow existing - does not send patron's attribute separately (we have the 'patron' - same changes for the OPAC - remove extra changes made to moremember-brief.tt (if bugfix it needs - deal with PatronSelfModificationBorrowerUnwantedField and --- .../prog/en/modules/members/memberentrygen.tt | 91 ++++++++++++---------- .../prog/en/modules/members/moremember.tt | 4 +- members/memberentry.pl | 11 --- members/moremember.pl | 1 - 4 files changed, 51 insertions(+), 56 deletions(-) --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt @@ -483,54 +483,61 @@ [% END %]
  • - - + + [% UNLESS nophone %] + [% IF ( primary_contact_method == 'phone' ) %] + + [% ELSE %] + [% END %] - [% IF ( contactprincipalloo.currentis_phonepro ) %] - [% IF ( primary_contact_method == 'phonepro' ) %] - - [% ELSE %] - - [% END %] + [% END %] + [% UNLESS nophonepro %] + [% IF ( primary_contact_method == 'phonepro' ) %] + + [% ELSE %] + [% END %] - [% IF ( contactprincipalloo.currentis_mobile ) %] - [% IF ( primary_contact_method == 'mobile' ) %] - - [% ELSE %] - - [% END %] + [% END %] + [% UNLESS nomobile %] + [% IF ( primary_contact_method == 'mobile' ) %] + + [% ELSE %] + [% END %] - [% IF ( contactprincipalloo.currentis_email ) %] - [% IF ( primary_contact_method == 'email' ) %] - - [% ELSE %] - - [% END %] + [% END %] + [% UNLESS noemail %] + [% IF ( primary_contact_method == 'email' ) %] + + [% ELSE %] + [% END %] - [% IF ( contactprincipalloo.currentis_emailpro ) %] - [% IF ( primary_contact_method == 'emailpro' ) %] - - [% ELSE %] - - [% END %] + [% END %] + [% UNLESS noemailpro %] + [% IF ( primary_contact_method == 'emailpro' ) %] + + [% ELSE %] + [% END %] - [% IF ( contactprincipalloo.currentis_fax ) %] - [% IF ( primary_contact_method == 'fax' ) %] - - [% ELSE %] - - [% END %] + [% END %] + [% UNLESS nofax %] + [% IF ( primary_contact_method == 'fax' ) %] + + [% ELSE %] + [% END %] - [% END %] - + [% END %] + + [% IF mandatoryprimary_contact_method %] + Required + [% END %]
  • --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt @@ -172,10 +172,10 @@ [% END %] [% END %] - [% IF ( primary_contact_method ) %] + [% IF patron.primary_contact_method %]
  • Main contact method: - [% SWITCH primary_contact_method %] + [% SWITCH patron.primary_contact_method %] [% CASE 'phone' %] Primary phone [% CASE 'phonepro' %] --- a/members/memberentry.pl +++ a/members/memberentry.pl @@ -632,17 +632,6 @@ $template->param('typeloop' => \@typeloop, no_categories => $no_categories); if($no_categories){ $no_add = 1; } -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); - my $cities = Koha::Cities->search( {}, { order_by => 'city_name' } ); my $roadtypes = C4::Koha::GetAuthorisedValues( 'ROADTYPE' ); $template->param( --- a/members/moremember.pl +++ a/members/moremember.pl @@ -333,7 +333,6 @@ $template->param( patron => $patron, translated_language => $translated_language, detailview => 1, - 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 }), totalprice => sprintf("%.2f", $totalprice), --