. ",lost=" . $dbh->quote( $data{'lost'} )
. ",debarred=" . $dbh->quote( $data{'debarred'} )
. ",ethnicity=" . $dbh->quote( $data{'ethnicity'} )
- . ",ethnotes=" . $dbh->quote( $data{'ethnotes'} ) ;
+ . ",ethnotes=" . $dbh->quote( $data{'ethnotes'} )
+ . ",altcontactsurname=" . $dbh->quote( $data{'altcontactsurname'} )
+ . ",altcontactfirstname=" . $dbh->quote( $data{'altcontactfirstname'} )
+ . ",altcontactaddress1=" . $dbh->quote( $data{'altcontactaddress1'} )
+ . ",altcontactaddress2=" . $dbh->quote( $data{'altcontactaddress2'} )
+ . ",altcontactaddress3=" . $dbh->quote( $data{'altcontactaddress3'} )
+ . ",altcontactzipcode=" . $dbh->quote( $data{'altcontactzipcode'} )
+ . ",altcontactphone=" . $dbh->quote( $data{'altcontactphone'} ) ;
$debug and print STDERR "AddMember SQL: ($query)\n";
my $sth = $dbh->prepare($query);
# print "Executing SQL: $query\n";
`contactnote` varchar(255) default NULL,
`sort1` varchar(80) default NULL,
`sort2` varchar(80) default NULL,
+ `altcontactfirstname` varchar(255) default NULL,
+ `altcontactsurname` varchar(255) default NULL,
+ `altcontactaddress1` varchar(255) default NULL,
+ `altcontactaddress2` varchar(255) default NULL,
+ `altcontactaddress3` varchar(255) default NULL,
+ `altcontactzipcode` varchar(50) default NULL,
+ `althcontactphone` varchar(50) default NULL,
UNIQUE KEY `cardnumber` (`cardnumber`),
PRIMARY KEY `borrowernumber` (`borrowernumber`),
KEY `categorycode` (`categorycode`),
SetVersion ($DBversion);
}
+$DBversion = "3.00.00.037";
+if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
+ $dbh->do("ALTER TABLE `borrowers` ADD COLUMN `altcontactfirstname` varchar(255)");
+ $dbh->do("ALTER TABLE `borrowers` ADD COLUMN `altcontactsurname` varchar(255)");
+ $dbh->do("ALTER TABLE `borrowers` ADD COLUMN `altcontactaddress1` varchar(255)");
+ $dbh->do("ALTER TABLE `borrowers` ADD COLUMN `altcontactaddress2` varchar(255)");
+ $dbh->do("ALTER TABLE `borrowers` ADD COLUMN `altcontactaddress3` varchar(255)");
+ $dbh->do("ALTER TABLE `borrowers` ADD COLUMN `altcontactzipcode` varchar(50)");
+ $dbh->do("ALTER TABLE `borrowers` ADD COLUMN `altcontactphone` varchar(50)");
+ print "Upgrade to $DBversion done (Adding Alternative Contact Person information to borrowers table)\n";
+ SetVersion ($DBversion);
+}
+
=item DropAllForeignKeys($table)
Drop all foreign keys of the table $table
</li>
</ol>
</fieldset>
+ <fieldset class="rows" id="memberentry_address">
+ <legend>Alternate Contact</legend><ol>
+ <li>
+ <!-- TMPL_IF NAME="mandatoryaltcontactfirstname" -->
+ <label for="altcontactfirstname" class="required">
+ <!-- TMPL_ELSE -->
+ <label for "altcontactfirstname">
+ <!-- /TMPL_IF -->
+ Firstname:</label>
+ <input type="text" name="altcontactfirstname" value="<!-- TMPL_VAR NAME="altcontactfirstname" -->">
+ <!-- TMPL_IF NAME="mandatoryaltcontactfirstname" --><span class="required">Required</span><!-- /TMPL_IF -->
+ </li>
+ <li>
+ <!-- TMPL_IF NAME="mandatoryaltcontactsurname" -->
+ <label for="altcontactsurname" class="required">
+ <!-- TMPL_ELSE -->
+ <label for "altcontactsurname">
+ <!-- /TMPL_IF -->
+ Surname:</label>
+ <input type="text" name="altcontactsurname" value="<!-- TMPL_VAR NAME="altcontactsurname" -->">
+ <!-- TMPL_IF NAME="mandatoryaltcontactsurname" --><span class="required">Required</span><!-- /TMPL_IF -->
+ </li>
+ <li>
+ <!-- TMPL_IF NAME="mandatoryaltcontactaddress1" -->
+ <label for="altcontactaddress1" class="required">
+ <!-- TMPL_ELSE -->
+ <label for "altcontactaddress1">
+ <!-- /TMPL_IF -->
+ Address line 1:</label>
+ <input type="text" name="altcontactaddress1" value="<!-- TMPL_VAR NAME="altcontactaddress1" -->" size="40">
+ <!-- TMPL_IF NAME="mandatoryaltcontactaddress1" --><span class="required">Required</span><!-- /TMPL_IF -->
+ </li>
+ <li>
+ <!-- TMPL_IF NAME="mandatoryaltcontactaddress2" -->
+ <label for="altcontactaddress2" class="required">
+ <!-- TMPL_ELSE -->
+ <label for "altcontactaddress2">
+ <!-- /TMPL_IF -->
+ Address line 2:</label>
+ <input type="text" name="altcontactaddress2" value="<!-- TMPL_VAR NAME="altcontactaddress2" -->" size="40">
+ <!-- TMPL_IF NAME="mandatoryaltcontactaddress2" --><span class="required">Required</span><!-- /TMPL_IF -->
+ </li>
+ <li>
+ <!-- TMPL_IF NAME="mandatoryaltcontactaddress3" -->
+ <label for="altcontactaddress3" class="required">
+ <!-- TMPL_ELSE -->
+ <label for "altcontactaddress3">
+ <!-- /TMPL_IF -->
+ City, State:</label>
+ <input type="text" name="altcontactaddress3" value="<!-- TMPL_VAR NAME="altcontactaddress3" -->" size="40">
+ <!-- TMPL_IF NAME="mandatoryaltcontactaddress3" --><span class="required">Required</span><!-- /TMPL_IF -->
+ </li>
+ <li>
+ <!-- TMPL_IF NAME="mandatoryaltcontactzipcode" -->
+ <label for="altcontactzipcode" class="required">
+ <!-- TMPL_ELSE -->
+ <label for "altcontactzipcode">
+ <!-- /TMPL_IF -->
+ ZIP/Post code:</label>
+ <input type="text" name="altcontactzipcode" value="<!-- TMPL_VAR NAME="altcontactzipcode" -->" size="5">
+ <!-- TMPL_IF NAME="mandatoryaltcontactzipcode" --><span class="required">Required</span><!-- /TMPL_IF -->
+ </li>
+ <li>
+ <!-- TMPL_IF NAME="mandatoryaltcontactphone" -->
+ <label for="altcontactphone" class="required">
+ <!-- TMPL_ELSE -->
+ <label for "altcontactphone">
+ <!-- /TMPL_IF -->
+ Phone:</label>
+ <input type="text" name="altcontactphone" value="<!-- TMPL_VAR NAME="altcontactphone" -->">
+ <!-- TMPL_IF NAME="mandatoryaltcontactphone" --><span class="required">Required</span><!-- /TMPL_IF -->
+ </li>
+ </ol>
+ </fieldset>
+
+
<!-- TMPL_IF NAME="I" -->
<!-- TMPL_IF NAME="memberofinstution" -->
<fieldset class="rows" id="memberentry_organisation">
<li><span class="label">Email: </span><!-- TMPL_VAR NAME="email" --></li>
<li><span class="label">Relationship: </span><!-- TMPL_VAR NAME="relationship" --></li></ol></div>
<!-- /TMPL_IF -->
-</div><div class="action"><a href="memberentry.pl?op=modify&borrowernumber=<!-- TMPL_VAR NAME="borrowernumber" -->&step=2">Edit</a></div>
+</div>
+ <div id="patron-alternate-address" style="padding-top: 1em;">
+ <h3>Alternative Contact</h3>
+ <div class="rows"> <ol><li><span class="label">Surname: </span><!-- TMPL_VAR NAME="altcontactsurname" --></li>
+ <li><span class="label">Firstname: </span><!-- TMPL_VAR NAME="altcontactfirstname" --></li>
+ <li><span class="label">Address1: </span><!-- TMPL_VAR NAME="altcontactaddress1" --></li>
+ <li><span class="label">Address2: </span><!-- TMPL_VAR NAME="altcontactaddress2" --></li>
+ <li><span class="label">City,State: </span><!-- TMPL_VAR NAME="altcontactaddress3" --></li>
+ <li><span class="label">Zip/Post Code: </span><!-- TMPL_VAR NAME="altcontactzipcode" --></li>
+ <li><span class="label">Phone: </span><!-- TMPL_VAR NAME="altcontactphone" --></li></ol></div>
+</div>
+<div class="action"><a href="memberentry.pl?op=modify&borrowernumber=<!-- TMPL_VAR NAME="borrowernumber" -->&step=2">Edit</a></div>
</div>
</div>
use strict;
sub kohaversion {
- our $VERSION = "3.00.00.036";
+ our $VERSION = "3.00.00.037";
# version needs to be set this way
# so that it can be picked up by Makefile.PL
# during install