@@ -, +, @@ patron card creator templates - 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 instead of . These are corrected. - Fixed some other HTML validation errors. - 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. --- .../prog/en/modules/common/patron_search.tt | 13 +++++++--- .../prog/en/modules/patroncards/edit-batch.tt | 28 ++++++++++++++-------- .../prog/en/modules/patroncards/image-manage.tt | 2 +- .../prog/en/modules/patroncards/manage.tt | 19 ++++++++++----- .../prog/en/modules/patroncards/print.tt | 12 +++++++--- .../modules/patroncards/tables/members_results.tt | 2 +- 6 files changed, 52 insertions(+), 24 deletions(-) --- a/koha-tmpl/intranet-tmpl/prog/en/modules/common/patron_search.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/common/patron_search.tt @@ -100,6 +100,13 @@ $(document).ready(function(){ e.preventDefault(); filterByFirstLetterSurname($(this).text()); }); + $("body").on("click",".add_user",function(e){ + e.preventDefault(); + var borrowernumber = $(this).data("borrowernumber"); + var firstname = $(this).data("firstname"); + var surname = $(this).data("surname"); + add_user( borrowernumber, firstname + " " + surname ); + }); }); function filter() { @@ -133,10 +140,10 @@ function filterByFirstLetterSurname(letter) { $("#info").hide(); $("#error").hide(); if ( p.add_user(borrowernumber, borrowername) < 0 ) { - $("#error").html(_("Borrower '%s' is already in the list.").format(borrowername)); + $("#error").html(_("Patron '%s' is already in the list.").format(borrowername)); $("#error").show(); } else { - $("#info").html(_("Borrower '%s' added.").format(borrowername)); + $("#info").html(_("Patron '%s' added.").format(borrowername)); $("#info").show(); } } @@ -189,7 +196,7 @@ function filterByFirstLetterSurname(letter) {
- +
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/edit-batch.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/edit-batch.tt @@ -6,7 +6,6 @@ [% INCLUDE 'datatables.inc' %] @@ -201,12 +209,12 @@
- Add patron(s)[% IF ( table_loop ) %] - Remove selected patrons - Delete batch - Remove duplicates - Export selected card(s) - Export card batch[% END %] + Add patron(s)[% IF ( table_loop ) %] + Remove selected patrons + Delete batch + Remove duplicates + Export selected card(s) + Export card batch[% END %]
[% IF ( table_loop ) %]
@@ -238,8 +246,8 @@ [% FOREACH text_field IN table_loo.text_fields %] [% IF ( text_field.select_field ) %] - Delete - Export + Delete + Export [% ELSE %] --- a/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/image-manage.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/image-manage.tt @@ -135,7 +135,7 @@ [% FOREACH text_field IN TABL.text_fields %] [% IF ( text_field.select_field ) %] - Delete + Delete [% ELSIF ( text_field.field_value ) %] --- a/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/manage.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/manage.tt @@ -26,7 +26,6 @@ [% INCLUDE 'greybox.inc' %] @@ -200,11 +207,11 @@ [% FOREACH text_field IN table_loo.text_fields %] [% IF ( text_field.select_field ) %] - Edit - [% IF ( print ) %] Export[% END %] - Delete + Edit + [% IF ( print ) %] Export[% END %] + Delete - [% IF ( print ) %][% END %] + [% IF ( print ) %][% END %] [% ELSIF ( text_field.field_value ) %] [% text_field.field_value %] [% ELSE %] @@ -216,7 +223,7 @@ [% END %]
- [% IF ( print ) %][% END %] + [% IF ( print ) %][% END %]
[% IF patron_lists %]
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/print.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/print.tt @@ -6,6 +6,11 @@ function Done() { window.location = "[% referer %]"; }; + $(document).ready(function(){ + $(".gb-close").on("click",function(){ + parent.parent.GB_hide(); + }); + }) //]]> @@ -38,7 +43,7 @@
- +
[% ELSIF ( patronlist_id && template_id && layout_id ) %] @@ -95,10 +100,11 @@
- - Cancel + + Cancel
[% END %] + [% INCLUDE 'popup-bottom.inc' %] --- a/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/tables/members_results.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/tables/members_results.tt @@ -19,7 +19,7 @@ "dt_borrowernotes": "[% data.borrowernotes.replace('\\\\' , '\\\\') |html |html_line_break |collapse %]", "dt_action": - "Add" + " Add" }[% UNLESS loop.last %],[% END %] [% END %] ] --