Bugzilla – Attachment 63214 Details for
Bug 12446
Enable an adult to have a guarantor
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
ID change for jQuery listener
ID-change-for-jQuery-listener.patch (text/plain), 3.79 KB, created by
Philippe Audet-Fortin
on 2017-05-05 20:42:51 UTC
(
hide
)
Description:
ID change for jQuery listener
Filename:
MIME Type:
Creator:
Philippe Audet-Fortin
Created:
2017-05-05 20:42:51 UTC
Size:
3.79 KB
patch
obsolete
>From b2c5d320bf0fb3e35ca7beddf8b7bc0d84dfbed3 Mon Sep 17 00:00:00 2001 >From: Philippe <philippe.audet-fortin@inlibro.com> >Date: Fri, 5 May 2017 16:32:29 -0400 >Subject: [PATCH] ID change for jQuery listener > >In modules/common/patron_search.tt, jQuery was listenning for #borrower_data >but should have listen for #guarantor_data. > >https://bugs.koha-community.org/show_bug.cgi?id=12446 >--- > C4/Members/Attributes.pm | 2 ++ > C4/Utils/DataTables/Members.pm | 8 ++++---- > koha-tmpl/intranet-tmpl/prog/en/modules/common/patron_search.tt | 4 ++-- > members/moremember.pl | 2 +- > 4 files changed, 9 insertions(+), 7 deletions(-) > >diff --git a/C4/Members/Attributes.pm b/C4/Members/Attributes.pm >index b4f37e0..2f3bd49 100644 >--- a/C4/Members/Attributes.pm >+++ b/C4/Members/Attributes.pm >@@ -388,7 +388,9 @@ sub _sort_by_code { > $guarantor_attributes = get_guarantor_attributes(); > > returns an array reference containing attributes to be shared between guarantor and guarantee. >+ > =cut >+ > sub get_guarantor_shared_attributes{ > my @attributes = qw( streetnumber address address2 city state zipcode country branchcode phone phonepro mobile email emailpro fax ); > if( my @additional = split(/\|/, C4::Context->preference("AdditionalGuarantorField")) ){ >diff --git a/C4/Utils/DataTables/Members.pm b/C4/Utils/DataTables/Members.pm >index f151cd1..846bcb3 100644 >--- a/C4/Utils/DataTables/Members.pm >+++ b/C4/Utils/DataTables/Members.pm >@@ -2,7 +2,7 @@ package C4::Utils::DataTables::Members; > > use Modern::Perl; > use C4::Context; >-use C4::Members qw/GetMemberIssuesAndFines/; >+use C4::Members; > use C4::Members::Attributes qw/get_guarantor_shared_attributes/; > use C4::Utils::DataTables; > use Koha::DateUtils; >@@ -49,14 +49,14 @@ sub search { > > } > >- my $dbh = C4::Context->dbh; >+ $dbh = C4::Context->dbh; > my @columns = qw( borrowernumber surname firstname streetnumber streettype address address2 city state zipcode country cardnumber dateexpiry borrowernotes branchcode email userid dateofbirth categorycode ); > if( my @guarantor_attributes = @{ get_guarantor_shared_attributes() }){ > foreach my $item (@guarantor_attributes) { > if (! grep {$_ eq $item} @columns) { > push @columns, $item; >- } >- } >+ } >+ } > }; > my $borrowers_columns = ""; > foreach my $item (@columns) { >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/common/patron_search.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/common/patron_search.tt >index ab0d15e..46d044d 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/common/patron_search.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/common/patron_search.tt >@@ -112,9 +112,9 @@ $(document).ready(function(){ > $("body").on("click",".select_user",function(e){ > e.preventDefault(); > var borrowernumber = $(this).data("borrowernumber"); >- var borrower_data = $("#borrower_data"+borrowernumber).val(); >+ var borrower_data = $("#guarantor_data"+borrowernumber).val(); > var guarantor_attributes = $("#guarantor_attributes").val(); >- select_user( borrowernumber, JSON.parse(borrower_data), JSON.parse(guarantor_attributes) ); >+ select_user( borrowernumber, JSON.parse(borrower_data), JSON.parse(guarantor_attributes) ); > }); > > }); >diff --git a/members/moremember.pl b/members/moremember.pl >index 5fddbeb..7b18fdb 100755 >--- a/members/moremember.pl >+++ b/members/moremember.pl >@@ -218,7 +218,7 @@ if ( $count ) { > ( $template->param( adultborrower => 1 ) ) if ( $category_type eq 'A' || $category_type eq 'I' ); > > if (my $guarantor = $patron->guarantor){ >- $template->param(isguarantor => 1); >+ $template->param(isguarantor => 1); > $template->param(guarantor => $guarantor); > } > >-- >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 12446
:
29278
|
36176
|
39744
|
42469
|
42470
|
42535
|
46277
|
46278
|
46327
|
46328
|
46345
|
46486
|
49793
|
50953
|
53534
|
53535
|
53536
|
53913
|
60929
|
60930
|
60934
|
63148
|
63149
|
63214
|
64793
|
64794
|
64828
|
72295
|
72883
|
77766
|
77767
|
77768
|
79343
|
79344
|
79345
|
79347
|
79348
|
85069
|
88364
|
88365
|
88366
|
88367
|
90389
|
90390
|
90391
|
90392
|
90470
|
90471
|
90472
|
90473
|
93388
|
93389
|
93390
|
93391
|
93392
|
93393
|
93394
|
95411
|
95853
|
95854
|
95855
|
95856
|
95857
|
95858
|
95859
|
95860
|
106753
|
106754
|
106755
|
106756
|
106757
|
107611
|
111052
|
111053
|
111317
|
111318
|
112102
|
112160
|
112161
|
112162
|
112163
|
113583
|
121925
|
121926
|
121927
|
121928
|
121929
|
122084
|
122085
|
122086
|
122087
|
122088
|
122089
|
122090
|
122091
|
122184
|
122185
|
122186
|
122187
|
130398
|
130399
|
130400
|
130401
|
130402
|
131965
|
131966
|
131967
|
131968
|
131969
|
133691
|
133952
|
133953
|
133954
|
133955
|
133956
|
133957
|
134930
|
134931
|
134932
|
134933
|
134934
|
134935
|
134936
|
135506
|
135507
|
135508
|
135509
|
135510
|
135511
|
135512
|
135519
|
135520
|
135521
|
135522
|
135523
|
135544
|
135545
|
142401
|
142408
|
142431
|
142432
|
142433
|
142434
|
142435
|
142436
|
142437
|
142438
|
142439