Bugzilla – Attachment 5247 Details for
Bug 6750
Guarantor search broken on translated templates
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Proposed patch
0001-Bug-6750-Guarantor-search-broken-on-translated-templ.patch (text/plain), 4.99 KB, created by
Frédéric Demians
on 2011-09-01 08:23:22 UTC
(
hide
)
Description:
Proposed patch
Filename:
MIME Type:
Creator:
Frédéric Demians
Created:
2011-09-01 08:23:22 UTC
Size:
4.99 KB
patch
obsolete
>From f25e7f2a7940e48296562cbf7d00affc4a22e7a9 Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Demians?= <f.demians@tamil.fr> >Date: Thu, 1 Sep 2011 10:09:48 +0200 >Subject: [PATCH] Bug 6750 Guarantor search broken on translated templates > >Fix the JavaScript to avoid implementing complex string substitution into JS >function call. This patch solves the bug and keep the ability to copy >borrower's address, name, etc., containing new line, simple quote, etc. >--- > .../prog/en/modules/members/guarantor_search.tt | 38 ++++++++++++++++--- > 1 files changed, 32 insertions(+), 6 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 ce429bc..bf30f9f 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,19 @@ > </style> > <script type="text/javascript"> > <!-- >- function fillguarantor(id, surname, firstname, streetnumber, address, address2, city, state, zipcode, country, branchcode) { >+ function fillguarantor(id) { >+ var $ = window.$; >+ var surname = $('#' + id + 'surname').text(); >+ var firstname = $('#' + id + 'firstname').text(); >+ var streetnumber = $('#' + id + 'streetnumber').text(); >+ var address = $('#' + id + 'address').text(); >+ var address2 = $('#' + id + 'address2').text(); >+ var city = $('#' + id + 'city').text(); >+ var state = $('#' + id + 'state').text(); >+ var zipcode = $('#' + id + 'zipcode').text(); >+ var country = $('#' + id + 'country').text(); >+ var branchcode = $('#' + id + 'branchcode').text(); >+ > var $ = window.opener.$; > var form = $('#entryform').get(0); > >@@ -71,16 +83,30 @@ > <th>Select?</th> > </tr> > [% FOREACH resultsloo IN resultsloop %] >+ [% import(resultsloo) %] > <tr> >- <td>[% resultsloo.cardnumber %]</td> >+ <td>[% cardnumber %]</td> > <td> >- [% resultsloo.surname %], [% resultsloo.firstname %] >+ [% surname %], [% firstname %] > </td> >- <td>[% resultsloo.dateofbirth %]</td> >- <td><p>[% resultsloo.address %] [% resultsloo.address2 %] [% resultsloo.city %] [% resultsloo.state %] [% resultsloo.zipcode %] [% resultsloo.country %]</p></td> >+ <td>[% dateofbirth %]</td> >+ <td><p>[% address %] [% address2 %] [% city %] [% state %] [% zipcode %] [% country %]</p></td> > <td> >+ <span style="display:none;"> >+ <span id="[% borrowernumber %]surname">[% surname %]</span> >+ <span id="[% borrowernumber %]firstname">[% firstname %]</span> >+ <span id="[% borrowernumber %]streetnumber">[% streetnumber %]</span> >+ <span id="[% borrowernumber %]address">[% address %]</span> >+ <span id="[% borrowernumber %]address2">[% address2 %]</span> >+ <span id="[% borrowernumber %]city">[% city %]</span> >+ <span id="[% borrowernumber %]state">[% state %]</span> >+ <span id="[% borrowernumber %]zipcode">[% zipcode %]</span> >+ <span id="[% borrowernumber %]country">[% country %]</span> >+ <span id="[% borrowernumber %]branchcode">[% branchcode %]</span> >+ </span> >+ > <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') %]','[% resultsloo.branchcode |replace("'", "\'") |replace('"', '\"') |replace('\n', '\\n') |replace('\r', '\\r') %]'); return false;" value="Select"/> >+ <input type="button" onclick="fillguarantor('[% borrowernumber %]'); return false;" value="Select"/> > </form> > </td> > </tr> >-- >1.7.6.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 6750
:
5247
|
5272