Bug 5422: Separate state field for patron's addresses
authorKatrin Fischer <Katrin.Fischer.83@web.de>
Thu, 7 Apr 2011 09:41:31 +0000 (11:41 +0200)
committerChris Cormack <chrisc@catalyst.net.nz>
Fri, 8 Apr 2011 23:52:07 +0000 (11:52 +1200)
Signed-off-by: Magnus Enger <magnus@enger.priv.no>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
C4/Auth_with_ldap.pm
C4/SIP/ILS/Patron.pm
koha-tmpl/intranet-tmpl/prog/en/modules/help/tools/import_borrowers.tmpl
koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tmpl
koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tmpl
koha-tmpl/opac-tmpl/prog/en/modules/opac-userupdate.tmpl
members/moremember.pl
opac/opac-userupdate.pl

index b25697c..acbd923 100644 (file)
@@ -308,62 +308,77 @@ C4::Auth - Authenticates Koha users
        What are the required fields?  Well, in mysql you can check the database table "borrowers" like this:
 
        mysql> show COLUMNS from borrowers;
-               +------------------+--------------+------+-----+---------+----------------+
-               | Field            | Type         | Null | Key | Default | Extra          |
-               +------------------+--------------+------+-----+---------+----------------+
-               | borrowernumber   | int(11)      | NO   | PRI | NULL    | auto_increment | 
-               | cardnumber       | varchar(16)  | YES  | UNI | NULL    |                | 
-               | surname          | mediumtext   | NO   |     |         |                | 
-               | firstname        | text         | YES  |     | NULL    |                | 
-               | title            | mediumtext   | YES  |     | NULL    |                | 
-               | othernames       | mediumtext   | YES  |     | NULL    |                | 
-               | initials         | text         | YES  |     | NULL    |                | 
-               | streetnumber     | varchar(10)  | YES  |     | NULL    |                | 
-               | streettype       | varchar(50)  | YES  |     | NULL    |                | 
-               | address          | mediumtext   | NO   |     |         |                | 
-               | address2         | text         | YES  |     | NULL    |                | 
-               | city             | mediumtext   | NO   |     |         |                | 
-               | zipcode          | varchar(25)  | YES  |     | NULL    |                | 
-               | email            | mediumtext   | YES  |     | NULL    |                | 
-               | phone            | text         | YES  |     | NULL    |                | 
-               | mobile           | varchar(50)  | YES  |     | NULL    |                | 
-               | fax              | mediumtext   | YES  |     | NULL    |                | 
-               | emailpro         | text         | YES  |     | NULL    |                | 
-               | phonepro         | text         | YES  |     | NULL    |                | 
-               | B_streetnumber   | varchar(10)  | YES  |     | NULL    |                | 
-               | B_streettype     | varchar(50)  | YES  |     | NULL    |                | 
-               | B_address        | varchar(100) | YES  |     | NULL    |                | 
-               | B_city           | mediumtext   | YES  |     | NULL    |                | 
-               | B_zipcode        | varchar(25)  | YES  |     | NULL    |                | 
-               | B_email          | text         | YES  |     | NULL    |                | 
-               | B_phone          | mediumtext   | YES  |     | NULL    |                | 
-               | dateofbirth      | date         | YES  |     | NULL    |                | 
-               | branchcode       | varchar(10)  | NO   | MUL |         |                | 
-               | categorycode     | varchar(10)  | NO   | MUL |         |                | 
-               | dateenrolled     | date         | YES  |     | NULL    |                | 
-               | dateexpiry       | date         | YES  |     | NULL    |                | 
-               | gonenoaddress    | tinyint(1)   | YES  |     | NULL    |                | 
-               | lost             | tinyint(1)   | YES  |     | NULL    |                | 
-               | debarred         | tinyint(1)   | YES  |     | NULL    |                | 
-               | contactname      | mediumtext   | YES  |     | NULL    |                | 
-               | contactfirstname | text         | YES  |     | NULL    |                | 
-               | contacttitle     | text         | YES  |     | NULL    |                | 
-               | guarantorid      | int(11)      | YES  |     | NULL    |                | 
-               | borrowernotes    | mediumtext   | YES  |     | NULL    |                | 
-               | relationship     | varchar(100) | YES  |     | NULL    |                | 
-               | ethnicity        | varchar(50)  | YES  |     | NULL    |                | 
-               | ethnotes         | varchar(255) | YES  |     | NULL    |                | 
-               | sex              | varchar(1)   | YES  |     | NULL    |                | 
-               | password         | varchar(30)  | YES  |     | NULL    |                | 
-               | flags            | int(11)      | YES  |     | NULL    |                | 
-               | userid           | varchar(30)  | YES  | MUL | NULL    |                |  # UNIQUE in next release.
-               | opacnote         | mediumtext   | YES  |     | NULL    |                | 
-               | contactnote      | varchar(255) | YES  |     | NULL    |                | 
-               | sort1            | varchar(80)  | YES  |     | NULL    |                | 
-               | sort2            | varchar(80)  | YES  |     | NULL    |                | 
-               +------------------+--------------+------+-----+---------+----------------+
-               50 rows in set (0.01 sec)
-       
+               +---------------------+--------------+------+-----+---------+----------------+
+               | Field               | Type         | Null | Key | Default | Extra          |
+               +---------------------+--------------+------+-----+---------+----------------+
+               | borrowernumber      | int(11)      | NO   | PRI | NULL    | auto_increment |
+               | cardnumber          | varchar(16)  | YES  | UNI | NULL    |                |
+               | surname             | mediumtext   | NO   |     | NULL    |                |
+               | firstname           | text         | YES  |     | NULL    |                |
+               | title               | mediumtext   | YES  |     | NULL    |                |
+               | othernames          | mediumtext   | YES  |     | NULL    |                |
+               | initials            | text         | YES  |     | NULL    |                |
+               | streetnumber        | varchar(10)  | YES  |     | NULL    |                |
+               | streettype          | varchar(50)  | YES  |     | NULL    |                |
+               | address             | mediumtext   | NO   |     | NULL    |                |
+               | address2            | text         | YES  |     | NULL    |                |
+               | city                | mediumtext   | NO   |     | NULL    |                |
+               | state               | mediumtext   | YES  |     | NULL    |                |
+               | zipcode             | varchar(25)  | YES  |     | NULL    |                |
+               | country             | text         | YES  |     | NULL    |                |
+               | email               | mediumtext   | YES  |     | NULL    |                |
+               | phone               | text         | YES  |     | NULL    |                |
+               | mobile              | varchar(50)  | YES  |     | NULL    |                |
+               | fax                 | mediumtext   | YES  |     | NULL    |                |
+               | emailpro            | text         | YES  |     | NULL    |                |
+               | phonepro            | text         | YES  |     | NULL    |                |
+               | B_streetnumber      | varchar(10)  | YES  |     | NULL    |                |
+               | B_streettype        | varchar(50)  | YES  |     | NULL    |                |
+               | B_address           | varchar(100) | YES  |     | NULL    |                |
+               | B_address2          | text         | YES  |     | NULL    |                |
+               | B_city              | mediumtext   | YES  |     | NULL    |                |
+               | B_state             | mediumtext   | YES  |     | NULL    |                |
+               | B_zipcode           | varchar(25)  | YES  |     | NULL    |                |
+               | B_country           | text         | YES  |     | NULL    |                |
+               | B_email             | text         | YES  |     | NULL    |                |
+               | B_phone             | mediumtext   | YES  |     | NULL    |                |
+               | dateofbirth         | date         | YES  |     | NULL    |                |
+               | branchcode          | varchar(10)  | NO   | MUL |         |                |
+               | categorycode        | varchar(10)  | NO   | MUL |         |                |
+               | dateenrolled        | date         | YES  |     | NULL    |                |
+               | dateexpiry          | date         | YES  |     | NULL    |                |
+               | gonenoaddress       | tinyint(1)   | YES  |     | NULL    |                |
+               | lost                | tinyint(1)   | YES  |     | NULL    |                |
+               | debarred            | tinyint(1)   | YES  |     | NULL    |                |
+               | contactname         | mediumtext   | YES  |     | NULL    |                |
+               | contactfirstname    | text         | YES  |     | NULL    |                |
+               | contacttitle        | text         | YES  |     | NULL    |                |
+               | guarantorid         | int(11)      | YES  | MUL | NULL    |                |
+               | borrowernotes       | mediumtext   | YES  |     | NULL    |                |
+               | relationship        | varchar(100) | YES  |     | NULL    |                |
+               | ethnicity           | varchar(50)  | YES  |     | NULL    |                |
+               | ethnotes            | varchar(255) | YES  |     | NULL    |                |
+               | sex                 | varchar(1)   | YES  |     | NULL    |                |
+               | password            | varchar(30)  | YES  |     | NULL    |                |
+               | flags               | int(11)      | YES  |     | NULL    |                |
+               | userid              | varchar(30)  | YES  | MUL | NULL    |                |
+               | opacnote            | mediumtext   | YES  |     | NULL    |                |
+               | contactnote         | varchar(255) | YES  |     | NULL    |                |
+               | sort1               | varchar(80)  | YES  |     | NULL    |                |
+               | sort2               | varchar(80)  | YES  |     | NULL    |                |
+               | altcontactfirstname | varchar(255) | YES  |     | NULL    |                |
+               | altcontactsurname   | varchar(255) | YES  |     | NULL    |                |
+               | altcontactaddress1  | varchar(255) | YES  |     | NULL    |                |
+               | altcontactaddress2  | varchar(255) | YES  |     | NULL    |                |
+               | altcontactaddress3  | varchar(255) | YES  |     | NULL    |                |
+               | altcontactstate     | mediumtext   | YES  |     | NULL    |                |
+               | altcontactzipcode   | varchar(50)  | YES  |     | NULL    |                |
+               | altcontactcountry   | text         | YES  |     | NULL    |                |
+               | altcontactphone     | varchar(50)  | YES  |     | NULL    |                |
+               | smsalertnumber      | varchar(50)  | YES  |     | NULL    |                |
+               | privacy             | int(11)      | NO   |     | 1       |                |
+               +---------------------+--------------+------+-----+---------+----------------+
+               66 rows in set (0.00 sec)
                Where Null="NO", the field is required.
 
 =head1 KOHA_CONF and field mapping
