From cfd97049a335d50d633d4c47164d223fcc03cad2 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Mon, 6 Apr 2020 14:09:06 +0200 Subject: [PATCH] Bug 25070: Centralize member-alt-contact-style Signed-off-by: David Nind Signed-off-by: Katrin Fischer Signed-off-by: Jonathan Druart --- .../includes/member-alt-contact-style-de.inc | 126 ----------- .../includes/member-alt-contact-style-fr.inc | 126 ----------- .../includes/member-alt-contact-style-us.inc | 126 ----------- .../en/includes/member-alt-contact-style.inc | 198 ++++++++++++++++++ .../prog/en/modules/members/memberentrygen.tt | 7 +- 5 files changed, 200 insertions(+), 383 deletions(-) delete mode 100644 koha-tmpl/intranet-tmpl/prog/en/includes/member-alt-contact-style-de.inc delete mode 100644 koha-tmpl/intranet-tmpl/prog/en/includes/member-alt-contact-style-fr.inc delete mode 100644 koha-tmpl/intranet-tmpl/prog/en/includes/member-alt-contact-style-us.inc create mode 100644 koha-tmpl/intranet-tmpl/prog/en/includes/member-alt-contact-style.inc 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 deleted file mode 100644 index b760addb5a..0000000000 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/member-alt-contact-style-de.inc +++ /dev/null @@ -1,126 +0,0 @@ -
- Alternate contact
    - [% UNLESS noaltcontactsurname %] -
  1. - [% IF ( mandatoryaltcontactsurname ) %] -
  2. - [% END %] - [% UNLESS noaltcontactfirstname %] -
  3. - [% IF ( mandatoryaltcontactfirstname ) %] -
  4. - [% END %] - [% UNLESS noaltcontactaddress1 %] -
  5. - [% IF ( mandatoryaltcontactaddress1 ) %] -
  6. - [% END %] - [% UNLESS noaltcontactaddress2 %] -
  7. - [% IF ( mandatoryaltcontactaddress2 ) %] -
  8. - [% END %] - [% UNLESS noaltcontactzipcode %] -
  9. - [% IF ( mandatoryaltcontactzipcode ) %] -
  10. - [% END %] - [% UNLESS noaltcontactaddress3 %] -
  11. - [% IF ( mandatoryaltcontactaddress3 ) %] -
  12. - [% END %] - [% UNLESS noaltcontactstate %] -
  13. - [% IF ( mandatoryaltcontactstate ) %] -
  14. - [% END %] - [% UNLESS noaltcontactcountry %] -
  15. - [% IF ( mandatoryaltcontactcountry ) %] -
  16. - [% END %] - [% UNLESS noaltcontactphone %] -
  17. - [% IF ( mandatoryaltcontactphone ) %] -
  18. - [% END %] -
-
diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/member-alt-contact-style-fr.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/member-alt-contact-style-fr.inc deleted file mode 100644 index 333f5a718e..0000000000 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/member-alt-contact-style-fr.inc +++ /dev/null @@ -1,126 +0,0 @@ -
- Alternate contact
    -[% UNLESS noaltcontactsurname %] -
  1. - [% IF ( mandatoryaltcontactsurname ) %] -
  2. -[% END %] -[% UNLESS noaltcontactfirstname %] -
  3. - [% IF ( mandatoryaltcontactfirstname ) %] -
  4. -[% END %] -[% UNLESS noaltcontactaddress1 %] -
  5. - [% IF ( mandatoryaltcontactaddress1 ) %] -
  6. -[% END %] -[% UNLESS noaltcontactaddress2 %] -
  7. - [% IF ( mandatoryaltcontactaddress2 ) %] -
  8. -[% END %] -[% UNLESS noaltcontactzipcode %] -
  9. - [% IF ( mandatoryaltcontactzipcode ) %] -
  10. -[% END %] -[% UNLESS noaltcontactaddress3 %] -
  11. - [% IF ( mandatoryaltcontactaddress3 ) %] -
  12. -[% END %] -[% UNLESS noaltcontactstate %] -
  13. - [% IF ( mandatoryaltcontactstate ) %] -
  14. -[% END %] -[% UNLESS noaltcontactcountry %] -
  15. - [% IF ( mandatoryaltcontactcountry ) %] -
  16. -[% END %] -[% UNLESS noaltcontactphone %] -
  17. - [% IF ( mandatoryaltcontactphone ) %] -
  18. -[% END %] -
