Bugzilla – Attachment 4591 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]
Bug 6116: Adding a child patron
Bug-6116-Adding-a-child-patron.patch (text/plain), 5.92 KB, created by
Chris Cormack
on 2011-07-08 03:25:19 UTC
(
hide
)
Description:
Bug 6116: Adding a child patron
Filename:
MIME Type:
Creator:
Chris Cormack
Created:
2011-07-08 03:25:19 UTC
Size:
5.92 KB
patch
obsolete
>From e80cc01c4586ece27a8141ed1b3c9210c376a662 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.tt | 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.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/guarantor_search.tt >index a04b93c..ce429bc 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/guarantor_search.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/guarantor_search.tt >@@ -6,7 +6,7 @@ > </style> > <script type="text/javascript"> > <!-- >- function fillguarantor(id, surname, firstname, streetnumber, address, address2, city, state, zipcode, country) { >+ function fillguarantor(id, surname, firstname, streetnumber, address, address2, city, state, zipcode, country, branchcode) { > var $ = window.opener.$; > var form = $('#entryform').get(0); > >@@ -35,6 +35,7 @@ > form.state.value = state; > form.zipcode.value = zipcode; > form.country.value = country; >+ form.branchcode.value = branchcode; > > form.guarantorsearch.value = 'Change'; > self.close(); >@@ -79,7 +80,7 @@ > <td><p>[% resultsloo.address %] [% resultsloo.address2 %] [% resultsloo.city %] [% resultsloo.state %] [% resultsloo.zipcode %] [% resultsloo.country %]</p></td> > <td> > <form action=""> >- <input type="button" onclick="fillguarantor('[% resultsloo.borrowernumber %]', '[% resultsloo.surname |replace("'", "\'") |replace('"', '\"') |replace('\n', '\\n') |replace('\r', '\\r') %]', '[% resultsloo.firstname |replace("'", "\'") |replace('"', '\"') |replace('\n', '\\n') |replace('\r', '\\r') %]', '[% resultsloo.streetnumber |replace("'", "\'") |replace('"', '\"') |replace('\n', '\\n') |replace('\r', '\\r') %]', '[% resultsloo.address |replace("'", "\'") |replace('"', '\"') |replace('\n', '\\n') |replace('\r', '\\r') %]','[% resultsloo.address2 |replace("'", "\'") |replace('"', '\"') |replace('\n', '\\n') |replace('\r', '\\r') %]', '[% resultsloo.city |replace("'", "\'") |replace('"', '\"') |replace('\n', '\\n') |replace('\r', '\\r') %]', '[% resultsloo.state |replace("'", "\'") |replace('"', '\"') |replace('\n', '\\n') |replace('\r', '\\r') %]','[% resultsloo.zipcode |replace("'", "\'") |replace('"', '\"') |replace('\n', '\\n') |replace('\r', '\\r') %]','[% resultsloo.country |replace("'", "\'") |replace('"', '\"') |replace('\n', '\\n') |replace('\r', '\\r') %]'); return false;" value="Select"/> >+ <input type="button" onclick="fillguarantor('[% resultsloo.borrowernumber %]', '[% resultsloo.surname |replace("'", "\'") |replace('"', '\"') |replace('\n', '\\n') |replace('\r', '\\r') %]', '[% resultsloo.firstname |replace("'", "\'") |replace('"', '\"') |replace('\n', '\\n') |replace('\r', '\\r') %]', '[% resultsloo.streetnumber |replace("'", "\'") |replace('"', '\"') |replace('\n', '\\n') |replace('\r', '\\r') %]', '[% resultsloo.address |replace("'", "\'") |replace('"', '\"') |replace('\n', '\\n') |replace('\r', '\\r') %]','[% resultsloo.address2 |replace("'", "\'") |replace('"', '\"') |replace('\n', '\\n') |replace('\r', '\\r') %]', '[% resultsloo.city |replace("'", "\'") |replace('"', '\"') |replace('\n', '\\n') |replace('\r', '\\r') %]', '[% resultsloo.state |replace("'", "\'") |replace('"', '\"') |replace('\n', '\\n') |replace('\r', '\\r') %]','[% resultsloo.zipcode |replace("'", "\'") |replace('"', '\"') |replace('\n', '\\n') |replace('\r', '\\r') %]','[% resultsloo.country |replace("'", "\'") |replace('"', '\"') |replace('\n', '\\n') |replace('\r', '\\r') %]','[% resultsloo.branchcode |replace("'", "\'") |replace('"', '\"') |replace('\n', '\\n') |replace('\r', '\\r') %]'); return false;" value="Select"/> > </form> > </td> > </tr> >diff --git a/members/memberentry.pl b/members/memberentry.pl >index be34cc4..af12d8f 100755 >--- a/members/memberentry.pl >+++ b/members/memberentry.pl >@@ -380,7 +380,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; >@@ -498,7 +498,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 || ''; >@@ -554,7 +554,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' && $data{'branchcode'})); >+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