From 78d3df06a1bbec970933d5d82d5aa6cea6e4da21 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 --- .../intranet-tmpl/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 54fd902..4a046e6 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 9213d59..ef0aa90 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.1.4