Bug 33457: (QA follow-up) Use js-patron-format instead
This patch updates the code to use the $patron_to_html js function rather than replicating it locally.. this means if in the future we introduce further fixes/improvements to the display they're affect here too. Test plan 1) As for the original implementation, confirm the fix is still fixed Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> (cherry picked from commit4732d10809) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com> (cherry picked from commit26c27bd65d) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
parent
b0985ad3a4
commit
fc0105aa50
|
|
@ -646,7 +646,7 @@
|
|||
e.preventDefault();
|
||||
var borrowernumber = $(this).data("borrowernumber");
|
||||
var borrower_data = JSON.parse($("#borrower_data"+borrowernumber).val());
|
||||
add_user( borrowernumber, ( borrower_data.firstname ? borrower_data.firstname : "" ) + ' ' + ( borrower_data.surname ? borrower_data.surname : "" ) );
|
||||
add_user( borrowernumber, $patron_to_html( borrower_data, { display_cardnumber: false, url: false } ) );
|
||||
});
|
||||
|
||||
$("body").on("click",".select_user",function(e){
|
||||
|
|
|
|||
|
|
@ -484,6 +484,7 @@
|
|||
[% MACRO jsinclude BLOCK %]
|
||||
[% Asset.js("js/acq.js") | $raw %]
|
||||
[% IF op == 'add_form' %]
|
||||
[% INCLUDE 'js-patron-format.inc' %]
|
||||
<script>
|
||||
//<![CDATA[
|
||||
|
||||
|
|
@ -505,7 +506,7 @@
|
|||
|
||||
function select_user(borrowernumber, borrower) {
|
||||
ownerRemove();
|
||||
var borrowername = ( borrower.firstname ? borrower.firstname : "" ) + ' ' + ( borrower.surname ? borrower.surname : "" );
|
||||
var borrowername = $patron_to_html( borrower, { display_cardnumber: false, url: false } );
|
||||
if (borrowernumber) {
|
||||
var ownerlink = '<a href="/cgi-bin/koha/members/moremember.pl'
|
||||
+ '?borrowernumber=' + borrowernumber + '">'
|
||||
|
|
|
|||
Loading…
Reference in New Issue