Bugzilla – Attachment 25516 Details for
Bug 3766
Cities/Towns only on one address
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[Signed-off] Bug 3766 - Cities/Towns and Road Types only on one address
Signed-off-Bug-3766---CitiesTowns-and-Road-Types-o.patch (text/plain), 4.96 KB, created by
Marc Véron
on 2014-02-20 17:14:22 UTC
(
hide
)
Description:
[Signed-off] Bug 3766 - Cities/Towns and Road Types only on one address
Filename:
MIME Type:
Creator:
Marc Véron
Created:
2014-02-20 17:14:22 UTC
Size:
4.96 KB
patch
obsolete
>From 4132472d6c81ef0ebd6c1763c12812ad5028dc78 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Wed, 19 Feb 2014 11:08:24 -0500 >Subject: [PATCH] [Signed-off] Bug 3766 - Cities/Towns and Road Types only on > one address >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >When adding a new patron only the primary contact city/state fields are >linked to a dropdown listing values from stored city/state/zip/country >values. The same dropdown of predefined values should be linked to >alternate address and alternate contact. This patch does so by adapting >the same JS and markup for these additional cases. > >To test you should have cities defined in Administration -> Cities. > >- Edit or create a new patron. >- Under main address -> city select one of the predefined entries. >- The city, state, zip, and country values should be correctly > populated. >- Test under alternate address -> city and alternate contact -> city. >- Save your changes and confirm that everything worked correctly. > >Works as expected >Signed-off-by: Marc Véron <veron@veron.ch> >--- > .../prog/en/modules/members/memberentrygen.tt | 42 ++++++++++++++++++++ > 1 file changed, 42 insertions(+) > >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 05b5b4e..b1d224a 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt >@@ -25,6 +25,22 @@ > document.form.state.value=RegExp.$3; > document.form.country.value=RegExp.$4; > }); >+ $("#select_B_city").change(function(){ >+ var myRegEx=new RegExp(/(.*)\|(.*)\|(.*)\|(.*)/); >+ document.form.select_B_city.value.match(myRegEx); >+ document.form.B_zipcode.value=RegExp.$1; >+ document.form.B_city.value=RegExp.$2; >+ document.form.B_state.value=RegExp.$3; >+ document.form.B_country.value=RegExp.$4; >+ }); >+ $("#select_altcity").change(function(){ >+ var myRegEx=new RegExp(/(.*)\|(.*)\|(.*)\|(.*)/); >+ document.form.select_altcity.value.match(myRegEx); >+ document.form.altcontactzipcode.value=RegExp.$1; >+ document.form.altcontactaddress3.value=RegExp.$2; >+ document.form.altcontactstate.value=RegExp.$3; >+ document.form.altcontactcountry.value=RegExp.$4; >+ }); > $(".clearDupe").on("focus",function(){ > $(this).val(""); > }) >@@ -679,6 +695,19 @@ > [% END %] > City: </label> > <input type="text" id="B_city" name="B_city" size="20" value="[% B_city %]" class="[% focusAction %]" /> >+ [% IF ( city_cgipopup ) %]or <strong>choose</strong> >+ <select id="select_B_city" name="select_B_city"> >+ [% FOREACH city_loo IN city_loop %] >+ [% IF ( city_loo.selected ) %] >+ <option value="[% city_loo.city_zipcode %]|[% city_loo.city_name %]|[% city_loo.city_state %]|[% city_loo.city_country %]" selected="selected"> >+ [% ELSE %] >+ <option value="[% city_loo.city_zipcode %]|[% city_loo.city_name %]|[% city_loo.city_state %]|[% city_loo.city_country %]"> >+ [% END %] >+ [% city_loo.city_name %] [% city_loo.city_state %] [% city_loo.city_zipcode %] >+ </option> >+ [% END %] >+ </select> >+ [% END %] > [% IF ( mandatoryB_city ) %]<span class="required">Required</span>[% END %] > </li> > [% END %] >@@ -818,6 +847,19 @@ > [% END %] > City:</label> > <input type="text" name="altcontactaddress3" id="altcontactaddress3" value="[% altcontactaddress3 %]" size="20" class="[% focusAction %]" /> >+ [% IF ( city_cgipopup ) %]or <strong>choose</strong> >+ <select id="select_altcity" name="select_altcity"> >+ [% FOREACH city_loo IN city_loop %] >+ [% IF ( city_loo.selected ) %] >+ <option value="[% city_loo.city_zipcode %]|[% city_loo.city_name %]|[% city_loo.city_state %]|[% city_loo.city_country %]" selected="selected"> >+ [% ELSE %] >+ <option value="[% city_loo.city_zipcode %]|[% city_loo.city_name %]|[% city_loo.city_state %]|[% city_loo.city_country %]"> >+ [% END %] >+ [% city_loo.city_name %] [% city_loo.city_state %] [% city_loo.city_zipcode %] >+ </option> >+ [% END %] >+ </select> >+ [% END %] > [% IF ( mandatoryaltcontactaddress3 ) %]<span class="required">Required</span>[% END %] > </li> > [% END %] >-- >1.7.10.4
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 3766
:
25449
|
25516
|
25568
|
87530
|
87532
|
87656
|
87671