@@ -, +, @@ streettype is NOT checked options defined in ROADTYPE a.v. PatronSelfModificationBorrowerUnwantedField hide the field correctly. the field required. --- .../bootstrap/en/modules/opac-memberentry.tt | 22 +++++++++++++++++++++- opac/opac-memberentry.pl | 7 ++++++- 2 files changed, 27 insertions(+), 2 deletions(-) --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt +++ a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt @@ -190,7 +190,7 @@
- [% FOREACH field = ['streetnumber' 'cardnumber' 'branchcode' 'categorycode' 'title' 'surname' 'firstname' 'dateofbirth' 'initials' 'othernames' 'address' 'address2' 'city' 'state' 'zipcode' 'country' 'phone' 'phonepro' 'mobile' 'email' 'emailpro' 'fax' 'B_address' 'B_address2' 'B_city' 'B_state' 'B_zipcode' 'B_country' 'B_phone' 'B_email' 'contactnote' 'altcontactsurname' 'altcontactfirstname' 'altcontactaddress1' 'altcontactaddress2' 'altcontactaddress3' 'altcontactstate' 'altcontactzipcode' 'altcontactcountry' 'altcontactphone' 'password' ] %] + [% FOREACH field = ['streetnumber' 'streettype' 'cardnumber' 'branchcode' 'categorycode' 'title' 'surname' 'firstname' 'dateofbirth' 'initials' 'othernames' 'address' 'address2' 'city' 'state' 'zipcode' 'country' 'phone' 'phonepro' 'mobile' 'email' 'emailpro' 'fax' 'B_address' 'B_address2' 'B_city' 'B_state' 'B_zipcode' 'B_country' 'B_phone' 'B_email' 'contactnote' 'altcontactsurname' 'altcontactfirstname' 'altcontactaddress1' 'altcontactaddress2' 'altcontactaddress3' 'altcontactstate' 'altcontactzipcode' 'altcontactcountry' 'altcontactphone' 'password' ] %] [% IF mandatory.defined( field ) %] [% SET required.$field = 'required' %] [% END %] @@ -425,6 +425,26 @@
    [% IF Koha.Preference('AddressFormat') != 'de' %][% INCLUDE streetnumber %][% END %] + [% IF roadtypes %] + [% UNLESS hidden.defined('streettype') %] +
  1. + + + +
    Required
    +
  2. + [% END %] + [% END %] + [% UNLESS hidden.defined('address') %]
  3. --- a/opac/opac-memberentry.pl +++ a/opac/opac-memberentry.pl @@ -44,7 +44,7 @@ use Koha::Patron::Modification; use Koha::Patron::Modifications; use Koha::Patron::Categories; use Koha::Token; - +use Koha::AuthorisedValues; my $cgi = CGI->new; my $dbh = C4::Context->dbh; @@ -118,6 +118,11 @@ foreach my $attr (@$attributes) { } } +my $roadtypes = C4::Koha::GetAuthorisedValues( 'ROADTYPE' ); +$template->param( + roadtypes => $roadtypes, +); + if ( $action eq 'create' ) { my %borrower = ParseCgiForBorrower($cgi); --