From 3af7a913fe55bf70a41cc0e16a11401b8528b172 Mon Sep 17 00:00:00 2001 From: simith Date: Tue, 2 Sep 2014 08:52:38 -0400 Subject: [PATCH] [SIGNED-OFF] Bug 11879 - Add a new borrower field : main contact method. (Was: Rebased on current master for testing) http://bugs.koha-community.org/show_bug.cgi?id=11879 To test this patch: Update database Edit a borrower's informations. The "Main Contact Method" selectbox appears in the form and its value is correctly. Works as expected. For handling of syspref BorrowerUnwantedField use second patch- Signed-off-by: Marc Veron Signed-off-by: Kyle M Hall Signed-off-by: Aleisha --- installer/data/mysql/kohastructure.sql | 1 + installer/data/mysql/updatedatabase.pl | 6 ++++ .../prog/en/modules/members/memberentrygen.tt | 38 +++++++++++++++++++- 3 files changed, 44 insertions(+), 1 deletion(-) diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index b98b017..4756558 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -265,6 +265,7 @@ CREATE TABLE `borrowers` ( -- this table includes information about your patrons `smsalertnumber` varchar(50) default NULL, -- the mobile phone number where the patron/borrower would like to receive notices (if SNS turned on) `privacy` integer(11) DEFAULT '1' NOT NULL, -- patron/borrower's privacy settings related to their reading history `privacy_guarantor_checkouts` tinyint(1) NOT NULL DEFAULT '0', -- controls if relatives can see this patron's checkouts + `primary_contact_method` varchar(45) DEFAULT NULL, -- useful for reporting purposes UNIQUE KEY `cardnumber` (`cardnumber`), PRIMARY KEY `borrowernumber` (`borrowernumber`), KEY `categorycode` (`categorycode`), diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 8ee4088..22eb351 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -8719,6 +8719,12 @@ if ( CheckVersion($DBversion) ) { print "Upgrade to $DBversion done (Bug 10402: Move bookseller contacts to separate table)\n"; SetVersion($DBversion); } +$DBversion = "XXX"; +if ( CheckVersion($DBversion) ) { + $dbh->do("ALTER TABLE `borrowers` ADD COLUMN `primary_contact_method` VARCHAR(45) NULL DEFAULT NULL;"); + print "Upgrade to $DBversion done (Bug 11879: Add a new borrower field : main contact method)\n"; + SetVersion($DBversion); +} $DBversion = "3.17.00.017"; if ( CheckVersion($DBversion) ) { 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 8a8d3d4..3b42c52 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt @@ -204,7 +204,7 @@
- + [% END %] @@ -593,6 +593,42 @@ [% IF ( mandatoryfax ) %]Required[% END %] +
  • + + +
  • [% END %] -- 1.7.10.4