@@ -, +, @@
- 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 ++++++++++++----------
members/memberentry.pl | 11 ---
members/moremember.pl | 1 -
3 files changed, 49 insertions(+), 54 deletions(-)
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt
+++ a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt
@@ -509,54 +509,61 @@
[% END %]
- Main contact method:
-
-
- [% FOREACH contactprincipalloo IN contactprincipalloop %]
- [% IF ( contactprincipalloo.currentis_phone ) %]
- [% IF ( primary_contact_method == 'phone' ) %]
- Primary phone
- [% ELSE %]
- Primary phone
- [% END %]
+ [% IF mandatoryprimary_contact_method %]
+
+ [% ELSE %]
+
+ [% END %]
+ Main contact method:
+
+
+
+ [% UNLESS nophone %]
+ [% IF ( primary_contact_method == 'phone' ) %]
+ Primary phone
+ [% ELSE %]
+ Primary phone
[% END %]
- [% IF ( contactprincipalloo.currentis_phonepro ) %]
- [% IF ( primary_contact_method == 'phonepro' ) %]
- Secondary phone
- [% ELSE %]
- Secondary phone
- [% END %]
+ [% END %]
+ [% UNLESS nophonepro %]
+ [% IF ( primary_contact_method == 'phonepro' ) %]
+ Secondary phone
+ [% ELSE %]
+ Secondary phone
[% END %]
- [% IF ( contactprincipalloo.currentis_mobile ) %]
- [% IF ( primary_contact_method == 'mobile' ) %]
- Other phone
- [% ELSE %]
- Other phone
- [% END %]
+ [% END %]
+ [% UNLESS nomobile %]
+ [% IF ( primary_contact_method == 'mobile' ) %]
+ Other phone
+ [% ELSE %]
+ Other phone
[% END %]
- [% IF ( contactprincipalloo.currentis_email ) %]
- [% IF ( primary_contact_method == 'email' ) %]
- Primary email
- [% ELSE %]
- Primary email
- [% END %]
+ [% END %]
+ [% UNLESS noemail %]
+ [% IF ( primary_contact_method == 'email' ) %]
+ Primary email
+ [% ELSE %]
+ Primary email
[% END %]
- [% IF ( contactprincipalloo.currentis_emailpro ) %]
- [% IF ( primary_contact_method == 'emailpro' ) %]
- Secondary email
- [% ELSE %]
- Secondary email
- [% END %]
+ [% END %]
+ [% UNLESS noemailpro %]
+ [% IF ( primary_contact_method == 'emailpro' ) %]
+ Secondary email
+ [% ELSE %]
+ Secondary email
[% END %]
- [% IF ( contactprincipalloo.currentis_fax ) %]
- [% IF ( primary_contact_method == 'fax' ) %]
- Fax
- [% ELSE %]
- Fax
- [% END %]
+ [% END %]
+ [% UNLESS nofax %]
+ [% IF ( primary_contact_method == 'fax' ) %]
+ Fax
+ [% ELSE %]
+ Fax
[% END %]
- [% END %]
-
+ [% END %]
+
+ [% IF mandatoryprimary_contact_method %]
+ Required
+ [% END %]
--- a/members/memberentry.pl
+++ a/members/memberentry.pl
@@ -645,17 +645,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
@@ -319,7 +319,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),
--