index 3f4e136..2b0b443 100644 (file)
@@ -389,72 +389,77 @@ __END__
   );
 
  From borrowers table:
- +---------------------+--------------+------+-----+
- | Field               | Type         | Null | Key |
- +---------------------+--------------+------+-----+
- | borrowernumber      | int(11)      | NO   | PRI |
- | cardnumber          | varchar(16)  | YES  | UNI |
- | surname             | mediumtext   | NO   |     |
- | firstname           | text         | YES  |     |
- | title               | mediumtext   | YES  |     |
- | othernames          | mediumtext   | YES  |     |
- | initials            | text         | YES  |     |
- | streetnumber        | varchar(10)  | YES  |     |
- | streettype          | varchar(50)  | YES  |     |
- | address             | mediumtext   | NO   |     |
- | address2            | text         | YES  |     |
- | city                | mediumtext   | NO   |     |
- | zipcode             | varchar(25)  | YES  |     |
- | country             | text         | YES  |     |
- | email               | mediumtext   | YES  |     |
- | phone               | text         | YES  |     |
- | mobile              | varchar(50)  | YES  |     |
- | fax                 | mediumtext   | YES  |     |
- | emailpro            | text         | YES  |     |
- | phonepro            | text         | YES  |     |
- | B_streetnumber      | varchar(10)  | YES  |     |
- | B_streettype        | varchar(50)  | YES  |     |
- | B_address           | varchar(100) | YES  |     |
- | B_address2          | text         | YES  |     |
- | B_city              | mediumtext   | YES  |     |
- | B_zipcode           | varchar(25)  | YES  |     |
- | B_country           | text         | YES  |     |
- | B_email             | text         | YES  |     |
- | B_phone             | mediumtext   | YES  |     |
- | dateofbirth         | date         | YES  |     |
- | branchcode          | varchar(10)  | NO   | MUL |
- | categorycode        | varchar(10)  | NO   | MUL |
- | dateenrolled        | date         | YES  |     |
- | dateexpiry          | date         | YES  |     |
- | gonenoaddress       | tinyint(1)   | YES  |     |
- | lost                | tinyint(1)   | YES  |     |
- | debarred            | tinyint(1)   | YES  |     |
- | contactname         | mediumtext   | YES  |     |
- | contactfirstname    | text         | YES  |     |
- | contacttitle        | text         | YES  |     |
- | guarantorid         | int(11)      | YES  |     |
- | borrowernotes       | mediumtext   | YES  |     |
- | relationship        | varchar(100) | YES  |     |
- | ethnicity           | varchar(50)  | YES  |     |
- | ethnotes            | varchar(255) | YES  |     |
- | sex                 | varchar(1)   | YES  |     |
- | password            | varchar(30)  | YES  |     |
- | flags               | int(11)      | YES  |     |
- | userid              | varchar(30)  | YES  | MUL |
- | opacnote            | mediumtext   | YES  |     |
- | contactnote         | varchar(255) | YES  |     |
- | sort1               | varchar(80)  | YES  |     |
- | sort2               | varchar(80)  | YES  |     |
- | altcontactfirstname | varchar(255) | YES  |     |
- | altcontactsurname   | varchar(255) | YES  |     |
- | altcontactaddress1  | varchar(255) | YES  |     |
- | altcontactaddress2  | varchar(255) | YES  |     |
- | altcontactaddress3  | varchar(255) | YES  |     |
- | altcontactzipcode   | varchar(50)  | YES  |     |
- | altcontactcountry   | text         | YES  |     |
- | altcontactphone     | varchar(50)  | YES  |     |
- | smsalertnumber      | varchar(50)  | YES  |     |
- +---------------------+--------------+------+-----+
++---------------------+--------------+------+-----+---------+----------------+
+| Field               | Type         | Null | Key | Default | Extra          |
++---------------------+--------------+------+-----+---------+----------------+
+| borrowernumber      | int(11)      | NO   | PRI | NULL    | auto_increment |
+| cardnumber          | varchar(16)  | YES  | UNI | NULL    |                |
+| surname             | mediumtext   | NO   |     | NULL    |                |
+| firstname           | text         | YES  |     | NULL    |                |
+| title               | mediumtext   | YES  |     | NULL    |                |
+| othernames          | mediumtext   | YES  |     | NULL    |                |
+| initials            | text         | YES  |     | NULL    |                |
+| streetnumber        | varchar(10)  | YES  |     | NULL    |                |
+| streettype          | varchar(50)  | YES  |     | NULL    |                |
+| address             | mediumtext   | NO   |     | NULL    |                |
+| address2            | text         | YES  |     | NULL    |                |
+| city                | mediumtext   | NO   |     | NULL    |                |
+| state               | mediumtext   | YES  |     | NULL    |                |
+| zipcode             | varchar(25)  | YES  |     | NULL    |                |
+| country             | text         | YES  |     | NULL    |                |
+| email               | mediumtext   | YES  |     | NULL    |                |
+| phone               | text         | YES  |     | NULL    |                |
+| mobile              | varchar(50)  | YES  |     | NULL    |                |
+| fax                 | mediumtext   | YES  |     | NULL    |                |
+| emailpro            | text         | YES  |     | NULL    |                |
+| phonepro            | text         | YES  |     | NULL    |                |
+| B_streetnumber      | varchar(10)  | YES  |     | NULL    |                |
+| B_streettype        | varchar(50)  | YES  |     | NULL    |                |
+| B_address           | varchar(100) | YES  |     | NULL    |                |
+| B_address2          | text         | YES  |     | NULL    |                |
+| B_city              | mediumtext   | YES  |     | NULL    |                |
+| B_state             | mediumtext   | YES  |     | NULL    |                |
+| B_zipcode           | varchar(25)  | YES  |     | NULL    |                |
+| B_country           | text         | YES  |     | NULL    |                |
+| B_email             | text         | YES  |     | NULL    |                |
+| B_phone             | mediumtext   | YES  |     | NULL    |                |
+| dateofbirth         | date         | YES  |     | NULL    |                |
+| branchcode          | varchar(10)  | NO   | MUL |         |                |
+| categorycode        | varchar(10)  | NO   | MUL |         |                |
+| dateenrolled        | date         | YES  |     | NULL    |                |
+| dateexpiry          | date         | YES  |     | NULL    |                |
+| gonenoaddress       | tinyint(1)   | YES  |     | NULL    |                |
+| lost                | tinyint(1)   | YES  |     | NULL    |                |
+| debarred            | tinyint(1)   | YES  |     | NULL    |                |
+| contactname         | mediumtext   | YES  |     | NULL    |                |
+| contactfirstname    | text         | YES  |     | NULL    |                |
+| contacttitle        | text         | YES  |     | NULL    |                |
+| guarantorid         | int(11)      | YES  | MUL | NULL    |                |
+| borrowernotes       | mediumtext   | YES  |     | NULL    |                |
+| relationship        | varchar(100) | YES  |     | NULL    |                |
+| ethnicity           | varchar(50)  | YES  |     | NULL    |                |
+| ethnotes            | varchar(255) | YES  |     | NULL    |                |
+| sex                 | varchar(1)   | YES  |     | NULL    |                |
+| password            | varchar(30)  | YES  |     | NULL    |                |
+| flags               | int(11)      | YES  |     | NULL    |                |
+| userid              | varchar(30)  | YES  | MUL | NULL    |                |
+| opacnote            | mediumtext   | YES  |     | NULL    |                |
+| contactnote         | varchar(255) | YES  |     | NULL    |                |
+| sort1               | varchar(80)  | YES  |     | NULL    |                |
+| sort2               | varchar(80)  | YES  |     | NULL    |                |
+| altcontactfirstname | varchar(255) | YES  |     | NULL    |                |
+| altcontactsurname   | varchar(255) | YES  |     | NULL    |                |
+| altcontactaddress1  | varchar(255) | YES  |     | NULL    |                |
+| altcontactaddress2  | varchar(255) | YES  |     | NULL    |                |
+| altcontactaddress3  | varchar(255) | YES  |     | NULL    |                |
+| altcontactstate     | mediumtext   | YES  |     | NULL    |                |
+| altcontactzipcode   | varchar(50)  | YES  |     | NULL    |                |
+| altcontactcountry   | text         | YES  |     | NULL    |                |
+| altcontactphone     | varchar(50)  | YES  |     | NULL    |                |
+| smsalertnumber      | varchar(50)  | YES  |     | NULL    |                |
+| privacy             | int(11)      | NO   |     | 1       |                |
++---------------------+--------------+------+-----+---------+----------------+
+
 
  From C4::Members
 
