[Koha-patches] [PATCH 7/7] Bug 5422: Adding handling of address2, state, country to guarantor add form

Owen Leonard oleonard at myacpl.org
Thu Jan 13 22:08:39 CET 2011


Should apply on top of new/awaiting_qa/enh/bug_5422
---
 .../prog/en/modules/members/guarantor_search.tmpl  |    9 ++++++---
 members/guarantor_search.pl                        |    2 ++
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/guarantor_search.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/members/guarantor_search.tmpl
index 13fb052..992c78b 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/guarantor_search.tmpl
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/guarantor_search.tmpl
@@ -6,7 +6,7 @@
     </style>
     <script type="text/javascript">
         <!--
-        function fillguarantor(id, surname, firstname, streetnumber, address, city, zipcode) {
+        function fillguarantor(id, surname, firstname, streetnumber, address, address2, city, state, zipcode, country) {
             var $ = window.opener.$;
             var form = $('#entryform').get(0);
 
@@ -30,8 +30,11 @@
 
             form.streetnumber.value = streetnumber;
             form.address.value = address;
+            form.address2.value = address2;
             form.city.value = city;
+            form.state.value = state;
             form.zipcode.value = zipcode;
+            form.country.value = country;
 
             form.guarantorsearch.value = 'Change';
             self.close();
@@ -73,10 +76,10 @@
                     <!-- TMPL_VAR NAME="surname" -->, <!-- TMPL_VAR NAME="firstname" -->
                 </td> 
 				<td><!-- TMPL_VAR NAME="dateofbirth" --></td>
-				<td><p><!-- TMPL_VAR NAME="address" --> <!-- TMPL_VAR NAME="city" --></p></td>
+				<td><p><!-- TMPL_VAR NAME="address" --> <!-- TMPL_VAR NAME="address2" --> <!-- TMPL_VAR NAME="city" --> <!-- TMPL_VAR NAME="state" --> <!-- TMPL_VAR NAME="zipcode" --> <!-- TMPL_VAR NAME="country" --></p></td>
                 <td>
                     <form action="">
-                        <input type="button" onclick="fillguarantor('<!-- TMPL_VAR NAME="borrowernumber" -->', '<!-- TMPL_VAR NAME="surname" ESCAPE=JS -->', '<!-- TMPL_VAR NAME="firstname" ESCAPE=JS -->', '<!-- TMPL_VAR NAME="streetnumber" ESCAPE=JS -->', '<!-- TMPL_VAR NAME="address" ESCAPE=JS -->', '<!-- TMPL_VAR NAME="city" ESCAPE=JS -->', '<!-- TMPL_VAR NAME="zipcode" ESCAPE=JS -->'); return false;" value="Select"/>
+                        <input type="button" onclick="fillguarantor('<!-- TMPL_VAR NAME="borrowernumber" -->', '<!-- TMPL_VAR NAME="surname" ESCAPE=JS -->', '<!-- TMPL_VAR NAME="firstname" ESCAPE=JS -->', '<!-- TMPL_VAR NAME="streetnumber" ESCAPE=JS -->', '<!-- TMPL_VAR NAME="address" ESCAPE=JS -->','<!-- TMPL_VAR NAME="address2" ESCAPE=JS -->', '<!-- TMPL_VAR NAME="city" ESCAPE=JS -->', '<!-- TMPL_VAR NAME="state" ESCAPE=JS -->','<!-- TMPL_VAR NAME="zipcode" ESCAPE=JS -->','<!-- TMPL_VAR NAME="country" ESCAPE=JS -->'); return false;" value="Select"/>
                     </form>
                 </td>
 			</tr>
diff --git a/members/guarantor_search.pl b/members/guarantor_search.pl
index cbd958d..9eb60de 100755
--- a/members/guarantor_search.pl
+++ b/members/guarantor_search.pl
@@ -88,7 +88,9 @@ if ($member ne ''){
 		categorycode => $results->[$i]{'categorycode'},
 		streetnumber => $results->[$i]{'streetnumber'},
 		address => $results->[$i]{'address'},
+		address2 => $results->[$i]{'address2'},
 		city => $results->[$i]{'city'},
+		state => $results->[$i]{'state'},
 		zipcode => $results->[$i]{'zipcode'},
 		country => $results->[$i]{'country'},
 		branchcode => $results->[$i]{'branchcode'},
-- 
1.7.3



More information about the Koha-patches mailing list