From e93c95f4705f0043092edce7e7129d7cd56edb11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Radek=20=C5=A0iman?= Date: Mon, 5 Dec 2016 14:34:02 +0100 Subject: [PATCH] Bug 17718: Used Koha.preference instead of passing params to templates from module memberentry.pl Test plan: 1) Apply the patch 2) Setup preferences "SmartformEnable", "SmartformClientID" (register at smartform.cz or use "smartform" as the client ID) 3) Show/hide streetnumber as desired in BorrowerUnwantedField pref (eg. fill in "streetnumber|B_streetnumber") 4) Edit a patron 5) Start entering street in an address field 6) Select a street from autocomplete 7) Continue entering street number and select the right address 8) ZIP and city should get values from autocomplete 9) Disable SmartformEnable and repeat steps above 10) No autocompletion should occur --- .../prog/en/includes/member-alt-address-style-de.inc | 11 ++++++----- .../prog/en/includes/member-alt-contact-style-de.inc | 9 +++++---- .../prog/en/includes/member-main-address-style-de.inc | 11 ++++++----- .../intranet-tmpl/prog/en/modules/members/memberentrygen.tt | 2 +- members/memberentry.pl | 3 --- 5 files changed, 18 insertions(+), 18 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/member-alt-address-style-de.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/member-alt-address-style-de.inc index 080dd37..8aa17f4 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/member-alt-address-style-de.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/member-alt-address-style-de.inc @@ -1,3 +1,4 @@ +[% USE Koha %]
Alternate address
    [% UNLESS noB_address %] @@ -8,7 +9,7 @@ - + [% IF ( mandatoryB_address ) %]Required[% END %] [% END %] @@ -43,7 +44,7 @@ - + [% IF ( mandatoryB_streetnumber ) %]Required[% END %] [% END %] @@ -68,7 +69,7 @@ - + [% IF ( mandatoryB_zipcode ) %]Required[% END %] [% END %] @@ -80,7 +81,7 @@ - + [% IF ( mandatoryB_city ) %]Required[% END %] [% END %] @@ -144,7 +145,7 @@ [% END %]
- [% IF SmartformEnable %] + [% IF Koha.Preference('SmartformEnable') %] [% END %]
diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/member-alt-contact-style-de.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/member-alt-contact-style-de.inc index b36ee16..36ed944 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/member-alt-contact-style-de.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/member-alt-contact-style-de.inc @@ -1,3 +1,4 @@ +[% USE Koha %]
Alternate contact
    [% UNLESS noaltcontactsurname %] @@ -32,7 +33,7 @@ - + [% IF ( mandatoryaltcontactaddress1 ) %]Required[% END %] [% END %] @@ -56,7 +57,7 @@ - + [% IF ( mandatoryaltcontactzipcode ) %]Required[% END %] [% END %] @@ -68,7 +69,7 @@ - + [% IF ( mandatoryaltcontactaddress3 ) %]Required[% END %] [% END %] @@ -109,7 +110,7 @@ [% END %]
- [% IF SmartformEnable %] + [% IF Koha.Preference('SmartformEnable') %] [% END %]
diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/member-main-address-style-de.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/member-main-address-style-de.inc index be080c4..27097cf 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/member-main-address-style-de.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/member-main-address-style-de.inc @@ -1,3 +1,4 @@ +[% USE Koha %]
Main address
    [% UNLESS nostreettype %] @@ -31,7 +32,7 @@ - + [% IF ( mandatoryaddress ) %]Required[% END %] [% END %] @@ -43,7 +44,7 @@ - + [% IF ( mandatorystreetnumber ) %]Required[% END %] [% END %] @@ -67,7 +68,7 @@ - + [% IF ( mandatoryzipcode ) %]Required[% END %] [% END %] @@ -79,7 +80,7 @@ - + [% IF cities.count %]or choose