index c0b7f11..a27c8f0 100644 (file)
@@ -7,7 +7,7 @@
                        <ul>
                                <li>Format your file with the following fields
                                <ul>
-                                       <li>'surname', 'firstname', 'title', 'othernames', 'initials', 'streetnumber', 'streettype', 'address', 'address2', 'city', 'zipcode', 'country', 'email', 'phone', 'mobile', 'fax', 'emailpro', 'phonepro', 'B_streetnumber', 'B_streettype', 'B_address', 'B_address2', 'B_city', 'B_zipcode', 'B_country', 'B_email', 'B_phone', 'dateofbirth', 'branchcode', 'categorycode', 'dateenrolled', 'dateexpiry', 'gonenoaddress', 'lost', 'debarred', 'contactname', 'contactfirstname', 'contacttitle', 'guarantorid', 'borrowernotes', 'relationship', 'ethnicity', 'ethnotes', 'sex', 'password', 'flags', 'userid', 'opacnote', 'contactnote', 'sort1', 'sort2', 'altcontactfirstname', 'altcontactsurname', 'altcontactaddress1', 'altcontactaddress2', 'altcontactaddress3', 'altcontactzipcode', 'altcontactcountry', 'altcontactphone', 'smsalertnumber', 'patron_attributes'
+                                       <li>'surname', 'firstname', 'title', 'othernames', 'initials', 'streetnumber', 'streettype', 'address', 'address2', 'city', 'state', 'zipcode', 'country', 'email', 'phone', 'mobile', 'fax', 'emailpro', 'phonepro', 'B_streetnumber', 'B_streettype', 'B_address', 'B_address2', 'B_city', 'B_state', 'B_zipcode', 'B_country', 'B_email', 'B_phone', 'dateofbirth', 'branchcode', 'categorycode', 'dateenrolled', 'dateexpiry', 'gonenoaddress', 'lost', 'debarred', 'contactname', 'contactfirstname', 'contacttitle', 'guarantorid', 'borrowernotes', 'relationship', 'ethnicity', 'ethnotes', 'sex', 'password', 'flags', 'userid', 'opacnote', 'contactnote', 'sort1', 'sort2', 'altcontactfirstname', 'altcontactsurname', 'altcontactaddress1', 'altcontactaddress2', 'altcontactaddress3', 'altcontactstate', 'altcontactzipcode', 'altcontactcountry', 'altcontactphone', 'smsalertnumber', 'patron_attributes'
                                        <ul>
                                                <li>
                                            <span style="background-color: #ffe599">
