Lines 612-618
Link Here
|
612 |
[% FOR action IN actions %] |
612 |
[% FOR action IN actions %] |
613 |
[% SWITCH action %] |
613 |
[% SWITCH action %] |
614 |
[% CASE 'select' %] |
614 |
[% CASE 'select' %] |
615 |
action_node += '<a href="#" class="btn btn-default btn-xs select_user" data-borrowernumber="' + patron_id + '">Select</a><input type="hidden" id="borrower_data' + patron_id + '" name="borrower_data'+ patron_id + '" value=\''+JSON.stringify(row)+'\' />'; |
615 |
let patron_str = JSON.stringify(row); |
|
|
616 |
action_node += '<a href="#" class="btn btn-default btn-xs select_user" data-borrowernumber="' + patron_id + '">Select</a>'; |
617 |
let input_node = $('<input type="hidden" id="borrower_data' + patron_id + '" name="borrower_data'+ patron_id + '"/>'); |
618 |
$(input_node).val(patron_str); |
619 |
action_node += $(input_node).prop('outerHTML'); |
616 |
[% CASE 'add' %] |
620 |
[% CASE 'add' %] |
617 |
action_node += '<a href="#" class="btn btn-default btn-xs add_user" data-borrowernumber="' + patron_id + '" data-firstname="' + encodeURIComponent(row.firstname) + '" data-surname="' + encodeURIComponent(row.surname) + '">Add</a><input type="hidden" id="borrower_data' + patron_id + '" name="borrower_data'+ patron_id + '" />'; |
621 |
action_node += '<a href="#" class="btn btn-default btn-xs add_user" data-borrowernumber="' + patron_id + '" data-firstname="' + encodeURIComponent(row.firstname) + '" data-surname="' + encodeURIComponent(row.surname) + '">Add</a><input type="hidden" id="borrower_data' + patron_id + '" name="borrower_data'+ patron_id + '" />'; |
618 |
[% CASE 'edit' %] |
622 |
[% CASE 'edit' %] |
619 |
- |
|
|