From 047ca33a937962c60278bb85398d83f26aaf3db6 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Thu, 16 Nov 2017 16:08:07 +0000 Subject: [PATCH] Bug 19641: Move patron templates to the footer This patch modifies the staff client patron module templates so that JavaScript is included in the footer instead of the header. This patch touches a lot of files because the changes are all interdependent, affecting a couple of module-wide include files. To test, apply the patch and test the JavaScript-driven features of the modified templates: All button controls, DataTables functionality, tabs, etc. Patrons -> Patrons home, patron search results -> Manage pending modification requests -> Patron detail page -> Edit patron -> Set guarantor -> Fines -> Account, Pay fines, Create manual invoice, Create manual credit -> Print receipts for different kinds of charges -> Routing lists -> Circulation history -> Holds history -> Notices -> Statistics -> Files -> Purchase suggestions -> Discharges -> Housebound -> Set permissions -> Change password -> Print summary, slips, and overdues -> Update child to adult patron type Patron toolbar and patron search bar operations should work correctly on all pages. This patch also updates the template for searching the Norwegian national patron database, but it has NOT been tested. Signed-off-by: Claire Gravely Signed-off-by: Zoe Bennett Signed-off-by: Josef Moravec Signed-off-by: Jonathan Druart --- .../prog/en/includes/borrower_debarments.inc | 28 - .../prog/en/includes/members-toolbar.inc | 128 ---- .../en/includes/messaging-preference-form.inc | 25 +- .../prog/en/includes/patron-search.inc | 44 +- .../prog/en/modules/admin/categories.tt | 1 + .../prog/en/modules/common/patron_search.tt | 331 +++++----- .../prog/en/modules/members/boraccount.tt | 73 +- .../prog/en/modules/members/deletemem.tt | 6 + .../prog/en/modules/members/discharge.tt | 6 + .../prog/en/modules/members/discharges.tt | 6 + .../prog/en/modules/members/files.tt | 33 +- .../prog/en/modules/members/holdshistory.tt | 42 +- .../prog/en/modules/members/housebound.tt | 25 +- .../prog/en/modules/members/mancredit.tt | 21 +- .../prog/en/modules/members/maninvoice.tt | 37 +- .../prog/en/modules/members/member-flags.tt | 212 +++--- .../en/modules/members/member-password.tt | 129 ++-- .../prog/en/modules/members/member.tt | 623 +++++++++--------- .../prog/en/modules/members/memberentrygen.tt | 352 +++++----- .../prog/en/modules/members/members-update.tt | 17 +- .../en/modules/members/moremember-brief.tt | 2 + .../en/modules/members/moremember-print.tt | 7 +- .../en/modules/members/moremember-receipt.tt | 9 +- .../prog/en/modules/members/moremember.tt | 251 +++---- .../prog/en/modules/members/nl-search.tt | 6 + .../prog/en/modules/members/notices.tt | 44 +- .../prog/en/modules/members/pay.tt | 82 +-- .../prog/en/modules/members/paycollect.tt | 124 ++-- .../prog/en/modules/members/printfeercpt.tt | 10 +- .../prog/en/modules/members/printinvoice.tt | 8 +- .../modules/members/purchase-suggestions.tt | 28 +- .../prog/en/modules/members/readingrec.tt | 60 +- .../prog/en/modules/members/routing-lists.tt | 7 + .../prog/en/modules/members/statistics.tt | 25 +- .../prog/en/modules/members/update-child.tt | 85 ++- .../intranet-tmpl/prog/js/members-menu.js | 154 +++++ .../prog/js/messaging-preference-form.js | 20 + .../prog/js/pages/circulation.js | 24 + 38 files changed, 1615 insertions(+), 1470 deletions(-) create mode 100644 koha-tmpl/intranet-tmpl/prog/js/members-menu.js create mode 100644 koha-tmpl/intranet-tmpl/prog/js/messaging-preference-form.js diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/borrower_debarments.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/borrower_debarments.inc index 99fba0f459..e8e22e8c66 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/borrower_debarments.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/borrower_debarments.inc @@ -1,31 +1,3 @@ - -
[% IF ( not debarments.defined || debarments.size < 1 ) %]

Patron is currently unrestricted.

diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/members-toolbar.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/members-toolbar.inc index 231469b122..4269613681 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/members-toolbar.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/members-toolbar.inc @@ -4,134 +4,6 @@ [% USE Branches %] [% USE AuthorisedValues %] [% SET NorwegianPatronDBEnable = Koha.Preference( 'NorwegianPatronDBEnable' ) %] - -
[% IF CAN_user_borrowers_edit_borrowers %] [% IF ( guarantor ) %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/messaging-preference-form.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/messaging-preference-form.inc index 70761a06fb..1f2ac94309 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/messaging-preference-form.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/messaging-preference-form.inc @@ -1,28 +1,5 @@ [% USE Koha %] - @@ -32,7 +9,7 @@ $(document).ready(function(){ [% IF Koha.Preference('SMSSendDriver') %]SMS[% END %] [% IF Koha.Preference('TalkingTechItivaPhoneNotification') %]Phone[% END %] Email - Digests only + Digests only [% UNLESS ( messaging_form_inactive ) %]Do not notify[% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc index 4fbb927dd9..f8c7ec9a60 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc @@ -155,37 +155,15 @@
- + + diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/categories.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/categories.tt index d8c393f28a..4ad11ea9f7 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/categories.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/categories.tt @@ -492,6 +492,7 @@ [% MACRO jsinclude BLOCK %] + [% INCLUDE 'calendar.inc' %] [% INCLUDE 'datatables.inc' %] - + + +[% MACRO jsinclude BLOCK %] + [% INCLUDE 'datatables.inc' %] + + +[% END %] + [% SET popup_window = 1 %] [% INCLUDE 'intranet-bottom.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tt index 38873d0fec..aef11d34b3 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tt @@ -2,42 +2,13 @@ [% USE KohaDates %] [% USE ColumnsSettings %] [% USE Price %] +[% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] Koha › Patrons › Account for [% INCLUDE 'patron-title.inc' no_html = 1 %] [% INCLUDE 'doc-head-close.inc' %] -[% INCLUDE 'datatables.inc' %] -[% INCLUDE 'columns_settings.inc' %] - + [% INCLUDE 'header.inc' %] [% INCLUDE 'patron-search.inc' %] @@ -45,7 +16,6 @@ $(document).ready(function() {
-
@@ -121,7 +91,7 @@ $(document).ready(function() { [% IF ( reverse_col) %] [% IF ( account.payment ) %] Reverse - [% ELSE %] + [% ELSE %][% SET footerjs = 1 %]   [% END %] [% END %] @@ -150,4 +120,41 @@ $(document).ready(function() { [% INCLUDE 'circ-menu.inc' %]
+ +[% MACRO jsinclude BLOCK %] + [% INCLUDE 'datatables.inc' %] + [% INCLUDE 'columns_settings.inc' %] + + +[% END %] + [% INCLUDE 'intranet-bottom.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/deletemem.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/deletemem.tt index 82ba917c06..52ed3156e8 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/deletemem.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/deletemem.tt @@ -1,3 +1,4 @@ +[% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] Koha › Delete patron [% firstname %] [% surname %] [% INCLUDE 'doc-head-close.inc' %] @@ -57,4 +58,9 @@ [% INCLUDE 'circ-menu.inc' %]
+ +[% MACRO jsinclude BLOCK %] + +[% END %] + [% INCLUDE 'intranet-bottom.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/discharge.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/discharge.tt index 8e316cc32f..2ae59c3845 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/discharge.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/discharge.tt @@ -1,6 +1,7 @@ [% USE KohaDates %] [% USE AuthorisedValues %] [% USE Branches %] +[% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] Koha › Patrons › [% UNLESS blocking_error %]Discharge for [% firstname %] [% surname %] ([% cardnumber %])[% END %] [% INCLUDE 'doc-head-close.inc' %] @@ -70,4 +71,9 @@ [% INCLUDE 'circ-menu.inc' %] + +[% MACRO jsinclude BLOCK %] + +[% END %] + [% INCLUDE 'intranet-bottom.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/discharges.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/discharges.tt index 91e9091496..4e44d6a99e 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/discharges.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/discharges.tt @@ -1,4 +1,5 @@ [% USE Branches %] +[% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] Koha › Patrons › Pending discharge requests [% INCLUDE 'doc-head-close.inc' %] @@ -39,4 +40,9 @@ [% END %] + +[% MACRO jsinclude BLOCK %] + +[% END %] + [% INCLUDE 'intranet-bottom.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/files.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/files.tt index 5d3c20f4d7..0d73773da2 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/files.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/files.tt @@ -1,22 +1,11 @@ [% USE KohaDates %] [% USE AuthorisedValues %] +[% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] Files for [% INCLUDE 'patron-title.inc' no_html = 1 %] [% INCLUDE 'doc-head-close.inc' %] - + [% INCLUDE 'header.inc' %] [% INCLUDE 'patron-search.inc' %] @@ -93,4 +82,22 @@ [% INCLUDE 'circ-menu.inc' %] + +[% MACRO jsinclude BLOCK %] + + +[% END %] + [% INCLUDE 'intranet-bottom.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/holdshistory.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/holdshistory.tt index ffee1592cb..b5a0728f87 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/holdshistory.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/holdshistory.tt @@ -3,30 +3,13 @@ [% USE AuthorisedValues %] [% USE Branches %] [% USE ColumnsSettings %] +[% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] Holds history for [% INCLUDE 'patron-title.inc' no_html = 1 %] [% INCLUDE 'doc-head-close.inc' %] -[% INCLUDE 'datatables.inc' %] -[% INCLUDE 'columns_settings.inc' %] - + [% INCLUDE 'header.inc' %] [% INCLUDE 'patron-search.inc' %] @@ -118,4 +101,25 @@ [% INCLUDE 'circ-menu.inc' %] + +[% MACRO jsinclude BLOCK %] + [% INCLUDE 'datatables.inc' %] + [% INCLUDE 'columns_settings.inc' %] + + +[% END %] + [% INCLUDE 'intranet-bottom.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/housebound.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/housebound.tt index 49e965f85f..71235a7524 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/housebound.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/housebound.tt @@ -1,20 +1,12 @@ [% USE Koha %] [% USE KohaDates %] [% USE AuthorisedValues %] +[% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] Koha › Housebound › Details for [% INCLUDE 'patron-title.inc' no_html = 1 %] [% INCLUDE 'doc-head-close.inc' %] -[% INCLUDE 'calendar.inc' %] - + [% INCLUDE 'header.inc' %] [% INCLUDE 'patron-search.inc' %] @@ -430,4 +422,17 @@ [% INCLUDE 'circ-menu.inc' %] + +[% MACRO jsinclude BLOCK %] + [% INCLUDE 'calendar.inc' %] + + +[% END %] + [% INCLUDE 'intranet-bottom.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/mancredit.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/mancredit.tt index 65a61a59ea..21d6c555bf 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/mancredit.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/mancredit.tt @@ -1,16 +1,10 @@ [% USE Koha %] +[% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] Koha › Patrons › Create manual credit [% INCLUDE 'doc-head-close.inc' %] - + [% INCLUDE 'header.inc' %] [% INCLUDE 'patron-search.inc' %] @@ -61,4 +55,15 @@ $(document).ready(function(){ [% INCLUDE 'circ-menu.inc' %] + +[% MACRO jsinclude BLOCK %] + + +[% END %] + [% INCLUDE 'intranet-bottom.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/maninvoice.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/maninvoice.tt index 8fc1f68a59..cbcf2989cc 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/maninvoice.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/maninvoice.tt @@ -1,24 +1,10 @@ [% USE Koha %] +[% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] Koha › Patrons › Create manual invoice [% INCLUDE 'doc-head-close.inc' %] - + [% INCLUDE 'header.inc' %] [% INCLUDE 'patron-search.inc' %] @@ -82,4 +68,23 @@ $(document).ready(function(){ [% INCLUDE 'circ-menu.inc' %] + +[% MACRO jsinclude BLOCK %] + + +[% END %] + [% INCLUDE 'intranet-bottom.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/member-flags.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/member-flags.tt index dc88429623..f63db2293e 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/member-flags.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/member-flags.tt @@ -1,113 +1,12 @@ [% USE Branches %] +[% SET footerjs = 1 %] [% PROCESS 'permissions.inc' %] [% INCLUDE 'doc-head-open.inc' %] Koha › Patrons › Set permissions for [% surname %], [% firstname %] [% INCLUDE 'doc-head-close.inc' %] - - - + [% INCLUDE 'header.inc' %] [% INCLUDE 'patron-search.inc' %] @@ -175,4 +74,111 @@ [% INCLUDE 'circ-menu.inc' %] + +[% MACRO jsinclude BLOCK %] + + + + +[% END %] + [% INCLUDE 'intranet-bottom.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/member-password.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/member-password.tt index a80d89c9ba..aaa11107ca 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/member-password.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/member-password.tt @@ -1,69 +1,11 @@ [% USE Koha %] [% USE Branches %] +[% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] Koha › Patrons › [% IF ( newpassword ) %]Password updated [% ELSE %]Update password for [% surname %], [% firstname %][% END %] [% INCLUDE 'doc-head-close.inc' %] - + [% INCLUDE 'header.inc' %] [% INCLUDE 'patron-search.inc' %] @@ -146,6 +88,69 @@ [% INCLUDE 'circ-menu.inc' %] + +[% MACRO jsinclude BLOCK %] + + + [% PROCESS 'password_check.inc' %] + [% PROCESS 'add_password_check' new_password => 'newpassword' %] +[% END %] + [% INCLUDE 'intranet-bottom.inc' %] -[% PROCESS 'password_check.inc' %] -[% PROCESS 'add_password_check' new_password => 'newpassword' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt index eb84757537..efa97c1b49 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt @@ -2,320 +2,13 @@ [% USE ColumnsSettings %] [% USE Branches %] [% USE Categories %] +[% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] Koha › Patrons [% IF ( searching ) %]› Search results[% END %] [% INCLUDE 'doc-head-close.inc' %] -[% INCLUDE 'datatables.inc' %] -[% INCLUDE 'columns_settings.inc' %] - + [% INCLUDE 'header.inc' %] [% INCLUDE 'patron-search.inc' %] @@ -527,4 +220,316 @@ function filterByFirstLetterSurname(letter) { [% INCLUDE 'members-menu.inc' %] + +[% MACRO jsinclude BLOCK %] + [% INCLUDE 'datatables.inc' %] + [% INCLUDE 'columns_settings.inc' %] + + +[% END %] + [% INCLUDE 'intranet-bottom.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt index bc5e3fe874..d373666892 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt @@ -1,152 +1,12 @@ [% USE Koha %] [% USE KohaDates %] [% USE Branches %] +[% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] Koha › Patrons › [% IF ( opadd ) %]Add[% ELSIF ( opduplicate ) %]Duplicate[% ELSE %] Modify[% END %] patron [% IF (firstname) %][% firstname %] [% END %][% IF (surname) %][% surname %] [% END %]([%IF ( categoryname ) %][% categoryname %][% ELSE %][% IF ( I ) %]Organization[% END %][% IF ( A ) %]Adult[% END %][% IF ( C ) %]Child[% END %][% IF ( P ) %]Professional[% END %][% IF ( S ) %]Staff[% END %][% END %]) [% INCLUDE 'doc-head-close.inc' %] - -[% INCLUDE 'calendar.inc' %] - - + [% INCLUDE 'header.inc' %] [% INCLUDE 'patron-search.inc' %] @@ -1284,47 +1144,193 @@ $(document).ready(function() { - + [% INCLUDE 'calendar.inc' %] + + + [% END %] - - -[% UNLESS ( opadd ) %]
-[% INCLUDE 'members-menu.inc' %] -
[% END %] -[% END %] - [% INCLUDE 'intranet-bottom.inc' %] [% PROCESS 'password_check.inc' %] [% PROCESS 'add_password_check' new_password => 'password' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/members-update.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/members-update.tt index ccc2237fa9..81c883c4b2 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/members-update.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/members-update.tt @@ -2,15 +2,12 @@ [% USE Branches %] [% USE Categories %] [% USE KohaDates %] +[% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] Koha › Patrons › Update patron records [% INCLUDE 'doc-head-close.inc' %] - + [% INCLUDE 'header.inc' %] [% INCLUDE 'patron-search.inc' %] @@ -188,4 +185,14 @@ + +[% MACRO jsinclude BLOCK %] + + +[% END %] + [% INCLUDE 'intranet-bottom.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-brief.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-brief.tt index 9cf356d644..138208c590 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-brief.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-brief.tt @@ -1,5 +1,6 @@ [% USE Koha %] [% USE KohaDates %] +[% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] Koha › Check duplicate patron [% INCLUDE 'doc-head-close.inc' %] @@ -78,4 +79,5 @@ + [% INCLUDE 'popup-bottom.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-print.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-print.tt index 567b18dd3e..35a841056d 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-print.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-print.tt @@ -2,11 +2,12 @@ [% USE Branches %] [% USE KohaDates %] [% USE Price %] +[% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] Summary for [% firstname %] [% surname %] ([% cardnumber %]) [% INCLUDE 'doc-head-close.inc' %] - [% INCLUDE 'slip-print.inc' #printThenClose %] +

Account summary: [% firstname %] [% surname %] ([% cardnumber %])

@@ -124,4 +125,8 @@ [% END %] +[% MACRO jsinclude BLOCK %] + [% INCLUDE 'slip-print.inc' #printThenClose %] +[% END %] + [% INCLUDE 'intranet-bottom.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-receipt.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-receipt.tt index 6f0ce08d03..49d0f55057 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-receipt.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-receipt.tt @@ -1,13 +1,13 @@ [% USE Koha %] +[% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] Print Receipt for [% cardnumber %] [% INCLUDE 'doc-head-close.inc' %] - - -[% INCLUDE 'slip-print.inc' #printThenClose %] + +
@@ -69,5 +69,8 @@ Date due: [% issueloo.date_due %]

[% END %] [% END %] +[% MACRO jsinclude BLOCK %] + [% INCLUDE 'slip-print.inc' #printThenClose %] +[% END %] [% INCLUDE 'intranet-bottom.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt index 5ea5ac37b5..83bcff0408 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt @@ -3,6 +3,7 @@ [% USE KohaDates %] [% USE AuthorisedValues %] [% USE ColumnsSettings %] +[% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] Koha › Patrons › [% UNLESS blocking_error %] @@ -10,131 +11,9 @@ [% END %] [% INCLUDE 'doc-head-close.inc' %] -[% INCLUDE 'calendar.inc' %] -[% INCLUDE 'datatables.inc' %] -[% INCLUDE 'columns_settings.inc' %] -[% INCLUDE 'strings.inc' %] - - -[% INCLUDE 'timepicker.inc' %] - - - - - - + [% INCLUDE 'header.inc' %] [% INCLUDE 'patron-search.inc' %] @@ -661,4 +540,130 @@ function validate1(date) { [% INCLUDE 'circ-menu.inc' %]
+ +[% MACRO jsinclude BLOCK %] + [% INCLUDE 'datatables.inc' %] + [% INCLUDE 'columns_settings.inc' %] + [% INCLUDE 'strings.inc' %] + [% INCLUDE 'calendar.inc' %] + + + [% INCLUDE 'timepicker.inc' %] + + + + + + + +[% END %] + [% INCLUDE 'intranet-bottom.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/nl-search.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/nl-search.tt index ae06764a21..b0b39996ee 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/nl-search.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/nl-search.tt @@ -1,4 +1,5 @@ [% USE KohaDates %] +[% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] Search the Norwegian national patron database [% INCLUDE 'doc-head-close.inc' %] @@ -74,6 +75,11 @@ [% INCLUDE 'circ-menu.inc' %] + +[% MACRO jsinclude BLOCK %] + +[% END %] + [% INCLUDE 'intranet-bottom.inc' %] [% BLOCK patron_detail %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/notices.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/notices.tt index d179d086f9..fecf201ed5 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/notices.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/notices.tt @@ -2,35 +2,17 @@ [% USE AuthorisedValues %] [% USE Branches %] [% USE KohaDates %] +[% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] Sent notices for [% INCLUDE 'patron-title.inc' no_html = 1 %] [% INCLUDE 'doc-head-close.inc' %] -[% INCLUDE 'datatables.inc' %] - + [% INCLUDE 'header.inc' %] [% INCLUDE 'patron-search.inc' %] @@ -105,4 +87,26 @@ [% INCLUDE 'circ-menu.inc' %] + +[% MACRO jsinclude BLOCK %] + + [% INCLUDE 'datatables.inc' %] + +[% END %] + [% INCLUDE 'intranet-bottom.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/pay.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/pay.tt index fb10bcb7cb..ba6b33e489 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/pay.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/pay.tt @@ -2,48 +2,12 @@ [% USE AuthorisedValues %] [% USE Branches %] [% USE Price %] +[% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] Koha › Patrons › Pay Fines for [% borrower.firstname |html %] [% borrower.surname |html %] [% INCLUDE 'doc-head-close.inc' %] - - + [% INCLUDE 'header.inc' %] [% INCLUDE 'patron-search.inc' %] @@ -170,4 +134,46 @@ function enableCheckboxActions(){ [% INCLUDE 'circ-menu.inc' %] + +[% MACRO jsinclude BLOCK %] + + + +[% END %] + [% INCLUDE 'intranet-bottom.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/paycollect.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/paycollect.tt index 76298740ce..e85f517385 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/paycollect.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/paycollect.tt @@ -1,68 +1,11 @@ [% USE Koha %] [% USE Branches %] +[% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] Koha › Patrons › Collect fine payment for [% borrower.firstname %] [% borrower.surname %] [% INCLUDE 'doc-head-close.inc' %] - + [% INCLUDE 'header.inc' %] [% INCLUDE 'patron-search.inc' %] @@ -227,5 +170,66 @@ function moneyFormat(textObj) { [% INCLUDE 'circ-menu.inc' %] -[% INCLUDE 'intranet-bottom.inc' %] +[% MACRO jsinclude BLOCK %] + + +[% END %] + +[% INCLUDE 'intranet-bottom.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/printfeercpt.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/printfeercpt.tt index f83fc3bab3..5027672afb 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/printfeercpt.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/printfeercpt.tt @@ -1,12 +1,13 @@ [% USE Koha %] [% USE KohaDates %] +[% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] -Print Receipt for [% cardnumber %] +Print receipt for [% cardnumber %] [% INCLUDE 'doc-head-close.inc' %] [% INCLUDE 'blocking_errors.inc' %] -[% INCLUDE 'slip-print.inc' #printThenClose %] +
@@ -74,4 +75,9 @@
+ +[% MACRO jsinclude BLOCK %] + [% INCLUDE 'slip-print.inc' #printThenClose %] +[% END %] + [% INCLUDE 'intranet-bottom.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/printinvoice.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/printinvoice.tt index eb6f925355..acb8fd25de 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/printinvoice.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/printinvoice.tt @@ -1,10 +1,11 @@ [% USE Koha %] +[% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] Print receipt for [% cardnumber %] [% INCLUDE 'doc-head-close.inc' %] -[% INCLUDE 'slip-print.inc' #printThenClose %] +
@@ -74,4 +75,9 @@
+ +[% MACRO jsinclude BLOCK %] + [% INCLUDE 'slip-print.inc' #printThenClose %] +[% END %] + [% INCLUDE 'intranet-bottom.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/purchase-suggestions.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/purchase-suggestions.tt index 9ed8cfe307..ace0c15a1c 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/purchase-suggestions.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/purchase-suggestions.tt @@ -1,21 +1,11 @@ [% USE Koha %] [% USE AuthorisedValues %] [% USE Branches %] +[% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] Koha › Patrons › Purchase suggestions for [% INCLUDE 'patron-title.inc' no_html = 1 %] [% INCLUDE 'doc-head-close.inc' %] -[% INCLUDE 'datatables.inc' %] - @@ -108,4 +98,20 @@ [% INCLUDE 'circ-menu.inc' %] + +[% MACRO jsinclude BLOCK %] + + [% INCLUDE 'datatables.inc' %] + +[% END %] + [% INCLUDE 'intranet-bottom.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt index 0a0586534d..8ca27f46e1 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt @@ -2,39 +2,13 @@ [% USE Koha %] [% USE AuthorisedValues %] [% USE Branches %] +[% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] Circulation History for [% INCLUDE 'patron-title.inc' no_html = 1 %] [% INCLUDE 'doc-head-close.inc' %] -[% INCLUDE 'datatables.inc' %] - + [% INCLUDE 'header.inc' %] [% INCLUDE 'patron-search.inc' %] @@ -142,4 +116,34 @@ [% INCLUDE 'circ-menu.inc' %] + +[% MACRO jsinclude BLOCK %] + + [% INCLUDE 'datatables.inc' %] + +[% END %] + [% INCLUDE 'intranet-bottom.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/routing-lists.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/routing-lists.tt index 8fadc2b0d0..9311d9af18 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/routing-lists.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/routing-lists.tt @@ -1,10 +1,12 @@ [% USE Koha %] [% USE AuthorisedValues %] [% USE Branches %] +[% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] Subscription Routing Lists for [% INCLUDE 'patron-title.inc' no_html = 1 %] [% INCLUDE 'doc-head-close.inc' %] + [% INCLUDE 'header.inc' %] [% INCLUDE 'patron-search.inc' %] @@ -80,4 +82,9 @@ [% INCLUDE 'circ-menu.inc' %] + +[% MACRO jsinclude BLOCK %] + +[% END %] + [% INCLUDE 'intranet-bottom.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/statistics.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/statistics.tt index 35d4474802..6519628adb 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/statistics.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/statistics.tt @@ -1,6 +1,7 @@ [% USE Koha %] [% USE AuthorisedValues %] [% USE Branches %] +[% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] Koha › Patrons › [% UNLESS blocking_error %] @@ -9,16 +10,6 @@ [% INCLUDE 'doc-head-close.inc' %] -[% INCLUDE 'datatables.inc' %] -[% INCLUDE 'calendar.inc' %] - @@ -96,4 +87,18 @@ [% INCLUDE 'circ-menu.inc' %] + +[% MACRO jsinclude BLOCK %] + + [% INCLUDE 'datatables.inc' %] + +[% END %] + [% INCLUDE 'intranet-bottom.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/update-child.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/update-child.tt index d89dc2f63b..38e1324a46 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/update-child.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/update-child.tt @@ -1,55 +1,21 @@ +[% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] -Koha › Choose Adult category +Koha › Choose adult category [% INCLUDE 'doc-head-close.inc' %] -[% INCLUDE 'datatables.inc' %] - - + +
-[% IF ( CONFIRM ) %] - -[% END %] - -[% IF ( SUCCESS ) %] - -[% END %] - - - [% IF ( MULTI ) %] -

Choose Adult category

+

Choose adult category

[% IF patron_categories %]
@@ -87,10 +53,41 @@ window.close();
[% END %] [% END %] +
+[% MACRO jsinclude BLOCK %] + + [% INCLUDE 'datatables.inc' %] + + [% IF ( CONFIRM ) %] + + [% END %] + [% IF ( SUCCESS ) %] + + [% END %] +[% END %] - - -
[% INCLUDE 'popup-bottom.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/js/members-menu.js b/koha-tmpl/intranet-tmpl/prog/js/members-menu.js new file mode 100644 index 0000000000..421cc7d076 --- /dev/null +++ b/koha-tmpl/intranet-tmpl/prog/js/members-menu.js @@ -0,0 +1,154 @@ +/* global borrowernumber advsearch dateformat _ CAN_user_borrowers_edit_borrowers NorwegianPatronDBEnable CATCODE_MULTI catcode destination */ + +$(document).ready(function(){ + $("#filteraction_off, #filteraction_on").on('click', function(e) { + e.preventDefault(); + $('#filters').toggle(); + $('.filteraction').toggle(); + }); + if( advsearch ){ + $("#filteraction_on").toggle(); + $("#filters").show(); + } else { + $("#filteraction_off").toggle(); + } + $("#searchfieldstype").change(function() { + var MSG_DATE_FORMAT = ""; + if ( $(this).val() == 'dateofbirth' ) { + if( dateformat == 'us' ){ + MSG_DATE_FORMAT = _("Dates of birth should be entered in the format 'MM/DD/YYYY'"); + } else if( dateformat == 'iso' ){ + MSG_DATE_FORMAT = _("Dates of birth should be entered in the format 'YYYY-MM-DD'"); + } else if( dateformat == 'metric' ){ + MSG_DATE_FORMAT = _("Dates of birth should be entered in the format 'DD/MM/YYYY'"); + } else if( dateformat == 'dmydot' ){ + MSG_DATE_FORMAT = _("Dates of birth should be entered in the format 'DD.MM.YYYY'"); + } + $('#searchmember').attr("title", MSG_DATE_FORMAT).tooltip('show'); + } else { + $('#searchmember').tooltip('destroy'); + } + }); + + if( CAN_user_borrowers_edit_borrowers ){ + if( NorwegianPatronDBEnable == 1 ){ + $("#deletepatronlocal").click(function(){ + confirm_local_deletion(); + $(".btn-group").removeClass("open"); + return false; + }); + $("#deletepatronremote").click(function(){ + confirm_remote_deletion(); + $(".btn-group").removeClass("open"); + return false; + }); + $("#deletepatronboth").click(function(){ + confirm_both_deletion(); + $(".btn-group").removeClass("open"); + return false; + }); + } else { + $("#deletepatron").click(function(){ + window.location='/cgi-bin/koha/members/deletemem.pl?member=' + borrowernumber; + }); + } + $("#renewpatron").click(function(){ + confirm_reregistration(); + $(".btn-group").removeClass("open"); + return false; + }); + $("#updatechild").click(function(){ + update_child(); + $(".btn-group").removeClass("open"); + }); + } + + $("#updatechild, #patronflags, #renewpatron, #deletepatron, #exportbarcodes").tooltip(); + $("#exportcheckins").click(function(){ + export_barcodes(); + $(".btn-group").removeClass("open"); + return false; + }); + $("#printsummary").click(function(){ + printx_window("page"); + $(".btn-group").removeClass("open"); + return false; + }); + $("#printslip").click(function(){ + printx_window("slip"); + $(".btn-group").removeClass("open"); + return false; + }); + $("#printquickslip").click(function(){ + printx_window("qslip"); + $(".btn-group").removeClass("open"); + return false; + }); + $("#print_overdues").click(function(){ + window.open("/cgi-bin/koha/members/print_overdues.pl?borrowernumber=" + borrowernumber, "printwindow"); + $(".btn-group").removeClass("open"); + return false; + }); + $("#searchtohold").click(function(){ + searchToHold(); + return false; + }); + $("#select_patron_messages").on("change",function(){ + $("#borrower_message").val( $(this).val() ); + }); +}); +function confirm_local_deletion() { + var is_confirmed = window.confirm(_("Are you sure you want to delete this patron from the local database? This cannot be undone.")); + if (is_confirmed) { + window.location='/cgi-bin/koha/members/deletemem.pl?member=' + borrowernumber + '&deletelocal=true&deleteremote=false'; + } +} +function confirm_remote_deletion() { + var is_confirmed = window.confirm(_("Are you sure you want to delete this patron from the Norwegian national patron database? This cannot be undone.")); + if (is_confirmed) { + window.location='/cgi-bin/koha/members/deletemem.pl?member=' + borrowernumber + '&deletelocal=false&deleteremote=true'; + } +} +function confirm_both_deletion() { + var is_confirmed = window.confirm(_("Are you sure you want to delete this patron both from the local database and from the Norwegian national patron database? This cannot be undone.")); + if (is_confirmed) { + window.location='/cgi-bin/koha/members/deletemem.pl?member=' + borrowernumber + '&deletelocal=true&deleteremote=true'; + } +} + +function confirm_updatechild() { + var is_confirmed = window.confirm(_("Are you sure you want to update this child to an Adult category? This cannot be undone.")); + if (is_confirmed) { + window.location='/cgi-bin/koha/members/update-child.pl?op=update&borrowernumber=' + borrowernumber + '&catcode=' + catcode + '&catcode_multi=' + CATCODE_MULTI; + } +} + +function update_child() { + if( CATCODE_MULTI ){ + window.open('/cgi-bin/koha/members/update-child.pl?op=multi&borrowernumber=' + borrowernumber,'UpdateChild','width=400,height=300,toolbar=no,scrollbars=yes,resizable=yes'); + } else { + confirm_updatechild(); + } +} + +function confirm_reregistration() { + var is_confirmed = window.confirm(_("Are you sure you want to renew this patron's registration?")); + if (is_confirmed) { + window.location = '/cgi-bin/koha/members/setstatus.pl?borrowernumber=' + borrowernumber + '&destination=' + destination + '&reregistration=y'; + } +} +function export_barcodes() { + window.open('/cgi-bin/koha/members/readingrec.pl?borrowernumber=' + borrowernumber + '&op=export_barcodes'); +} +var slip_re = /slip/; +function printx_window(print_type) { + var handler = print_type.match(slip_re) ? "printslip" : "summary-print"; + window.open("/cgi-bin/koha/members/" + handler + ".pl?borrowernumber=" + borrowernumber + "&print=" + print_type, "printwindow"); + return false; +} +function searchToHold(){ + var date = new Date(); + date.setTime(date.getTime() + (10 * 60 * 1000)); + $.cookie("holdfor", borrowernumber, { path: "/", expires: date }); + location.href="/cgi-bin/koha/catalogue/search.pl"; +} diff --git a/koha-tmpl/intranet-tmpl/prog/js/messaging-preference-form.js b/koha-tmpl/intranet-tmpl/prog/js/messaging-preference-form.js new file mode 100644 index 0000000000..67a580b888 --- /dev/null +++ b/koha-tmpl/intranet-tmpl/prog/js/messaging-preference-form.js @@ -0,0 +1,20 @@ +$(document).ready(function(){ + $(".none").click(function(){ + if($(this).prop("checked")){ + var rowid = $(this).attr("id"); + var newid = Number(rowid.replace("none","")); + $("#sms"+newid).prop("checked", false); + $("#email"+newid).prop("checked", false); + $("#phone"+newid).prop("checked", false); + $("#digest"+newid).prop("checked", false); + $("#rss"+newid).prop("checked", false); + } + }); + $(".active_notify").on("change",function(){ + var attr_id = $(this).data("attr-id"); + if( $(this).prop("checked") ){ + $("#none" + attr_id ).prop("checked", false); + } + }); + $("#info_digests").tooltip(); +}); diff --git a/koha-tmpl/intranet-tmpl/prog/js/pages/circulation.js b/koha-tmpl/intranet-tmpl/prog/js/pages/circulation.js index aeeaf8bb80..cd2ca9bc4f 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/pages/circulation.js +++ b/koha-tmpl/intranet-tmpl/prog/js/pages/circulation.js @@ -85,6 +85,30 @@ $(document).ready(function() { $("#itemSearchFallback").modal("show"); }); + // Debarments + $("div#reldebarments .remove_restriction").on("click",function(){ + return confirm(_("Remove restriction?")); + }); + var mrform = $("#manual_restriction_form"); + var mrlink = $("#add_manual_restriction"); + mrform.hide(); + mrlink.on("click",function(e){ + $(this).hide(); + mrform.show(); + e.preventDefault(); + }); + $("#cancel_manual_restriction").on("click",function(e){ + mrlink.show(); + mrform.hide(); + e.preventDefault(); + }); + $(".clear-date").on("click",function(e){ + e.preventDefault(); + var fieldID = this.id.replace("clear-date-",""); + $("#" + fieldID).val(""); + }); + + }); function export_checkouts(format) { -- 2.39.5