@@ -28,4 +28,4 @@ TIP: If your passwords are already encrypted, talk to your systems administrator
                        <li>Click 'Import'</li>
                        <li>You will be brought to a confirmation screen.</li>
                </ul>
-       </div>  <!-- TMPL_INCLUDE NAME="help-bottom.inc" -->
\ No newline at end of file
+       </div>  <!-- TMPL_INCLUDE NAME="help-bottom.inc" -->
index 6cee5b2..feede9d 100644 (file)
       <!--TMPL_ELSE-->
         <label for="city">
       <!-- /TMPL_IF-->
-      City, State: </label>
+      City: </label>
         
         <input type="text" id="city" name="city" size="20" value="<!-- TMPL_VAR NAME="city" -->"<!--TMPL_IF NAME="opduplicate"--> onclick="this.value=''"<!-- /TMPL_IF --> />
         <!-- TMPL_IF NAME="city_cgipopup" -->or <strong>choose</strong>
         <!-- /TMPL_IF -->
          <!-- TMPL_IF NAME="mandatorycity" --><span class="required">Required</span><!-- /TMPL_IF -->
     </li>
+    <li> 
+      <!-- TMPL_IF NAME="mandatorystate" -->
+        <label for="state" class="required">
+      <!--TMPL_ELSE-->
+        <label for="state">
+      <!-- /TMPL_IF-->
+      State: </label>
+      <input type="text" name="state" id="state" size="20" value="<!-- TMPL_VAR NAME="state" -->" />
+         <!-- TMPL_IF NAME="mandatorystate" --><span class="required">Required</span><!-- /TMPL_IF -->
+    </li>
     <li> 
       <!-- TMPL_IF NAME="mandatoryzipcode" -->
         <label for="zipcode" class="required">
                                <!--TMPL_ELSE-->
                                        <label for="B_city">
                                <!-- /TMPL_IF-->
