From 20031cace77b45cba4a1cce5ff92241e430ae3da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Radek=20=C5=A0iman?= Date: Mon, 5 Dec 2016 16:04:33 +0100 Subject: [PATCH] Bug 17718: Fixed QA tool complains I don't fully understand the reason, but I had run the tool without any errors. Now I did my best according to coding guidelines, I hope. 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 --- .../en/includes/member-alt-address-style-de.inc | 46 ++++++++++++++++------ .../en/includes/member-alt-contact-style-de.inc | 36 +++++++++++------ .../en/includes/member-main-address-style-de.inc | 28 +++++++++++-- 3 files changed, 81 insertions(+), 29 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 8aa17f4..004193e 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 @@ -9,7 +9,15 @@ - + [% IF Koha.Preference('SmartformEnable') %] + [% IF ( noB_streetnumber ) %] + + [% ELSE %] + + [% END %] + [% ELSE %] + + [% END %] [% IF ( mandatoryB_address ) %]Required[% END %] [% END %] @@ -44,7 +52,11 @@ - + [% IF Koha.Preference('SmartformEnable') %] + + [% ELSE %] + + [% END %] [% IF ( mandatoryB_streetnumber ) %]Required[% END %] [% END %] @@ -62,16 +74,20 @@ [% END %] [% UNLESS noB_zipcode %] -
  • - [% IF ( mandatoryB_zipcode ) %] -
  • +
  • + [% IF ( mandatoryB_zipcode ) %] +
  • [% END %] [% UNLESS noB_city %]
  • @@ -81,7 +97,11 @@ - + [% IF Koha.Preference('SmartformEnable') %] + + [% ELSE %] + + [% END %] [% IF ( mandatoryB_city ) %]Required[% END %]
  • [% 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 36ed944..d1fbb70 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 @@ -33,7 +33,11 @@ - + [% IF Koha.Preference('SmartformEnable') %] + + [% ELSE %] + + [% END %] [% IF ( mandatoryaltcontactaddress1 ) %]Required[% END %] [% END %] @@ -50,16 +54,20 @@ [% END %] [% UNLESS noaltcontactzipcode %] -
  • - [% IF ( mandatoryaltcontactzipcode ) %] -
  • +
  • + [% IF ( mandatoryaltcontactzipcode ) %] +
  • [% END %] [% UNLESS noaltcontactaddress3 %]
  • @@ -69,7 +77,11 @@ - + [% IF Koha.Preference('SmartformEnable') %] + + [% ELSE %] + + [% END %] [% IF ( mandatoryaltcontactaddress3 ) %]Required[% END %]
  • [% 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 27097cf..bb43dc2 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 @@ -32,7 +32,15 @@ - + [% IF Koha.Preference('SmartformEnable') %] + [% IF ( nostreetnumber ) %] + + [% ELSE %] + + [% END %] + [% ELSE %] + + [% END %] [% IF ( mandatoryaddress ) %]Required[% END %] [% END %] @@ -44,7 +52,11 @@ - + [% IF Koha.Preference('SmartformEnable') %] + + [% ELSE %] + + [% END %] [% IF ( mandatorystreetnumber ) %]Required[% END %] [% END %] @@ -68,7 +80,11 @@ - + [% IF Koha.Preference('SmartformEnable') %] + + [% ELSE %] + + [% END %] [% IF ( mandatoryzipcode ) %]Required[% END %] [% END %] @@ -80,7 +96,11 @@ - + [% IF Koha.Preference('SmartformEnable') %] + + [% ELSE %] + + [% END %] [% IF cities.count %]or choose