From c5501a45f32cd2e169025c28d32b5927809140ce Mon Sep 17 00:00:00 2001 From: simith Date: Tue, 2 Sep 2014 08:52:38 -0400 Subject: [PATCH] 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 39fc0b0..3170626 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -266,6 +266,7 @@ CREATE TABLE `borrowers` ( -- this table includes information about your patrons `sms_provider_id` int(11) DEFAULT NULL, -- the provider of the mobile phone number defined in smsalertnumber `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 3f0629d..f200bb4 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 497c1a7..e916788 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt @@ -77,7 +77,7 @@
- + [% END %] @@ -466,6 +466,42 @@ [% IF ( mandatoryfax ) %]Required[% END %] +
  • + + +
  • [% END %] -- 1.9.1