-                               City, State: </label>
-                               <input type="text" id="B_city" name="B_city" size="20" value="<!-- TMPL_VAR NAME="B_city" -->"<!--TMPL_IF NAME="opduplicate"--> onclick="this.value=''"<!-- /TMPL_IF --> />
+                               City: </label>
+                               <input type="text" id="B_city" name="B_city" size="20" value="<!-- TMPL_VAR NAME="B_city" -->" />
          <!-- TMPL_IF NAME="mandatoryB_city" --><span class="required">Required</span><!-- /TMPL_IF -->
+                       </li>
+                       <li>
+                               <!-- TMPL_IF NAME="mandatoryB_state" -->
+                                       <label for="B_state" class="required" >
+                               <!--TMPL_ELSE-->
+                                       <label for="B_state">
+                               <!-- /TMPL_IF-->
+                               State: </label>
+                               <input type="text" id="B_state" name="B_state" size="20" value="<!-- TMPL_VAR NAME="B_state" -->" />
+         <!-- TMPL_IF NAME="mandatoryB_state" --><span class="required">Required</span><!-- /TMPL_IF -->
                        </li>
                        <li>
                                <!-- TMPL_IF NAME="mandatoryB_zipcode" -->
                                <!-- TMPL_ELSE -->
                                <label for="altcontactaddress3">
                                <!-- /TMPL_IF -->
