Bugzilla – Attachment 29303 Details for
Bug 9303
relative's checkouts in the opac
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 9303 [6] [QA Followup 3] - Rename prefs and field
Bug-9303-6-QA-Followup-3---Rename-prefs-and-field.patch (text/plain), 29.61 KB, created by
Kyle M Hall (khall)
on 2014-06-26 18:58:01 UTC
(
hide
)
Description:
Bug 9303 [6] [QA Followup 3] - Rename prefs and field
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2014-06-26 18:58:01 UTC
Size:
29.61 KB
patch
obsolete
>From 8d665cc4f84fdcf94bd631cb903c3fa979b64952 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Thu, 26 Jun 2014 12:56:03 -0400 >Subject: [PATCH] Bug 9303 [6] [QA Followup 3] - Rename prefs and field > >* Change AllowStaffToSetRelativesCheckoutsVisibility to AllowStaffToSetCheckoutsVisibilityForGuarantor >* Change AllowPatronToSetRelativesCheckoutsVisibility to AllowPatronToSetCheckoutsVisibilityForGuarantor >* Change borrowers field privacy_relative_checkouts to privacy_guarantor_checkouts >--- > Koha/Schema/Result/Borrower.pm | 110 +++++++++++++++----- > installer/data/mysql/kohastructure.sql | 4 +- > installer/data/mysql/sysprefs.sql | 4 +- > installer/data/mysql/updatedatabase.pl | 8 +- > .../prog/en/modules/admin/preferences/opac.pref | 2 +- > .../prog/en/modules/admin/preferences/patrons.pref | 2 +- > .../prog/en/modules/members/memberentrygen.tt | 10 +- > .../prog/en/modules/members/moremember.tt | 4 +- > .../bootstrap/en/modules/opac-memberentry.tt | 18 ++-- > .../opac-tmpl/bootstrap/en/modules/opac-privacy.tt | 8 +- > .../opac-tmpl/prog/en/modules/opac-memberentry.tt | 14 ++-- > .../opac-tmpl/prog/en/modules/opac-privacy.tt | 6 +- > members/moremember.pl | 2 +- > opac/opac-privacy.pl | 4 +- > opac/opac-user.pl | 6 +- > opac/svc/patron/show_checkouts_to_relatives | 8 +- > 16 files changed, 136 insertions(+), 74 deletions(-) > >diff --git a/Koha/Schema/Result/Borrower.pm b/Koha/Schema/Result/Borrower.pm >index 6a3fb10..6824c37 100644 >--- a/Koha/Schema/Result/Borrower.pm >+++ b/Koha/Schema/Result/Borrower.pm >@@ -1,17 +1,21 @@ >+use utf8; > package Koha::Schema::Result::Borrower; > > # Created by DBIx::Class::Schema::Loader > # DO NOT MODIFY THE FIRST PART OF THIS FILE > >+=head1 NAME >+ >+Koha::Schema::Result::Borrower >+ >+=cut >+ > use strict; > use warnings; > > use base 'DBIx::Class::Core'; > >- >-=head1 NAME >- >-Koha::Schema::Result::Borrower >+=head1 TABLE: C<borrowers> > > =cut > >@@ -187,6 +191,7 @@ __PACKAGE__->table("borrowers"); > =head2 dateofbirth > > data_type: 'date' >+ datetime_undef_if_invalid: 1 > is_nullable: 1 > > =head2 branchcode >@@ -208,11 +213,13 @@ __PACKAGE__->table("borrowers"); > =head2 dateenrolled > > data_type: 'date' >+ datetime_undef_if_invalid: 1 > is_nullable: 1 > > =head2 dateexpiry > > data_type: 'date' >+ datetime_undef_if_invalid: 1 > is_nullable: 1 > > =head2 gonenoaddress >@@ -228,6 +235,7 @@ __PACKAGE__->table("borrowers"); > =head2 debarred > > data_type: 'date' >+ datetime_undef_if_invalid: 1 > is_nullable: 1 > > =head2 debarredcomment >@@ -389,7 +397,7 @@ __PACKAGE__->table("borrowers"); > default_value: 1 > is_nullable: 0 > >-=head2 privacy_relative_checkouts >+=head2 privacy_guarantor_checkouts > > data_type: 'tinyint' > default_value: 0 >@@ -461,7 +469,7 @@ __PACKAGE__->add_columns( > "b_phone", > { data_type => "mediumtext", is_nullable => 1 }, > "dateofbirth", >- { data_type => "date", is_nullable => 1 }, >+ { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 }, > "branchcode", > { > data_type => "varchar", >@@ -479,15 +487,15 @@ __PACKAGE__->add_columns( > size => 10, > }, > "dateenrolled", >- { data_type => "date", is_nullable => 1 }, >+ { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 }, > "dateexpiry", >- { data_type => "date", is_nullable => 1 }, >+ { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 }, > "gonenoaddress", > { data_type => "tinyint", is_nullable => 1 }, > "lost", > { data_type => "tinyint", is_nullable => 1 }, > "debarred", >- { data_type => "date", is_nullable => 1 }, >+ { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 }, > "debarredcomment", > { data_type => "varchar", is_nullable => 1, size => 255 }, > "contactname", >@@ -544,10 +552,34 @@ __PACKAGE__->add_columns( > { data_type => "varchar", is_nullable => 1, size => 50 }, > "privacy", > { data_type => "integer", default_value => 1, is_nullable => 0 }, >- "privacy_relative_checkouts", >+ "privacy_guarantor_checkouts", > { data_type => "tinyint", default_value => 0, is_nullable => 0 }, > ); >+ >+=head1 PRIMARY KEY >+ >+=over 4 >+ >+=item * L</borrowernumber> >+ >+=back >+ >+=cut >+ > __PACKAGE__->set_primary_key("borrowernumber"); >+ >+=head1 UNIQUE CONSTRAINTS >+ >+=head2 C<cardnumber> >+ >+=over 4 >+ >+=item * L</cardnumber> >+ >+=back >+ >+=cut >+ > __PACKAGE__->add_unique_constraint("cardnumber", ["cardnumber"]); > > =head1 RELATIONS >@@ -672,34 +704,34 @@ __PACKAGE__->has_many( > { cascade_copy => 0, cascade_delete => 0 }, > ); > >-=head2 categorycode >+=head2 branchcode > > Type: belongs_to > >-Related object: L<Koha::Schema::Result::Category> >+Related object: L<Koha::Schema::Result::Branch> > > =cut > > __PACKAGE__->belongs_to( >- "categorycode", >- "Koha::Schema::Result::Category", >- { categorycode => "categorycode" }, >- { on_delete => "CASCADE", on_update => "CASCADE" }, >+ "branchcode", >+ "Koha::Schema::Result::Branch", >+ { branchcode => "branchcode" }, >+ { is_deferrable => 1, on_delete => "RESTRICT", on_update => "RESTRICT" }, > ); > >-=head2 branchcode >+=head2 categorycode > > Type: belongs_to > >-Related object: L<Koha::Schema::Result::Branch> >+Related object: L<Koha::Schema::Result::Category> > > =cut > > __PACKAGE__->belongs_to( >- "branchcode", >- "Koha::Schema::Result::Branch", >- { branchcode => "branchcode" }, >- { on_delete => "CASCADE", on_update => "CASCADE" }, >+ "categorycode", >+ "Koha::Schema::Result::Category", >+ { categorycode => "categorycode" }, >+ { is_deferrable => 1, on_delete => "RESTRICT", on_update => "RESTRICT" }, > ); > > =head2 course_instructors >@@ -1017,9 +1049,39 @@ __PACKAGE__->has_many( > { cascade_copy => 0, cascade_delete => 0 }, > ); > >+=head2 basketnoes >+ >+Type: many_to_many >+ >+Composing rels: L</aqbasketusers> -> basketno >+ >+=cut >+ >+__PACKAGE__->many_to_many("basketnoes", "aqbasketusers", "basketno"); >+ >+=head2 budgets >+ >+Type: many_to_many >+ >+Composing rels: L</aqbudgetborrowers> -> budget >+ >+=cut >+ >+__PACKAGE__->many_to_many("budgets", "aqbudgetborrowers", "budget"); >+ >+=head2 courses >+ >+Type: many_to_many >+ >+Composing rels: L</course_instructors> -> course >+ >+=cut >+ >+__PACKAGE__->many_to_many("courses", "course_instructors", "course"); >+ > >-# Created by DBIx::Class::Schema::Loader v0.07000 @ 2013-11-07 08:15:21 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:TQTGI0fDt+xCFs+8nOarfA >+# Created by DBIx::Class::Schema::Loader v0.07040 @ 2014-06-26 13:01:03 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:W0T8L4w9Nr/mPXzoX0/Xjg > > __PACKAGE__->belongs_to( > "guarantor", >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index f18ea4a..9d147c3 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -265,7 +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 >- `privacy_relative_checkouts` tinyint(1) NOT NULL DEFAULT '0', -- controls if relatives can see this patron's checkouts >+ `privacy_guarantor_checkouts` tinyint(1) NOT NULL DEFAULT '0', -- controls if relatives can see this patron's checkouts > UNIQUE KEY `cardnumber` (`cardnumber`), > PRIMARY KEY `borrowernumber` (`borrowernumber`), > KEY `categorycode` (`categorycode`), >@@ -869,7 +869,7 @@ CREATE TABLE `deletedborrowers` ( -- stores data related to the patrons/borrower > `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 KEY `borrowernumber` (`borrowernumber`), >- `privacy_relative_checkouts` tinyint(1) NOT NULL DEFAULT '0', -- controls if relatives can see this patron's checkouts >+ `privacy_guarantor_checkouts` tinyint(1) NOT NULL DEFAULT '0', -- controls if relatives can see this patron's checkouts > KEY borrowernumber (borrowernumber), > KEY `cardnumber` (`cardnumber`) > ) ENGINE=InnoDB DEFAULT CHARSET=utf8; >diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql >index 08871ab..be01609 100644 >--- a/installer/data/mysql/sysprefs.sql >+++ b/installer/data/mysql/sysprefs.sql >@@ -25,13 +25,13 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` > ('AllowNotForLoanOverride','0','','If ON, Koha will allow the librarian to loan a not for loan item.','YesNo'), > ('AllowOfflineCirculation','0','','If on, enables HTML5 offline circulation functionality.','YesNo'), > ('AllowOnShelfHolds','0','','Allow hold requests to be placed on items that are not on loan','YesNo'), >-('AllowPatronToSetRelativesCheckoutsVisibility', '0', NULL, 'If enabled, the patron can set checkouts to be visible to his or her guarantor', 'YesNo'), >+('AllowPatronToSetCheckoutsVisibilityForGuarantor', '0', NULL, 'If enabled, the patron can set checkouts to be visible to his or her guarantor', 'YesNo'), > ('AllowPKIAuth','None','None|Common Name|emailAddress','Use the field from a client-side SSL certificate to look a user in the Koha database','Choice'), > ('AllowPurchaseSuggestionBranchChoice','0','1','Allow user to choose branch when making a purchase suggestion','YesNo'), > ('AllowRenewalLimitOverride','0',NULL,'if ON, allows renewal limits to be overridden on the circulation screen','YesNo'), > ('AllowReturnToBranch','anywhere','anywhere|homebranch|holdingbranch|homeorholdingbranch','Where an item may be returned','Choice'), > ('AllowSelfCheckReturns','0','','If enabled, patrons may return items through the Web-based Self Checkout','YesNo'), >-('AllowStaffToSetRelativesCheckoutsVisibility','0',NULL,'If enabled, library staff can set a patron''s checkouts to be visible to linked patrons from the opac.', 'YesNo'), >+('AllowStaffToSetCheckoutsVisibilityForGuarantor','0',NULL,'If enabled, library staff can set a patron''s checkouts to be visible to linked patrons from the opac.', 'YesNo'), > ('AllowTooManyOverride','1','','If on, allow staff to override and check out items when the patron has reached the maximum number of allowed checkouts','YesNo'), > ('alphabet','A B C D E F G H I J K L M N O P Q R S T U V W X Y Z',NULL,'Alphabet than can be expanded into browse links, e.g. on Home > Patrons','free'), > ('AlternateHoldingsField','',NULL,'The MARC field/subfield that contains alternate holdings information for bibs taht do not have items attached (e.g. 852abchi for libraries converting from MARC Magician).','free'), >diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl >index 8eee821..6c71e61 100755 >--- a/installer/data/mysql/updatedatabase.pl >+++ b/installer/data/mysql/updatedatabase.pl >@@ -8564,10 +8564,10 @@ if ( CheckVersion($DBversion) ) { > $DBversion = "3.15.00.XXX"; > if(CheckVersion($DBversion)) { > $dbh->do(q{ >- ALTER TABLE borrowers ADD privacy_relative_checkouts BOOLEAN NOT NULL DEFAULT '0' >+ ALTER TABLE borrowers ADD privacy_guarantor_checkouts BOOLEAN NOT NULL DEFAULT '0' > }); > $dbh->do(q{ >- ALTER TABLE deletedborrowers ADD privacy_relative_checkouts BOOLEAN NOT NULL DEFAULT '0' >+ ALTER TABLE deletedborrowers ADD privacy_guarantor_checkouts BOOLEAN NOT NULL DEFAULT '0' > }); > $dbh->do(q{ > ALTER TABLE old_issues DROP PRIMARY KEY >@@ -8606,7 +8606,7 @@ if(CheckVersion($DBversion)) { > $dbh->do(q{ > INSERT INTO systempreferences (variable, value, options, explanation, type ) > VALUES ( >- 'AllowStaffToSetRelativesCheckoutsVisibility', '0', NULL, >+ 'AllowStaffToSetCheckoutsVisibilityForGuarantor', '0', NULL, > 'If enabled, library staff can set a patron''s checkouts to be visible to linked patrons from the opac.', 'YesNo' > ) > }); >@@ -8614,7 +8614,7 @@ if(CheckVersion($DBversion)) { > $dbh->do(q{ > INSERT INTO systempreferences (variable, value, options, explanation, type ) > VALUES ( >- 'AllowPatronToSetRelativesCheckoutsVisibility', '0', NULL, >+ 'AllowPatronToSetCheckoutsVisibilityForGuarantor', '0', NULL, > 'If enabled, the patron can set checkouts to be visible to his or her guarantor', 'YesNo' > ) > }); >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref >index 973d4fd..48302b6 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref >@@ -588,7 +588,7 @@ OPAC: > no: "Don't allow" > - patrons to choose their own privacy settings for their reading history. This requires opacreadinghistory and AnonymousPatron > - >- - pref: AllowPatronToSetRelativesCheckoutsVisibility >+ - pref: AllowPatronToSetCheckoutsVisibilityForGuarantor > default: 0 > choices: > yes: Allow >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref >index 8364fe0..fef9a0f 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref >@@ -134,7 +134,7 @@ Patrons: > no: "Don't" > - enable the ability to upload and attach arbitrary files to a borrower record. > - >- - pref: AllowStaffToSetRelativesCheckoutsVisibility >+ - pref: AllowStaffToSetCheckoutsVisibilityForGuarantor > choices: > yes: Allow > no: "Don't allow" >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 10cb802..82cc913 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt >@@ -1171,11 +1171,11 @@ > [% END %] > [% IF ( mandatorypassword ) %]<span class="required">Required</span>[% END %][% IF ( ERROR_password_mismatch ) %]<span class="required">Passwords do not match</span>[% END %] > </li> >- [% IF Koha.Preference('AllowStaffToSetRelativesCheckoutsVisibility') %] >+ [% IF guarantorid && Koha.Preference('AllowStaffToSetCheckoutsVisibilityForGuarantor') %] > <li> >- <label for="privacy_relative_checkouts">Show checkouts to relatives</label> >- <select name="privacy_relative_checkouts" id="privacy_relative_checkouts"> >- [% IF privacy_relative_checkouts %] >+ <label for="privacy_guarantor_checkouts">Show checkouts to guarantor</label> >+ <select name="privacy_guarantor_checkouts" id="privacy_guarantor_checkouts"> >+ [% IF privacy_guarantor_checkouts %] > <option value="0">No</option> > <option value="1" selected>Yes</option> > [% ELSE %] >@@ -1183,7 +1183,7 @@ > <option value="1">Yes</option> > [% END %] > </select> >- <div class="hint">Allow linked patron accounts to view this patron's checkouts from the OPAC</div> >+ <div class="hint">Allow guarantor of this patron to view this patron's checkouts from the OPAC</div> > </li> > [% END %] > </ol> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt >index e72c281..c812eed 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt >@@ -374,8 +374,8 @@ function validate1(date) { > </li>[% END %] > > <li> >- <span class="label">Show checkouts to relatives</span> >- [% IF privacy_relative_checkouts %] >+ <span class="label">Show checkouts to guarantor</span> >+ [% IF privacy_guarantor_checkouts %] > Yes > [% ELSE %] > No >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt >index 9051f28..67ce8ee 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt >@@ -54,23 +54,23 @@ > <div class="alert">You typed in the wrong characters in the box before submitting. Please try again.</div> > [% END %] > >- [% IF borrower.guarantorid && !Koha.Preference('OPACPrivacy') && Koha.Preference('AllowPatronToSetRelativesCheckoutsVisibility') %] >+ [% IF borrower.guarantorid && !Koha.Preference('OPACPrivacy') && Koha.Preference('AllowPatronToSetCheckoutsVisibilityForGuarantor') %] > <fieldset class="rows" id="memberentry_privacy"> > <legend id="privacy_legend">Privacy</legend> > <ol> > <li> > <label>Allow your guarantor to view your current checkouts?</label> >- <select id="privacy_relative_checkouts"> >+ <select id="privacy_guarantor_checkouts"> > <option value="0">No</option> >- [% IF borrower.privacy_relative_checkouts %] >+ [% IF borrower.privacy_guarantor_checkouts %] > <option value="1" selected="selected">Yes</option> > [% ELSE %] > <option value="1">Yes</option> > [% END %] > </select> > <span class="hint"> >- <a id="update_privacy_relative_checkouts" href="#" class="btn">Update</a> >- <span id="update_privacy_relative_checkouts_message" class="alert" style="display:none"></span> >+ <a id="update_privacy_guarantor_checkouts" href="#" class="btn">Update</a> >+ <span id="update_privacy_guarantor_checkouts_message" class="alert" style="display:none"></span> > </span> > <span class="hint"> > [% SET g = Koha.Find('Borrower',borrower.guarantorid) %] >@@ -805,9 +805,9 @@ > $( "#borrower_dateofbirth" ).datepicker({ yearRange: "c-120:c" }); > [% END %] > >- [% IF borrower.guarantorid && !Koha.Preference('OPACPrivacy') && Koha.Preference('AllowPatronToSetRelativesCheckoutsVisibility') %] >- $('#update_privacy_relative_checkouts').click( function() { >- $.post( "/cgi-bin/koha/svc/patron/show_checkouts_to_relatives", { privacy_relative_checkouts: $('#privacy_relative_checkouts').val() }) >+ [% IF borrower.guarantorid && !Koha.Preference('OPACPrivacy') && Koha.Preference('AllowPatronToSetCheckoutsVisibilityForGuarantor') %] >+ $('#update_privacy_guarantor_checkouts').click( function() { >+ $.post( "/cgi-bin/koha/svc/patron/show_checkouts_to_relatives", { privacy_guarantor_checkouts: $('#privacy_guarantor_checkouts').val() }) > .done(function( data ) { > var message; > if ( data.success ) { >@@ -816,7 +816,7 @@ > message = _("Unable to update your setting!"); > } > >- $('#update_privacy_relative_checkouts_message').fadeIn("slow").text( message ).delay( 5000 ).fadeOut("slow"); >+ $('#update_privacy_guarantor_checkouts_message').fadeIn("slow").text( message ).delay( 5000 ).fadeOut("slow"); > }); > }); > [% END %] >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-privacy.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-privacy.tt >index b56336f..4a678e6 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-privacy.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-privacy.tt >@@ -69,11 +69,11 @@ > </div> > > [% SET b = Koha.Find('Borrower', borrower.borrowernumber) %] >- [% IF b.guarantorid && Koha.Preference('AllowPatronToSetRelativesCheckoutsVisibility') %] >+ [% IF b.guarantorid && Koha.Preference('AllowPatronToSetCheckoutsVisibilityForGuarantor') %] > <div> >- <label for="privacy_relative_checkouts">Allow your guarantor to view your current checkouts?</label> >- <select name="privacy_relative_checkouts"> >- [% IF borrower.privacy_relative_checkouts %] >+ <label for="privacy_guarantor_checkouts">Allow your guarantor to view your current checkouts?</label> >+ <select name="privacy_guarantor_checkouts"> >+ [% IF borrower.privacy_guarantor_checkouts %] > <option value="0">No</option> > <option value="1" selected>Yes</option> > [% ELSE %] >diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-memberentry.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-memberentry.tt >index d35706a..65fe743 100644 >--- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-memberentry.tt >+++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-memberentry.tt >@@ -21,8 +21,8 @@ > $( "#borrower_dateofbirth" ).datepicker({ yearRange: "c-120:c" }); > [% END %] > >- $('#update_privacy_relative_checkouts').click( function() { >- $.post( "/cgi-bin/koha/svc/patron/show_checkouts_to_relatives", { privacy_relative_checkouts: $('#privacy_relative_checkouts').val() }) >+ $('#update_privacy_guarantor_checkouts').click( function() { >+ $.post( "/cgi-bin/koha/svc/patron/show_checkouts_to_relatives", { privacy_guarantor_checkouts: $('#privacy_guarantor_checkouts').val() }) > .done(function( data ) { > var message; > if ( data.success ) { >@@ -31,7 +31,7 @@ > message = _("Unable to update your setting!"); > } > >- $('#update_privacy_relative_checkouts_message').fadeIn("slow").text( message ).delay( 5000 ).fadeOut("slow"); >+ $('#update_privacy_guarantor_checkouts_message').fadeIn("slow").text( message ).delay( 5000 ).fadeOut("slow"); > }); > }); > }); >@@ -81,17 +81,17 @@ > <ol> > <li> > <label>Show checkouts to relatives</label> >- <select id="privacy_relative_checkouts"> >+ <select id="privacy_guarantor_checkouts"> > <option value="0">No</option> >- [% IF borrower.privacy_relative_checkouts %] >+ [% IF borrower.privacy_guarantor_checkouts %] > <option value="1" selected="selected">Yes</option> > [% ELSE %] > <option value="1">Yes</option> > [% END %] > </select> > <span class="hint"> >- <button id="update_privacy_relative_checkouts" onclick="return false;">Update</button> >- <span id="update_privacy_relative_checkouts_message" class="alert" style="display:none"></span> >+ <button id="update_privacy_guarantor_checkouts" onclick="return false;">Update</button> >+ <span id="update_privacy_guarantor_checkouts_message" class="alert" style="display:none"></span> > </span> > </li> > </ol> >diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-privacy.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-privacy.tt >index 632c9c7..b45514b 100644 >--- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-privacy.tt >+++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-privacy.tt >@@ -57,9 +57,9 @@ > > <p/> > >- <label for="privacy_relative_checkouts">Allow relatives to view your current checkouts?</label> >- <select name="privacy_relative_checkouts"> >- [% IF borrower.privacy_relative_checkouts %] >+ <label for="privacy_guarantor_checkouts">Allow relatives to view your current checkouts?</label> >+ <select name="privacy_guarantor_checkouts"> >+ [% IF borrower.privacy_guarantor_checkouts %] > <option value="0">No</option> > <option value="1" selected>Yes</option> > [% ELSE %] >diff --git a/members/moremember.pl b/members/moremember.pl >index 9e81eb7..7a842d0 100755 >--- a/members/moremember.pl >+++ b/members/moremember.pl >@@ -444,7 +444,7 @@ $template->param( > # reserveloop => \@reservedata, > samebranch => $samebranch, > quickslip => $quickslip, >- privacy_relative_checkouts => $data->{'privacy_relative_checkouts'}, >+ privacy_guarantor_checkouts => $data->{'privacy_guarantor_checkouts'}, > activeBorrowerRelationship => (C4::Context->preference('borrowerRelationship') ne ''), > AutoResumeSuspendedHolds => C4::Context->preference('AutoResumeSuspendedHolds'), > SuspendHoldsIntranet => C4::Context->preference('SuspendHoldsIntranet'), >diff --git a/opac/opac-privacy.pl b/opac/opac-privacy.pl >index c41e394..10c44f9 100755 >--- a/opac/opac-privacy.pl >+++ b/opac/opac-privacy.pl >@@ -42,13 +42,13 @@ my ( $template, $borrowernumber, $cookie ) = get_template_and_user( > > my $op = $query->param("op"); > my $privacy = $query->param("privacy"); >-my $privacy_relative_checkouts = $query->param("privacy_relative_checkouts"); >+my $privacy_guarantor_checkouts = $query->param("privacy_guarantor_checkouts"); > > if ( $op eq "update_privacy" ) { > ModMember( > borrowernumber => $borrowernumber, > privacy => $privacy, >- privacy_relative_checkouts => $privacy_relative_checkouts, >+ privacy_guarantor_checkouts => $privacy_guarantor_checkouts, > ); > $template->param( 'privacy_updated' => 1 ); > } >diff --git a/opac/opac-user.pl b/opac/opac-user.pl >index 4d62632..4030260 100755 >--- a/opac/opac-user.pl >+++ b/opac/opac-user.pl >@@ -374,13 +374,13 @@ if ( $borr->{'opacnote'} ) { > ); > } > >-if ( C4::Context->preference('AllowPatronToSetRelativesCheckoutsVisibility') >- || C4::Context->preference('AllowStaffToSetRelativesCheckoutsVisibility') ) >+if ( C4::Context->preference('AllowPatronToSetCheckoutsVisibilityForGuarantor') >+ || C4::Context->preference('AllowStaffToSetCheckoutsVisibilityForGuarantor') ) > { > my @relatives = > Koha::Database->new()->schema()->resultset("Borrower")->search( > { >- privacy_relative_checkouts => 1, >+ privacy_guarantor_checkouts => 1, > 'me.guarantorid' => $borrowernumber > }, > { prefetch => [ { 'issues' => { 'item' => 'biblio' } } ] } >diff --git a/opac/svc/patron/show_checkouts_to_relatives b/opac/svc/patron/show_checkouts_to_relatives >index 8e26c52..11ca835 100755 >--- a/opac/svc/patron/show_checkouts_to_relatives >+++ b/opac/svc/patron/show_checkouts_to_relatives >@@ -29,7 +29,7 @@ use JSON qw( to_json ); > > my $cgi = CGI->new(); > >-my $privacy_relative_checkouts = $cgi->param('privacy_relative_checkouts'); >+my $privacy_guarantor_checkouts = $cgi->param('privacy_guarantor_checkouts'); > > my ( $userid, $cookie, $sessionID, $flags ) = checkauth( $cgi, 1, {}, 'opac' ); > >@@ -37,13 +37,13 @@ my $borrowernumber = > C4::Context->userenv ? C4::Context->userenv->{number} : undef; > > my $success = 0; >-if ( $borrowernumber && defined($privacy_relative_checkouts) ) { >+if ( $borrowernumber && defined($privacy_guarantor_checkouts) ) { > my $patron = > Koha::Database->new()->schema()->resultset('Borrower') > ->find($borrowernumber); > > $success = $patron->update( >- { privacy_relative_checkouts => $privacy_relative_checkouts } ); >+ { privacy_guarantor_checkouts => $privacy_guarantor_checkouts } ); > } > > binmode STDOUT, ":encoding(UTF-8)"; >@@ -55,6 +55,6 @@ print $cgi->header( > print to_json( > { > success => $success ? 1 : 0, >- privacy_relative_checkouts => $privacy_relative_checkouts, >+ privacy_guarantor_checkouts => $privacy_guarantor_checkouts, > } > ); >-- >1.7.2.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 9303
:
22757
|
22770
|
22771
|
22772
|
22783
|
22789
|
22790
|
22809
|
22966
|
22967
|
22968
|
22974
|
22975
|
23086
|
23087
|
23088
|
23089
|
23090
|
23525
|
23526
|
23527
|
24009
|
24010
|
24011
|
24773
|
24774
|
24775
|
24776
|
25008
|
25584
|
25585
|
25586
|
27537
|
27538
|
27539
|
27540
|
27541
|
27542
|
27543
|
27698
|
27699
|
28153
|
28154
|
28155
|
28156
|
28157
|
28158
|
28159
|
28160
|
28161
|
28912
|
29171
|
29172
|
29215
|
29286
|
29287
|
29288
|
29289
|
29290
|
29299
|
29302
|
29303
|
29304
|
29932
|
29933
|
29934
|
29935
|
29936
|
29937
|
30287
|
30288
|
30289
|
30297
|
30298
|
30299
|
30300
|
32053
|
32054
|
32055
|
33049
|
34629
|
34630
|
34631
|
34632
|
34633
|
35519
|
35520
|
35521
|
35522
|
35523
|
35524
|
35525
|
35526
|
35527
|
35528
|
35529
|
35530
|
35531
|
35532
|
35678
|
35679
|
35680
|
35681
|
35682
|
35683
|
35684
|
35686
|
35687
|
35688
|
35689
|
35690
|
35691
|
35832
|
36287
|
36288
|
36289
|
37110
|
37111
|
37112
|
38264
|
38265
|
38266
|
38267
|
38328
|
38329
|
38330
|
38331
|
38446
|
38447
|
38448
|
38449
|
38450
|
38820
|
38821
|
38822
|
38823
|
38824
|
39042
|
39043
|
39044
|
39045
|
39046
|
39047
|
39048
|
39811
|
39817
|
39818
|
39819
|
39820
|
39821
|
39822
|
39823
|
44430
|
44431
|
44432
|
44433
|
44434
|
44435
|
44436
|
44511
|
44512
|
44513
|
44514
|
44515
|
44516
|
44517
|
46136
|
46137
|
46138
|
46139
|
46140
|
46141
|
46142