Owen Leonard
672277197d
This patch removes the use of "onclick" from several patron card creator templates. Events are defined instead in JavaScript. Also changed: - Patron search pop-up window is now slightly larger because I found it never quite large enough to prevent horizontal scrolling. - Replaced "Borrower" with "Patron" in a couple of places. - "Add" link in patron search pop-up is now styled as a Bootstrap button. - Removed Bootstrap styles from some submit buttons. - Some Font Awesome icons were made using the invalid element <icon></icon> instead of <i></i>. These are corrected. - Fixed some other HTML validation errors. To test, apply the patch and go to Tools -> Patron card creator. - Choose New -> Card batch. - Click "Add patrons" and perform a search for patrons in the pop-up window. - Click the "Add" button. The corresponding borrowernumber should be added to the textarea in the parent window, and a message should appear at the top of the pop-up window confirming that the patron has been added. (Note: This patch fixes a version of Bug 13041 which prevented the "add" button from working on patrons whose name include an apostrophe). - In the parent page, in the list of patrons you added to the batch, confirm that clicking the "Delete" link triggers a confirmation dialog. Test both confirming and canceling. - Confirm that clicking the "Export" button next to an individual patron triggers a modal window. - In the export window, confirm that the "Cancel" link works to close the modal. - Click the "Export" button again and then the "Export" button in the modal. - Test that the "Done" button works to close the modal. - Choose Manage -> Card batches. - Test the "Delete" and "Export" buttons as described above. Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> All works, no errors. Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
26 lines
1.4 KiB
Text
26 lines
1.4 KiB
Text
[% USE To %]
|
|
{
|
|
"sEcho": [% sEcho %],
|
|
"iTotalRecords": [% iTotalRecords %],
|
|
"iTotalDisplayRecords": [% iTotalDisplayRecords %],
|
|
"aaData": [
|
|
[% FOREACH data IN aaData %]
|
|
{
|
|
"dt_cardnumber":
|
|
"[% data.cardnumber %]",
|
|
"dt_name":
|
|
"<span style='white-space:nowrap'><a href='/cgi-bin/koha/members/moremember.pl?borrowernumber=[% data.borrowernumber %]'>[% INCLUDE 'patron-title.inc' borrowernumber = data.borrowernumber category_type = data.category_type firstname = To.json(data.firstname) surname = To.json(data.surname) othernames = To.json(data.othernames) cardnumber = data.cardnumber invert_name = 1%]</a></span>",
|
|
"dt_category":
|
|
"[% data.category_description |html %] ([% data.category_type |html %])",
|
|
"dt_branch":
|
|
"[% data.branchname |html %]",
|
|
"dt_dateexpiry":
|
|
"[% data.dateexpiry %]",
|
|
"dt_borrowernotes":
|
|
"[% data.borrowernotes.replace('\\\\' , '\\\\') |html |html_line_break |collapse %]",
|
|
"dt_action":
|
|
"<a href=\"#\" data-borrowernumber=\"[% data.borrowernumber %]\" data-firstname=\"[% data.firstname %]\" data-surname=\"[% data.surname %]\" class=\"btn btn-mini add_user\"><i class=\"fa fa-plus\"></i> Add</a>"
|
|
}[% UNLESS loop.last %],[% END %]
|
|
[% END %]
|
|
]
|
|
}
|