-                               City, State:</label>
-                               <input type="text" name="altcontactaddress3" id="altcontactaddress3" value="<!-- TMPL_VAR NAME="altcontactaddress3" -->"<!--TMPL_IF NAME="opduplicate"--> onclick="this.value=''"<!-- /TMPL_IF --> size="40" />
+                               City:</label>
+                               <input type="text" name="altcontactaddress3" id="altcontactaddress3" value="<!-- TMPL_VAR NAME="altcontactaddress3" -->" size="20" />
                                <!-- TMPL_IF NAME="mandatoryaltcontactaddress3" --><span class="required">Required</span><!-- /TMPL_IF -->
                        </li>
+                       <li>
+                           <!-- TMPL_IF NAME="mandatoryaltcontactstate" -->
+                               <label for="altcontactstate" class="required">
+                               <!-- TMPL_ELSE -->
+                               <label for="altcontactstate">
+                               <!-- /TMPL_IF -->
+                               State:</label>
+                               <input type="text" name="altcontactstate" id="altcontactstate" value="<!-- TMPL_VAR NAME="altcontactstate" -->" size="20" />
+                               <!-- TMPL_IF NAME="mandatoryaltcontactstate" --><span class="required">Required</span><!-- /TMPL_IF -->
+                       </li>
                        <li>
                            <!-- TMPL_IF NAME="mandatoryaltcontactzipcode" -->
                                <label for="altcontactzipcode" class="required">
