From a98759e3b78c1fec0ef7ddc269beccc4eace777c Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 11 May 2021 15:36:13 +0200 Subject: [PATCH] Bug 18112: Use GetAuthValueDropbox from the template Signed-off-by: Jonathan Druart --- .../prog/en/includes/member-alt-address-style.inc | 2 ++ .../prog/en/includes/member-main-address-style.inc | 2 ++ koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt | 1 + members/memberentry.pl | 2 -- opac/opac-memberentry.pl | 5 ----- 5 files changed, 5 insertions(+), 7 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/member-alt-address-style.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/member-alt-address-style.inc index f31f379d84..17c1d99fc3 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/member-alt-address-style.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/member-alt-address-style.inc @@ -1,4 +1,5 @@ [% USE Koha %] +[% USE AuthorisedValues %] [% BLOCK 'alt-address-style' %]
Alternate address @@ -55,6 +56,7 @@ [% END %] [% BLOCK 'alt-address-style_roadtypes' %] + [% SET roadtypes = AuthorisedValues.GetAuthValueDropbox('ROADTYPE') %] [% IF roadtypes %]
  • [% IF ( mandatoryB_streettype ) %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/member-main-address-style.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/member-main-address-style.inc index 8ed3792d91..609509c943 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/member-main-address-style.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/member-main-address-style.inc @@ -1,4 +1,5 @@ [% USE Koha %] +[% USE AuthorisedValues %] [% BLOCK 'main-address-style' %]
    Main address @@ -46,6 +47,7 @@ [% END %] [% BLOCK 'address-style_roadtypes' %] + [% SET roadtypes = AuthorisedValues.GetAuthValueDropbox('ROADTYPE') %] [% IF roadtypes %]
  • [% IF ( mandatorystreettype ) %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt index ada23ef25b..2a97dff6e7 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt @@ -425,6 +425,7 @@
      [% IF Koha.Preference('AddressFormat') != 'de' %][% INCLUDE streetnumber %][% END %] + [% SET roadtypes = AuthorisedValues.GetAuthValueDropbox('ROADTYPE') %] [% IF roadtypes %] [% UNLESS hidden.defined('streettype') %]
    1. diff --git a/members/memberentry.pl b/members/memberentry.pl index fca1996b52..da8a324c78 100755 --- a/members/memberentry.pl +++ b/members/memberentry.pl @@ -701,9 +701,7 @@ $template->param( ); my $cities = Koha::Cities->search( {}, { order_by => 'city_name' } ); -my $roadtypes = C4::Koha::GetAuthorisedValues( 'ROADTYPE' ); $template->param( - roadtypes => $roadtypes, cities => $cities, ); diff --git a/opac/opac-memberentry.pl b/opac/opac-memberentry.pl index 0cd16d90a1..c9a4790efd 100755 --- a/opac/opac-memberentry.pl +++ b/opac/opac-memberentry.pl @@ -118,11 +118,6 @@ foreach my $attr (@$attributes) { } } -my $roadtypes = C4::Koha::GetAuthorisedValues( 'ROADTYPE' ); -$template->param( - roadtypes => $roadtypes, -); - if ( $action eq 'create' ) { my %borrower = ParseCgiForBorrower($cgi); -- 2.39.5