-
diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/member-alt-contact-style-us.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/member-alt-contact-style-us.inc deleted file mode 100644 index 5191897f1f..0000000000 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/member-alt-contact-style-us.inc +++ /dev/null @@ -1,126 +0,0 @@ -
- Alternate contact
    - [% UNLESS noaltcontactsurname %] -
  1. - [% IF ( mandatoryaltcontactsurname ) %] -
  2. - [% END %] - [% UNLESS noaltcontactfirstname %] -
  3. - [% IF ( mandatoryaltcontactfirstname ) %] -
  4. - [% END %] - [% UNLESS noaltcontactaddress1 %] -
  5. - [% IF ( mandatoryaltcontactaddress1 ) %] -
  6. - [% END %] - [% UNLESS noaltcontactaddress2 %] -
  7. - [% IF ( mandatoryaltcontactaddress2 ) %] -
  8. - [% END %] - [% UNLESS noaltcontactaddress3 %] -
  9. - [% IF ( mandatoryaltcontactaddress3 ) %] -
  10. - [% END %] - [% UNLESS noaltcontactstate %] -
  11. - [% IF ( mandatoryaltcontactstate ) %] -
  12. - [% END %] - [% UNLESS noaltcontactzipcode %] -
  13. - [% IF ( mandatoryaltcontactzipcode ) %] -
  14. - [% END %] - [% UNLESS noaltcontactcountry %] -
  15. - [% IF ( mandatoryaltcontactcountry ) %] -
  16. - [% END %] - [% UNLESS noaltcontactphone %] -
  17. - [% IF ( mandatoryaltcontactphone ) %] -
  18. - [% END %] -
-
diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/member-alt-contact-style.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/member-alt-contact-style.inc new file mode 100644 index 0000000000..875699a969 --- /dev/null +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/member-alt-contact-style.inc @@ -0,0 +1,198 @@ +[% USE Koha %] +[% BLOCK 'alt-contact-style' %] +
+ Alternate contact
    +
      + [% IF Koha.Preference( 'AddressFormat' ) %] + [% PROCESS "member-alt-contact-style-${ Koha.Preference( 'AddressFormat' ) }" %] + [% ELSE %] + [% PROCESS 'member-alt-contact-style-us' %] + [% END %] +
    +