index 2081073..2b6327f 100644 (file)
@@ -185,7 +185,8 @@ function validate1(date) {
         <!-- /TMPL_IF -->
         <!-- TMPL_VAR NAME="address" --><br />
         <!-- TMPL_IF NAME="address2" --><!-- TMPL_VAR NAME="address2"--><br /><!-- /TMPL_IF -->
-       <!-- TMPL_IF NAME="city" --><!-- TMPL_VAR NAME="city" --><!-- /TMPL_IF -->
+       <!-- TMPL_IF NAME="city" --><!-- TMPL_VAR NAME="city" --><!-- /TMPL_IF --> 
+       <!-- TMPL_IF NAME="state" --><!-- TMPL_VAR NAME="state" --><!-- /TMPL_IF -->
        <!-- TMPL_IF NAME="zipcode" --><!-- TMPL_VAR NAME="zipcode" --><br /><!-- /TMPL_IF -->
        <!-- TMPL_IF NAME="country" --><!-- TMPL_VAR NAME="country" --><!-- /TMPL_IF --></p>
                    
@@ -358,7 +359,8 @@ function validate1(date) {
     <!-- TMPL_UNLESS NAME="I"--><!-- TMPL_UNLESS NAME="C"-->
     <div class="rows">  <ol><li><span class="label">Address: </span><!-- TMPL_VAR NAME="B_address" --></li>
       <li><span class="label">Address 2: </span><!-- TMPL_VAR NAME="B_address2" --></li>
-      <li><span class="label">City, State: </span><!-- TMPL_VAR NAME="B_city" --></li>
+      <li><span class="label">City: </span><!-- TMPL_VAR NAME="B_city" --></li>
+      <!-- TMPL_IF NAME="B_state"--><li><span class="label">State: </span><!-- TMPL_VAR NAME="B_state" --></li><!-- /TMPL_IF -->
       <li><span class="label">Zip/Postal Code: </span><!-- TMPL_VAR NAME="B_zipcode" --></li>
       <li><span class="label">Country: </span><!-- TMPL_VAR NAME="B_country" --></li>
       <!-- TMPL_IF NAME="B_phone"--><li><span class="label">Phone: </span><!-- TMPL_VAR NAME="B_phone" --></li><!-- /TMPL_IF -->
@@ -380,7 +382,8 @@ function validate1(date) {
     <li><span class="label">First name: </span><!-- TMPL_VAR NAME="altcontactfirstname" --></li>    
     <li><span class="label">Address: </span><!-- TMPL_VAR NAME="altcontactaddress1" --></li>
     <li><span class="label">Address 2: </span><!-- TMPL_VAR NAME="altcontactaddress2" --></li>
-       <li><span class="label">City, State: </span><!-- TMPL_VAR NAME="altcontactaddress3" --></li>
+       <li><span class="label">City: </span><!-- TMPL_VAR NAME="altcontactaddress3" --></li>
+        <!-- TMPL_IF NAME="altcontactstate"--><li><span class="label">State: </span><!-- TMPL_VAR NAME="altcontactstate" --></li><!-- /TMPL_IF -->
        <li><span class="label">Zip/Postal Code: </span><!-- TMPL_VAR NAME="altcontactzipcode" --></li>
        <li><span class="label">Country: </span><!-- TMPL_VAR NAME="altcontactcountry" --></li>
     <li><span class="label">Phone: </span><!-- TMPL_VAR NAME="altcontactphone" --></li></ol></div>
index 024442e..1d12845 100644 (file)
@@ -30,7 +30,8 @@
        <input id="streetnumber" size ="7" type="text" value="<!-- TMPL_VAR name="streetnumber" -->"  name="streetnumber" /> 
        <input type="text" name="address" value="<!-- TMPL_VAR NAME="address" -->" id="address" />
        <input type="text" name="address2" value="<!-- TMPL_VAR NAME="address2" -->" id="address2" /></li>
-<li><label for="city">City, State:</label> <input id="city" type="text" value="<!-- TMPL_VAR name="city" -->"  name="city" /></li>
+<li><label for="city">City:</label> <input id="city" type="text" value="<!-- TMPL_VAR name="city" -->"  name="city" /></li>
+<li><label for="state">State:</label> <input id="state" type="text" value="<!-- TMPL_VAR name="state" -->"  name="state" /></li>
 <li><label for="zipcode">Zip Code: </label><input type="text" id="zipcode" value="<!-- TMPL_VAR NAME="zipcode" -->" name="zipcode" /></li>
 <li><label for="country">Country: </label><input type="text" id="country" value="<!-- TMPL_VAR NAME="country" -->" name="country" /></li>
 <li><label for="phone">Home Phone:</label> <input id="phone" type="text" value="<!-- TMPL_VAR name="phone" -->"  name="phone" /></li>
@@ -54,7 +55,8 @@
     <input id="B_address2" type="text" value="<!-- TMPL_VAR name="B_address2" -->"  name="B_address2" />
 </li>
 
-<li><label for="B_city">City, State:</label> <input id="B_city" type="text" value="<!-- TMPL_VAR name="B_city" -->"  name="B_city" /></li>
+<li><label for="B_city">City:</label> <input id="B_city" type="text" value="<!-- TMPL_VAR name="B_city" -->"  name="B_city" /></li>
+<li><label for="B_state">State:</label> <input id="B_state" type="text" value="<!-- TMPL_VAR name="B_state" -->"  name="B_state" /></li>
 <li><label for="B_zipcode">Zip Code:</label> <input type="text" id="B_zipcode" value="<!-- TMPL_VAR NAME="B_zipcode" -->" name="B_zipcode" /></li>
 <li><label for="B_country">Country:</label> <input type="text" id="B_country" value="<!-- TMPL_VAR NAME="B_country" -->" name="B_country" /></li>
 <li><label for="B_phone">Phone:</label> <input type="text" id="B_phone" value="<!-- TMPL_VAR NAME="B_phone" -->" name="B_phone" /></li>
 <li><span class="label">Other Name:</span> <!-- TMPL_VAR NAME="othernames" --></li>
 <li><span class="label">Address:</span> <!-- TMPL_VAR NAME="streetnumber" --> <!-- TMPL_VAR NAME="address" --></li>
 <li><span class="label">&nbsp;</span><!-- TMPL_VAR NAME="address2" --></li>
-<li><span class="label">City, State:</span>  <!-- TMPL_VAR name="city" --></li>
+<li><span class="label">City:</span>  <!-- TMPL_VAR name="city" --></li>
+<li><span class="label">State:</span>  <!-- TMPL_VAR name="state" --></li>
 <li><span class="label">Zip Code:</span>  <!-- TMPL_VAR NAME="zipcode" --></li>
 <li><span class="label">Country:</span>  <!-- TMPL_VAR NAME="country" --></li>
 <li><span class="label">Home Phone:</span>  <!-- TMPL_VAR name="phone" --></li>
 <ol>
 <li><span class="label">Alternate Address:</span> <!--TMPL_VAR NAME="B_streetnumber"--> <!-- TMPL_VAR name="B_address" --> </li>
 <li><span class="label">&nbsp;</span><!-- TMPL_VAR NAME="B_address2" --></li>
-<li><span class="label">City, State:</span> <!-- TMPL_VAR name="B_city" --></li>
+<li><span class="label">City:</span> <!-- TMPL_VAR name="B_city" --></li>
+<li><span class="label">State:</span> <!-- TMPL_VAR name="B_state" --></li>
 <li><span class="label">Zip Code:</span> <!-- TMPL_VAR NAME="B_zipcode" --></li>
 <li><span class="label">Country:</span> <!-- TMPL_VAR NAME="B_country" --></li>
 <li><span class="label">Phone:</span> <!-- TMPL_VAR NAME="B_phone" --></li>
index 9dcfa3a..c11073f 100755 (executable)
@@ -159,7 +159,7 @@ my $catcode;
 if ( $category_type eq 'C') {
        if ($data->{guarantorid} ) {
        my $data2 = GetMember( 'borrowernumber' => $data->{'guarantorid'} );
-       foreach (qw(address city B_address B_city phone mobile zipcode country B_country)) {
+       foreach (qw(address address2 city state B_address B_address2 B_city B_state phone mobile zipcode B_zipcode country B_country)) {
            $data->{$_} = $data2->{$_};
        }
    }
index 2e8fb5e..aa5858a 100755 (executable)
@@ -53,7 +53,7 @@ my $lib = GetBranchDetail($borr->{'branchcode'});
 # handle the new information....
 # collect the form values and send an email.
 my @fields = (
-    'surname','firstname','othernames','streetnumber','address','address2','city','zipcode','country','phone','mobile','fax','phonepro', 'email','emailpro','B_streetnumber','B_address','B_address2','B_city','B_zipcode','B_country','B_phone','B_email','dateofbirth','sex'
+    'surname','firstname','othernames','streetnumber','address','address2','city','state','zipcode','country','phone','mobile','fax','phonepro', 'emailaddress','emailpro','B_streetnumber','B_address','B_address2','B_city','B_state','B_zipcode','B_country','B_phone','B_email','dateofbirth','sex'
 );
 my $update;
 my $updateemailaddress = $lib->{'branchemail'};