From 6caac44a94b6eeac489aeea1fa66472022d4e72a Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Fri, 30 Dec 2016 18:42:37 +0000 Subject: [PATCH] Bug 6782 [QA Followup] - Remove unused param and limit calls to Koha.Preference Signed-off-by: Kyle M Hall Signed-off-by: Kyle M Hall --- .../prog/en/modules/members/memberentrygen.tt | 13 +++++++------ members/memberentry.pl | 6 ------ 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt index 54fd902c78..4a046e6033 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt @@ -596,35 +596,36 @@ $(document).ready(function() { [% END %] [% IF ( step_3 ) %] + [% SET autoMemberNum = Koha.Preference('autoMemberNum') %]
Library management
    [% UNLESS nocardnumber %]
  1. - [% IF mandatorycardnumber and not Koha.Preference('autoMemberNum') %] + [% IF mandatorycardnumber and not autoMemberNum %] [% END %] [% IF minlength_cardnumber == maxlength_cardnumber %] - [% IF mandatorycardnumber and not Koha.Preference('autoMemberNum') %]Required[% END %] + [% IF mandatorycardnumber and not autoMemberNum %]Required[% END %]
    Card number must be exactly [% minlength_cardnumber %] characters.
    [% ELSIF minlength_cardnumber && maxlength_cardnumber %] - [% IF mandatorycardnumber and not Koha.Preference('autoMemberNum') %]Required[% END %] + [% IF mandatorycardnumber and not autoMemberNum %]Required[% END %]
    Card number must be between [% minlength_cardnumber %] and [% maxlength_cardnumber %] characters.
    [% ELSIF maxlength_cardnumber %] - [% IF mandatorycardnumber and not Koha.Preference('autoMemberNum') %]Required[% END %] + [% IF mandatorycardnumber and not autoMemberNum %]Required[% END %]
    Card number can be up to [% maxlength_cardnumber %] characters.
    [% ELSE %] - [% IF mandatorycardnumber and not Koha.Preference('autoMemberNum') %]Required[% END %] + [% IF mandatorycardnumber and not autoMemberNum %]Required[% END %]
    There is no minimum or maximum character length.
    [% END %]
  2. diff --git a/members/memberentry.pl b/members/memberentry.pl index 9213d59c64..ef0aa90758 100755 --- a/members/memberentry.pl +++ b/members/memberentry.pl @@ -561,12 +561,6 @@ if ( $op eq "duplicate" ) { $data{'cardnumber'} = ""; } -if (C4::Context->preference("autoMemberNum")) { - $template->param( autoMemberNum => 1); -} else { - $template->param( autoMemberNum => 0); -} - if(!defined($data{'sex'})){ $template->param( none => 1); } elsif($data{'sex'} eq 'F'){ -- 2.39.5