+[% END %] + +[% BLOCK 'member-alt-contact-style-us' %] + [% PROCESS 'alt-contact-style_altcontactsurname' %] + [% PROCESS 'alt-contact-style_altcontactfirstname' %] + [% PROCESS 'alt-contact-style_altcontactaddress1' %] + [% PROCESS 'alt-contact-style_altcontactaddress2' %] + [% PROCESS 'alt-contact-style_altcontactaddress3' %] + [% PROCESS 'alt-contact-style_altcontactstate' %] + [% PROCESS 'alt-contact-style_altcontactzipcode' %] + [% PROCESS 'alt-contact-style_altcontactcountry' %] + [% PROCESS 'alt-contact-style_altcontactphone' %] +[% END %] + +[% BLOCK 'member-alt-contact-style-de' %] + [% PROCESS 'alt-contact-style_altcontactsurname' %] + [% PROCESS 'alt-contact-style_altcontactfirstname' %] + [% PROCESS 'alt-contact-style_altcontactaddress1' %] + [% PROCESS 'alt-contact-style_altcontactaddress2' %] + [% PROCESS 'alt-contact-style_altcontactzipcode' %] + [% PROCESS 'alt-contact-style_altcontactaddress3' %] + [% PROCESS 'alt-contact-style_altcontactstate' %] + [% PROCESS 'alt-contact-style_altcontactcountry' %] + [% PROCESS 'alt-contact-style_altcontactphone' %] +[% END %] + +[% BLOCK 'member-alt-contact-style-fr' %] + [% PROCESS 'alt-contact-style_altcontactsurname' %] + [% PROCESS 'alt-contact-style_altcontactfirstname' %] + [% PROCESS 'alt-contact-style_altcontactaddress1' %] + [% PROCESS 'alt-contact-style_altcontactaddress2' %] + [% PROCESS 'alt-contact-style_altcontactzipcode' %] + [% PROCESS 'alt-contact-style_altcontactaddress3' %] + [% PROCESS 'alt-contact-style_altcontactstate' %] + [% PROCESS 'alt-contact-style_altcontactcountry' %] + [% PROCESS 'alt-contact-style_altcontactphone' %] +[% END %] + +[% BLOCK 'alt-contact-style_altcontactsurname' %] + [% UNLESS noaltcontactsurname %] +
  • + [% IF ( mandatoryaltcontactsurname ) %] +
  • + [% END %] +[% END %] + +[% BLOCK 'alt-contact-style_altcontactfirstname' %] + [% UNLESS noaltcontactfirstname %] +
  • + [% IF ( mandatoryaltcontactfirstname ) %] +
  • + [% END %] +[% END %] + +[% BLOCK 'alt-contact-style_altcontactaddress1' %] + [% UNLESS noaltcontactaddress1 %] +
  • + [% IF ( mandatoryaltcontactaddress1 ) %] +
  • + [% END %] +[% END %] + +[% BLOCK 'alt-contact-style_altcontactaddress2' %] + [% UNLESS noaltcontactaddress2 %] +
  • + [% IF ( mandatoryaltcontactaddress2 ) %] +
  • + [% END %] +[% END %] + +[% BLOCK 'alt-contact-style_altcontactzipcode' %] + [% UNLESS noaltcontactzipcode %] +
  • + [% IF ( mandatoryaltcontactzipcode ) %] +
  • + [% END %] +[% END %] + +[% BLOCK 'alt-contact-style_altcontactaddress3' %] + [% UNLESS noaltcontactaddress3 %] +
  • + [% IF ( mandatoryaltcontactaddress3 ) %] +
  • + [% END %] +[% END %] + +[% BLOCK 'alt-contact-style_altcontactstate' %] + [% UNLESS noaltcontactstate %] +
  • + [% IF ( mandatoryaltcontactstate ) %] +
  • + [% END %] +[% END %] + +[% BLOCK 'alt-contact-style_altcontactcountry' %] + [% UNLESS noaltcontactcountry %] +
  • + [% IF ( mandatoryaltcontactcountry ) %] +
  • + [% END %] +[% END %] + +[% BLOCK 'alt-contact-style_altcontactphone' %] + [% UNLESS noaltcontactphone %] +
  • + [% IF ( mandatoryaltcontactphone ) %] +
  • + [% END %] +[% END %] 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 f42aeff396..5fd8cfc6e8 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt @@ -6,6 +6,7 @@ [% USE KohaDates %] [% USE Branches %] [% PROCESS 'member-alt-address-style.inc' %] +[% PROCESS 'member-alt-contact-style.inc' %] [% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] Koha › Patrons › @@ -746,11 +747,7 @@ legend:hover { [% IF ( step_2 ) %] [% UNLESS noaltcontactsurname && noaltcontactfirstname && noaltcontactaddress1 && noaltcontactaddress2 && noaltcontactaddress3 && noaltcontactstate && noaltcontactzipcode && noaltcontactcountry && noaltcontactphone %] - [% IF Koha.Preference( 'AddressFormat' ) %] - [% INCLUDE "member-alt-contact-style-${ Koha.Preference( 'AddressFormat' ) }.inc" %] - [% ELSE %] - [% INCLUDE 'member-alt-contact-style-us.inc' %] - [% END %] + [% PROCESS 'alt-contact-style' %] [% END # UNLESS noaltcontactsurname && noaltcontactfirstname etc %] [% END # /IF ( step_2 ) %] -- 2.39.5