Bugzilla – Attachment 3796 Details for
Bug 6116
Adding child patron: library not set
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
0001-Bug-6116-Adding-a-child-patron.patch (text/plain), 4.31 KB, created by
Julian Maurice
on 2011-04-07 13:49:02 UTC
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Julian Maurice
Created:
2011-04-07 13:49:02 UTC
Size:
4.31 KB
patch
obsolete
>From 1388c18b3ca70d5910a468b298a31a8fd927190b Mon Sep 17 00:00:00 2001 >From: Christophe Croullebois <christophe.croullebois@biblibre.com> >Date: Mon, 7 Feb 2011 17:23:39 +0100 >Subject: [PATCH] Bug 6116: Adding a child patron > >When adding a patron who is a child, the default library is not set when defining a guarantor, this patch corrects the problem. >More, for children with no guarantors, the default branch is the editing branch. > >BibLibre MT5795 >--- > .../prog/en/modules/members/guarantor_search.tmpl | 5 +++-- > members/memberentry.pl | 8 +++++--- > 2 files changed, 8 insertions(+), 5 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/guarantor_search.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/members/guarantor_search.tmpl >index 13fb052..9c8a4f4 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/guarantor_search.tmpl >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/guarantor_search.tmpl >@@ -6,7 +6,7 @@ > </style> > <script type="text/javascript"> > <!-- >- function fillguarantor(id, surname, firstname, streetnumber, address, city, zipcode) { >+ function fillguarantor(id, surname, firstname, streetnumber, address, city, zipcode, branchcode) { > var $ = window.opener.$; > var form = $('#entryform').get(0); > >@@ -32,6 +32,7 @@ > form.address.value = address; > form.city.value = city; > form.zipcode.value = zipcode; >+ form.branchcode.value = branchcode; > > form.guarantorsearch.value = 'Change'; > self.close(); >@@ -76,7 +77,7 @@ > <td><p><!-- TMPL_VAR NAME="address" --> <!-- TMPL_VAR NAME="city" --></p></td> > <td> > <form action=""> >- <input type="button" onclick="fillguarantor('<!-- TMPL_VAR NAME="borrowernumber" -->', '<!-- TMPL_VAR NAME="surname" ESCAPE=JS -->', '<!-- TMPL_VAR NAME="firstname" ESCAPE=JS -->', '<!-- TMPL_VAR NAME="streetnumber" ESCAPE=JS -->', '<!-- TMPL_VAR NAME="address" ESCAPE=JS -->', '<!-- TMPL_VAR NAME="city" ESCAPE=JS -->', '<!-- TMPL_VAR NAME="zipcode" ESCAPE=JS -->'); return false;" value="Select"/> >+ <input type="button" onclick="fillguarantor('<!-- TMPL_VAR NAME="borrowernumber" -->', '<!-- TMPL_VAR NAME="surname" ESCAPE=JS -->', '<!-- TMPL_VAR NAME="firstname" ESCAPE=JS -->', '<!-- TMPL_VAR NAME="streetnumber" ESCAPE=JS -->', '<!-- TMPL_VAR NAME="address" ESCAPE=JS -->', '<!-- TMPL_VAR NAME="city" ESCAPE=JS -->', '<!-- TMPL_VAR NAME="zipcode" ESCAPE=JS -->','<!-- TMPL_VAR NAME="branchcode" ESCAPE=JS -->'); return false;" value="Select"/> > </form> > </td> > </tr> >diff --git a/members/memberentry.pl b/members/memberentry.pl >index 52b39b8..7a51d1b 100755 >--- a/members/memberentry.pl >+++ b/members/memberentry.pl >@@ -374,7 +374,7 @@ if ($nok or !$nodouble){ > } > if (C4::Context->preference("IndependantBranches")) { > my $userenv = C4::Context->userenv; >- if ($userenv->{flags} % 2 != 1 && $data{branchcode}){ >+ if ($userenv->{flags} % 2 != 1 && $data{'branchcode'}){ > unless ($userenv->{branch} eq $data{'branchcode'}){ > print $input->redirect("/cgi-bin/koha/members/members-home.pl"); > exit; >@@ -493,7 +493,7 @@ my $borrotitlepopup = CGI::popup_menu(-name=>'title', > -default=>$default_borrowertitle > ); > >-my @relationships = split /,|\|/, C4::Context->preference('BorrowerRelationship'); >+my @relationships = split /,|\|/, C4::Context->preference('borrowerRelationship'); > my @relshipdata; > while (@relationships) { > my $relship = shift @relationships || ''; >@@ -549,7 +549,9 @@ if(scalar(@select_branch) > 0){ > # -------------------------------------------------------------------------------------------------------- > #in modify mod :default value from $CGIbranch comes from borrowers table > #in add mod: default value come from branches table (ip correspendence) >-$default=$data{'branchcode'} if ($op eq 'modify' || ($op eq 'add' && $category_type eq 'C')); >+if (defined ($data{'branchcode'}) and ( $op eq 'modify' || ( $op eq 'add' && $category_type eq 'C' ) )) { >+ $default = $data{'branchcode'}; >+} > $CGIbranch = CGI::scrolling_list(-id => 'branchcode', > -name => 'branchcode', > -values => \@select_branch, >-- >1.7.4.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 6116
:
3796
|
4591
|
4603
|
4924