From 718003cb1ac12461ec8b10abcc345196576c63dd Mon Sep 17 00:00:00 2001 From: simith Date: Tue, 2 Sep 2014 08:52:38 -0400 Subject: [PATCH] [PASSED QA] 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 --- 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 deletions(-) diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index 4ffbbf2..6ac1de4 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 `altcontactphone` varchar(50) default NULL, -- the phone number for the alternate contact for the patron/borrower `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 + `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 a0698ef..15b58ce 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -8672,6 +8672,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 95f42e6..b2eff65 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt @@ -164,7 +164,7 @@
- + [% END %] @@ -648,6 +648,42 @@ [% IF ( mandatoryfax ) %]Required[% END %] +
  • + + +
  • [% END %] -- 1.7.2.5