Bugzilla – Attachment 39822 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 [QA Followup] - Restore ability for patron to control setting
Bug-9303-QA-Followup---Restore-ability-for-patron-.patch (text/plain), 5.63 KB, created by
Nick Clemens (kidclamp)
on 2015-06-03 18:55:55 UTC
(
hide
)
Description:
Bug 9303 [QA Followup] - Restore ability for patron to control setting
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2015-06-03 18:55:55 UTC
Size:
5.63 KB
patch
obsolete
>From 228473c035dbe5dee087b946eec9c79d6aa0d8fb Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Mon, 11 May 2015 07:31:27 -0400 >Subject: [PATCH] Bug 9303 [QA Followup] - Restore ability for patron to > control setting > >Signed-off-by: Nick Clemens <nick@quecheelibrary.org> >--- > Koha/Borrower.pm | 12 ++++++++++++ > .../opac-tmpl/bootstrap/en/modules/opac-memberentry.tt | 3 +-- > koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-privacy.tt | 5 ++--- > opac/opac-memberentry.pl | 5 ++++- > opac/opac-privacy.pl | 15 ++++++++------- > 5 files changed, 27 insertions(+), 13 deletions(-) > >diff --git a/Koha/Borrower.pm b/Koha/Borrower.pm >index 93426bf..6604b8a 100644 >--- a/Koha/Borrower.pm >+++ b/Koha/Borrower.pm >@@ -35,6 +35,18 @@ Koha::Borrower - Koha Borrower Object class > > =cut > >+=head3 guarantor >+ >+Returns a Koha::Borrower object for this borrower's guarantor >+ >+=cut >+ >+sub guarantor { >+ my ( $self ) = @_; >+ >+ return Koha::Borrowers->find( $self->guarantorid() ); >+} >+ > =head3 type > > =cut >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 1beb853..3a474ac 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt >@@ -73,8 +73,7 @@ > <span id="update_privacy_guarantor_checkouts_message" class="alert" style="display:none"></span> > </span> > <span class="hint"> >- [% SET g = Koha.Find('Borrower',borrower.guarantorid) %] >- Your guarantor is <i>[% g.firstname %] [% g.surname %]</i> >+ Your guarantor is <i>[% guarantor.firstname %] [% guarantor.surname %]</i> > </span> > </li> > </ol> >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 6fc0c31..c7465c3 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-privacy.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-privacy.tt >@@ -68,8 +68,7 @@ > </select> > </div> > >- [% SET b = Koha.Find('Borrower', borrower.borrowernumber) %] >- [% IF b.guarantorid && Koha.Preference('AllowPatronToSetCheckoutsVisibilityForGuarantor') %] >+ [% IF borrower.guarantorid && Koha.Preference('AllowPatronToSetCheckoutsVisibilityForGuarantor') %] > <div> > <label for="privacy_guarantor_checkouts">Allow your guarantor to view your current checkouts?</label> > <select name="privacy_guarantor_checkouts"> >@@ -82,7 +81,7 @@ > [% END %] > </select> > <span class="hint"> >- Your guarantor is <i>[% b.guarantor.firstname %] [% b.guarantor.surname %]</i> >+ Your guarantor is <i>[% borrower.guarantor.firstname %] [% borrower.guarantor.surname %]</i> > </span> > </div> > [% END %] >diff --git a/opac/opac-memberentry.pl b/opac/opac-memberentry.pl >index 5a075ba..94ff114 100755 >--- a/opac/opac-memberentry.pl >+++ b/opac/opac-memberentry.pl >@@ -24,6 +24,7 @@ use String::Random qw( random_string ); > use C4::Auth; > use C4::Output; > use C4::Members; >+use Koha::Borrowers; > use Koha::Borrower::Modifications; > use C4::Branch qw(GetBranchesLoop); > use C4::Scrubber; >@@ -209,7 +210,9 @@ elsif ( $action eq 'edit' ) { #Display logged in borrower's data > } > > $template->param( >- borrower => $borrower, ); >+ borrower => $borrower, >+ guarantor => Koha::Borrowers->find($borrowernumber)->guarantor(), >+ ); > > if (C4::Context->preference('OPACpatronimages')) { > my ($image, $dberror) = GetPatronImage($borrower->{borrowernumber}); >diff --git a/opac/opac-privacy.pl b/opac/opac-privacy.pl >index b697011..b03daac 100755 >--- a/opac/opac-privacy.pl >+++ b/opac/opac-privacy.pl >@@ -25,6 +25,7 @@ use C4::Circulation; > use C4::Members; > use C4::Output; > use C4::Dates; >+use Koha::Borrowers; > > my $query = new CGI; > >@@ -76,15 +77,15 @@ elsif ( $op eq "delete_record" ) { > } > > # get borrower privacy .... >-my $borrower = GetMemberDetails( $borrowernumber ); >+my $borrower = Koha::Borrowers->find( $borrowernumber );; > > $template->param( >- 'Ask_data' => 1, >- 'privacy' . $borrower->{'privacy'} => 1, >- 'privacyview' => 1, >- 'borrower' => $borrower, >- 'surname' => $borrower->{surname}, >- 'firstname' => $borrower->{firstname}, >+ 'Ask_data' => 1, >+ 'privacy' . $borrower->privacy() => 1, >+ 'privacyview' => 1, >+ 'borrower' => $borrower, >+ 'surname' => $borrower->{surname}, >+ 'firstname' => $borrower->{firstname}, > ); > > output_html_with_http_headers $query, $cookie, $template->output; >-- >1.9.1
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