Bugzilla – Attachment 2736 Details for
Bug 5003
Can not search for organisation by name
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
New patch, small error fixed, tested with HEAD
0001-Bug-5003-Can-not-search-for-organisation-by-name.patch (text/plain), 4.54 KB, created by
Katrin Fischer
on 2010-11-10 06:55:55 UTC
(
hide
)
Description:
New patch, small error fixed, tested with HEAD
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2010-11-10 06:55:55 UTC
Size:
4.54 KB
patch
obsolete
>From 13c533ffd5a8cf64324a7639901bc5c8115b3131 Mon Sep 17 00:00:00 2001 >From: Katrin Fischer <Katrin.Fischer.83@web.de> >Date: Wed, 11 Aug 2010 09:25:32 +0200 >Subject: [PATCH] Bug 5003: Can not search for organisation by name >Content-Type: text/plain; charset="utf-8" > >Rebased to current HEAD, small error fixed. >Should also apply to 3.2 >--- > .../prog/en/modules/members/guarantor_search.tmpl | 1 + > .../prog/en/modules/members/memberentrygen.tmpl | 4 ++-- > members/guarantor_search.pl | 12 +++++++++--- > members/memberentry.pl | 1 + > 4 files changed, 13 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 7fa5099..13fb052 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 >@@ -48,6 +48,7 @@ > <h3>Search for guarantor</h3> > <form action="/cgi-bin/koha/members/guarantor_search.pl" method="post"> > <fieldset> >+ <input type="hidden" name="category_type" id="category_type" value="<!-- TMPL_VAR NAME="category_type" -->" /> > <input type="text" name="member" id="member" value="<!-- TMPL_VAR NAME="member" -->" class="focus" /> Ordered by > <select name="orderby"> > <option value="surname,firstname">Surname</option> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tmpl >index bf5ea1a..5fa4f82 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tmpl >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tmpl >@@ -350,9 +350,9 @@ > <li> > <span class="label"> </span> > <!-- TMPL_IF NAME="guarantorid" --> >- <input id="guarantorsearch" type="button" value="Change" onclick="Dopopguarantor('guarantor_search.pl');" /> >+ <input id="guarantorsearch" type="button" value="Change" onclick="Dopopguarantor('guarantor_search.pl?category_type=<!-- TMPL_VAR NAME="category_type" -->');" /> > <!-- TMPL_ELSE --> >- <input id="guarantorsearch" type="button" value="Set to Patron" onclick="Dopopguarantor('guarantor_search.pl');" /> >+ <input id="guarantorsearch" type="button" value="Set to Patron" onclick="Dopopguarantor('guarantor_search.pl?category_type=<!-- TMPL_VAR NAME="category_type" -->');" /> > <!-- /TMPL_IF --> > <input id="guarantordelete" type="button" value="Delete" /> > </li> >diff --git a/members/guarantor_search.pl b/members/guarantor_search.pl >index d25d71f..cbd958d 100755 >--- a/members/guarantor_search.pl >+++ b/members/guarantor_search.pl >@@ -46,6 +46,7 @@ my $theme = $input->param('theme') || "default"; > > my $member=$input->param('member'); > my $orderby=$input->param('orderby'); >+my $category_type=$input->param('category_type'); > $orderby = "surname,firstname" unless $orderby; > $member =~ s/,//g; #remove any commas from search string > $member =~ s/\*/%/g; >@@ -55,6 +56,11 @@ if ($member eq ''){ > $template->param(results=>1); > } > >+my $search_category = 'A'; >+if ($category_type eq 'P'){ >+ $search_category = 'I'; >+} >+ > my ($count,$results); > my @resultsdata; > my $background = 0; >@@ -62,11 +68,11 @@ my $background = 0; > if ($member ne ''){ > if(length($member) == 1) > { >- ($count,$results)=SearchMember($member,$orderby,"simple",'A'); >+ ($count,$results)=SearchMember($member,$orderby,"simple",$search_category); > } > else > { >- ($count,$results)=SearchMember($member,$orderby,"advanced",'A'); >+ ($count,$results)=SearchMember($member,$orderby,"advanced",$search_category); > } > for (my $i=0; $i < $count; $i++){ > #find out stats >@@ -101,7 +107,7 @@ if ($member ne ''){ > $template->param( > member => $member, > numresults => $count, >- >+ category_type => $category_type, > resultsloop => \@resultsdata ); > > output_html_with_http_headers $input, $cookie, $template->output; >diff --git a/members/memberentry.pl b/members/memberentry.pl >index eacb2ff..c25f7c9 100755 >--- a/members/memberentry.pl >+++ b/members/memberentry.pl >@@ -648,6 +648,7 @@ $template->param( > dateformat => C4::Dates->new()->visual(), > C4::Context->preference('dateformat') => 1, > check_categorytype =>$check_categorytype,#to recover the category type with checkcategorytype function >+ category_type =>$category_type, > modify => $modify, > nok => $nok,#flag to konw if an error > CGIbranch => $CGIbranch, >-- >1.7.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 5003
:
2503
| 2736