Bugzilla – Attachment 120770 Details for
Bug 18112
Add street type to main address in OPAC
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18112: Add street type to self reg/self mod form
Bug-18112-Add-street-type-to-self-regself-mod-form.patch (text/plain), 5.47 KB, created by
Owen Leonard
on 2021-05-10 12:12:17 UTC
(
hide
)
Description:
Bug 18112: Add street type to self reg/self mod form
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2021-05-10 12:12:17 UTC
Size:
5.47 KB
patch
obsolete
>From 03d8a8d58c1ab1f6c2775afc22ec3d43ea4d4e4e Mon Sep 17 00:00:00 2001 >From: Lucas Gass <lucas@bywatersolutions.com> >Date: Tue, 4 May 2021 20:48:18 +0000 >Subject: [PATCH] Bug 18112: Add street type to self reg/self mod form > >1. Add some values to the ROADTYPE authorized value >2. Go to PatronSelfRegistrationBorrowerUnwantedField and make sure > streettype is NOT checked >3. Go the self reg form, no street type field >4. Apply patch >5. Check the self reg form, streettype should be there with all the > options defined in ROADTYPE a.v. >6. Check the self modification form, street type should be there. >7. Make sure PatronSelfRegistrationBorrowerUnwantedField and > PatronSelfModificationBorrowerUnwantedField hide the field correctly. >8. Make sure PatronSelfRegistrationBorrowerMandatoryField properly makes > the field required. > >Signed-off-by: Owen Leonard <oleonard@myacpl.org> >--- > .../bootstrap/en/modules/opac-memberentry.tt | 22 +++++++++++++++++++++- > opac/opac-memberentry.pl | 7 ++++++- > 2 files changed, 27 insertions(+), 2 deletions(-) > >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 af7280a1ef..206fe212b4 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt >@@ -190,7 +190,7 @@ > > <form method="post" action="/cgi-bin/koha/opac-memberentry.pl" id="memberentry-form" autocomplete="off"> > >- [% 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 @@ > <ol> > [% IF Koha.Preference('AddressFormat') != 'de' %][% INCLUDE streetnumber %][% END %] > >+ [% IF roadtypes %] >+ [% UNLESS hidden.defined('streettype') %] >+ <li> >+ <label for="borrower_streettype" class="[% required.streettype | html %]">Street type:</label> >+ >+ <select name="borrower_streettype" name="borrower_streettype"> >+ <option value=""></option> >+ [% FOR roadtype IN roadtypes %] >+ [% IF roadtype.authorised_value == patron.streettype %] >+ <option value="[% roadtype.authorised_value | html %]" selected="selected">[% roadtype.lib | html %]</option> >+ [% ELSE %] >+ <option value="[% roadtype.authorised_value | html %]">[% roadtype.lib | html %]</option> >+ [% END %] >+ [% END %] >+ </select> >+ <div class="required_label [% required.streettype | html %]">Required</div> >+ </li> >+ [% END %] >+ [% END %] >+ > [% UNLESS hidden.defined('address') %] > <li> > <label for="borrower_address" class="[% required.address | html %]">Address:</label> >diff --git a/opac/opac-memberentry.pl b/opac/opac-memberentry.pl >index 17f2b480f8..0cd16d90a1 100755 >--- a/opac/opac-memberentry.pl >+++ b/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); >-- >2.11.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 18112
:
120476
|
120720
|
120770
|
120771
|
120809
|
120810
|
120841