-<script type="text/javascript">
- //<![CDATA[
- $(document).ready(function(e){
- $("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("");
- });
- })
- //]]>
-</script>
-
<div id="reldebarments">
[% IF ( not debarments.defined || debarments.size < 1 ) %]
<p>Patron is currently unrestricted.</p>
[% USE Branches %]
[% USE AuthorisedValues %]
[% SET NorwegianPatronDBEnable = Koha.Preference( 'NorwegianPatronDBEnable' ) %]
-<script type="text/javascript">
-//<![CDATA[
-$(document).ready(function(){
- [% 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 | url%]';
- });
- [% END %]
- $("#renewpatron").click(function(){
- confirm_reregistration();
- $(".btn-group").removeClass("open");
- return false;
- });
- [% IF ( is_child ) %]$("#updatechild").click(function(){
- update_child();
- $(".btn-group").removeClass("open");
- });[% END %]
- [% END %]
- $("#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';
- }
-}
-
-[% IF ( is_child ) %]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();
- [% END %]
-}
-[% END %]
-
-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";
-}
-//]]>
-</script>
-
<div id="toolbar" class="btn-toolbar">
[% IF CAN_user_borrowers_edit_borrowers %]
[% IF ( guarantor ) %]
[% USE Koha %]
<!-- snippet for form to set borrower and patron category messaging preferences -->
-<script type="text/javascript">//<![CDATA[
-$(document).ready(function(){
- $(".none").click(function(){
- if($(this).prop("checked")){
- var rowid = $(this).attr("id");
- 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();
-});
-//]]>
-</script>
<input type="hidden" name="modify" value="yes" />
<input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
[% IF Koha.Preference('SMSSendDriver') %]<th>SMS</th>[% END %]
[% IF Koha.Preference('TalkingTechItivaPhoneNotification') %]<th>Phone</th>[% END %]
<th>Email</th>
- <th>Digests only <i id="info_digests" data-toggle="tooltip" title="You can ask for a digest to reduce the number of messages. Messages will be saved and sent as a single message." data-placement="right" class="icon fa fa-info-sign"></i></th>
+ <th>Digests only <i id="info_digests" data-toggle="tooltip" title="You can ask for a digest to reduce the number of messages. Messages will be saved and sent as a single message." data-placement="right" class="fa fa-info-circle"></i></th>
<!-- <th>RSS</th> -->
[% UNLESS ( messaging_form_inactive ) %]<th>Do not notify</th>[% END %]
</tr>
</ul>
</div><!-- /header_search -->
</div><!-- /gradient -->
-<script type="text/javascript">//<![CDATA[
-$(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();
- [% END %]
- [% SET dateformat = Koha.Preference('dateformat') %]
- $("#searchfieldstype").change(function() {
- if ( $(this).val() == 'dateofbirth' ) {
- [% IF dateformat == 'us' %]
- var MSG_DATE_FORMAT = _("Dates of birth should be entered in the format 'MM/DD/YYYY'");
- [% ELSIF dateformat == 'iso' %]
- var MSG_DATE_FORMAT = _("Dates of birth should be entered in the format 'YYYY-MM-DD'");
- [% ELSIF dateformat == 'metric' %]
- var MSG_DATE_FORMAT = _("Dates of birth should be entered in the format 'DD/MM/YYYY'");
- [% ELSIF dateformat == 'dmydot' %]
- var MSG_DATE_FORMAT = _("Dates of birth should be entered in the format 'DD.MM.YYYY'");
- [% END %]
- $('#searchmember').attr("title",MSG_DATE_FORMAT).tooltip('show');
- } else {
- $('#searchmember').tooltip('destroy');
- }
- });
-});
-//]]>
-</script>
<!-- End Patrons Resident Search Box -->
+
+<script type="text/javascript">
+ var advsearch = "[% advsearch %]";
+ var destination = "[% destination %]";
+ var catcode = "[% catcode %]";
+ var dateformat = "[% Koha.Preference('dateformat') %]";
+ var CAN_user_borrowers_edit_borrowers = "[% CAN_user_borrowers_edit_borrowers %]";
+ var NorwegianPatronDBEnable = "[% NorwegianPatronDBEnable %]";
+ var CATCODE_MULTI = "[% CATCODE_MULTI %]";
+ var borrowernumber = "[% borrowernumber %]";
+</script>
[% MACRO jsinclude BLOCK %]
<script type="text/javascript" src="[% interface %]/[% theme %]/js/admin-menu_[% KOHA_VERSION %].js"></script>
+ <script type="text/javascript" src="[% interface %]/[% theme %]/js/messaging-preference-form_[% KOHA_VERSION %].js"></script>
[% INCLUDE 'calendar.inc' %]
[% INCLUDE 'datatables.inc' %]
<script type="text/javascript">
[% USE Koha %]
[% USE Branches %]
+[% SET footerjs = 1 %]
[% INCLUDE 'doc-head-open.inc' %]
<title>Koha › Patron search</title>
[% INCLUDE 'doc-head-close.inc' %]
<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
-[% INCLUDE 'datatables.inc' %]
-
-<script type="text/javascript">
-//<![CDATA[
-
-var search = 1;
-$(document).ready(function(){
- $("#info").hide();
- $("#error").hide();
-
- [% IF view != "show_results" %]
- $("#searchresults").hide();
- search = 0;
- [% END %]
-
- // Apply DataTables on the results table
- dtMemberResults = $("#memberresultst").dataTable($.extend(true, {}, dataTablesDefaults, {
- 'bServerSide': true,
- 'sAjaxSource': "/cgi-bin/koha/svc/members/search",
- 'fnServerData': function(sSource, aoData, fnCallback) {
- if ( ! search ) {
- return;
- }
- aoData.push({
- 'name': 'searchmember',
- 'value': $("#searchmember_filter").val()
- },{
- 'name': 'firstletter',
- 'value': $("#firstletter_filter").val()
- },{
- 'name': 'categorycode',
- 'value': $("#categorycode_filter").val()
- },{
- 'name': 'branchcode',
- 'value': $("#branchcode_filter").val()
- },{
- 'name': 'name_sorton',
- 'value': 'borrowers.surname borrowers.firstname'
- },{
- 'name': 'category_sorton',
- 'value': 'categories.description',
- },{
- 'name': 'branch_sorton',
- 'value': 'branches.branchname'
- },{
- 'name': 'template_path',
- 'value': '[% json_template %]',
- },{
- 'name': 'selection_type',
- 'value': '[% selection_type %]',
- }
- [% IF patrons_with_acq_perm_only %]
- ,{
- 'name': 'has_permission',
- 'value': 'acquisition.order_manage',
- }
- [% END %]
- );
- $.ajax({
- 'dataType': 'json',
- 'type': 'POST',
- 'url': sSource,
- 'data': aoData,
- 'success': function(json){
- fnCallback(json);
- }
- });
- },
- 'aoColumns':[
- [% FOR column IN columns %]
- [% IF column == 'action' %]
- { 'mDataProp': 'dt_action', 'bSortable': false, 'sClass': 'actions' }
- [% ELSIF column == 'address' %]
- { 'mDataProp': 'dt_address', 'bSortable': false }
- [% ELSE %]
- { 'mDataProp': 'dt_[% column %]' }
- [% END %]
- [% UNLESS loop.last %],[% END %]
- [% END %]
- ],
- 'bAutoWidth': false,
- [% IF patrons_with_acq_perm_only %]
- 'bPaginate': false,
- [% ELSE %]
- 'sPaginationType': 'full_numbers',
- "iDisplayLength": [% Koha.Preference('PatronsPerPage') %],
- [% END %]
- 'aaSorting': [[[% aaSorting || 0 %], 'asc']],
- 'bFilter': false,
- 'bProcessing': true,
- }));
-
- $("#searchform").on('submit', filter);
- $(".filterByLetter").on("click",function(e){
- 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 );
- });
-
- $("body").on("click",".select_user",function(e){
- e.preventDefault();
- var borrowernumber = $(this).data("borrowernumber");
- var borrower_data = $("#borrower_data"+borrowernumber).val();
- select_user( borrowernumber, JSON.parse(borrower_data) );
- });
-
-});
-
-function filter() {
- search = 1;
- $("#firstletter_filter").val('');
- $("#searchresults").show();
- dtMemberResults.fnDraw();
- return false;
-}
-
-// User has clicked on a letter
-function filterByFirstLetterSurname(letter) {
- $("#firstletter_filter").val(letter);
- search = 1;
- $("#searchresults").show();
- dtMemberResults.fnDraw();
-}
-
-
- // modify parent window owner element
- [% IF selection_type == 'add' %]
- function add_user(borrowernumber, borrowername) {
- var p = window.opener;
- // In one place (serials/routing.tt), the page is reload on every add
- // We have to wait for the page to be there
- function wait_for_opener () {
- if ( ! $(opener.document).find('body').size() ) {
- setTimeout(wait_for_opener, 500);
- } else {
- [%# Note that add_user could sent data instead of borrowername too %]
- $("#info").hide();
- $("#error").hide();
- if ( p.add_user(borrowernumber, borrowername) < 0 ) {
- $("#error").html(_("Patron '%s' is already in the list.").format(borrowername));
- $("#error").show();
- } else {
- $("#info").html(_("Patron '%s' added.").format(borrowername));
- $("#info").show();
- }
- }
- }
- wait_for_opener();
- }
- [% ELSIF selection_type == 'select' %]
- function select_user(borrowernumber, data) {
- var p = window.opener;
- p.select_user(borrowernumber, data);
- window.close();
- }
- [% END %]
-//]]>
-</script>
-
</head>
+
<body id="common_patron_search" class="common">
<div id="patron_search" class="yui-t7">
<div id="bd">
<div id="closewindow"><a href="#" class="btn btn-default btn-default close">Close</a></div>
</div>
</div>
+
+[% MACRO jsinclude BLOCK %]
+ [% INCLUDE 'datatables.inc' %]
+
+ <script type="text/javascript">
+ var search = 1;
+ $(document).ready(function(){
+ $("#info").hide();
+ $("#error").hide();
+
+ [% IF view != "show_results" %]
+ $("#searchresults").hide();
+ search = 0;
+ [% END %]
+
+ // Apply DataTables on the results table
+ dtMemberResults = $("#memberresultst").dataTable($.extend(true, {}, dataTablesDefaults, {
+ 'bServerSide': true,
+ 'sAjaxSource': "/cgi-bin/koha/svc/members/search",
+ 'fnServerData': function(sSource, aoData, fnCallback) {
+ if ( ! search ) {
+ return;
+ }
+ aoData.push({
+ 'name': 'searchmember',
+ 'value': $("#searchmember_filter").val()
+ },{
+ 'name': 'firstletter',
+ 'value': $("#firstletter_filter").val()
+ },{
+ 'name': 'categorycode',
+ 'value': $("#categorycode_filter").val()
+ },{
+ 'name': 'branchcode',
+ 'value': $("#branchcode_filter").val()
+ },{
+ 'name': 'name_sorton',
+ 'value': 'borrowers.surname borrowers.firstname'
+ },{
+ 'name': 'category_sorton',
+ 'value': 'categories.description',
+ },{
+ 'name': 'branch_sorton',
+ 'value': 'branches.branchname'
+ },{
+ 'name': 'template_path',
+ 'value': '[% json_template %]',
+ },{
+ 'name': 'selection_type',
+ 'value': '[% selection_type %]',
+ }
+ [% IF patrons_with_acq_perm_only %]
+ ,{
+ 'name': 'has_permission',
+ 'value': 'acquisition.order_manage',
+ }
+ [% END %]
+ );
+ $.ajax({
+ 'dataType': 'json',
+ 'type': 'POST',
+ 'url': sSource,
+ 'data': aoData,
+ 'success': function(json){
+ fnCallback(json);
+ }
+ });
+ },
+ 'aoColumns':[
+ [% FOR column IN columns %]
+ [% IF column == 'action' %]
+ { 'mDataProp': 'dt_action', 'bSortable': false, 'sClass': 'actions' }
+ [% ELSIF column == 'address' %]
+ { 'mDataProp': 'dt_address', 'bSortable': false }
+ [% ELSE %]
+ { 'mDataProp': 'dt_[% column %]' }
+ [% END %]
+ [% UNLESS loop.last %],[% END %]
+ [% END %]
+ ],
+ 'bAutoWidth': false,
+ [% IF patrons_with_acq_perm_only %]
+ 'bPaginate': false,
+ [% ELSE %]
+ 'sPaginationType': 'full_numbers',
+ "iDisplayLength": [% Koha.Preference('PatronsPerPage') %],
+ [% END %]
+ 'aaSorting': [[[% aaSorting || 0 %], 'asc']],
+ 'bFilter': false,
+ 'bProcessing': true,
+ }));
+
+ $("#searchform").on('submit', filter);
+ $(".filterByLetter").on("click",function(e){
+ 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 );
+ });
+
+ $("body").on("click",".select_user",function(e){
+ e.preventDefault();
+ var borrowernumber = $(this).data("borrowernumber");
+ var borrower_data = $("#borrower_data"+borrowernumber).val();
+ select_user( borrowernumber, JSON.parse(borrower_data) );
+ });
+
+ });
+
+ function filter() {
+ search = 1;
+ $("#firstletter_filter").val('');
+ $("#searchresults").show();
+ dtMemberResults.fnDraw();
+ return false;
+ }
+
+ // User has clicked on a letter
+ function filterByFirstLetterSurname(letter) {
+ $("#firstletter_filter").val(letter);
+ search = 1;
+ $("#searchresults").show();
+ dtMemberResults.fnDraw();
+ }
+
+ // modify parent window owner element
+ [% IF selection_type == 'add' %]
+ function add_user(borrowernumber, borrowername) {
+ var p = window.opener;
+ // In one place (serials/routing.tt), the page is reload on every add
+ // We have to wait for the page to be there
+ function wait_for_opener () {
+ if ( ! $(opener.document).find('body').size() ) {
+ setTimeout(wait_for_opener, 500);
+ } else {
+ [%# Note that add_user could sent data instead of borrowername too %]
+ $("#info").hide();
+ $("#error").hide();
+ if ( p.add_user(borrowernumber, borrowername) < 0 ) {
+ $("#error").html(_("Patron '%s' is already in the list.").format(borrowername));
+ $("#error").show();
+ } else {
+ $("#info").html(_("Patron '%s' added.").format(borrowername));
+ $("#info").show();
+ }
+ }
+ }
+ wait_for_opener();
+ }
+ [% ELSIF selection_type == 'select' %]
+ function select_user(borrowernumber, data) {
+ var p = window.opener;
+ p.select_user(borrowernumber, data);
+ window.close();
+ }
+ [% END %]
+ </script>
+[% END %]
+
[% SET popup_window = 1 %]
[% INCLUDE 'intranet-bottom.inc' %]
[% USE KohaDates %]
[% USE ColumnsSettings %]
[% USE Price %]
+[% SET footerjs = 1 %]
[% INCLUDE 'doc-head-open.inc' %]
<title>Koha › Patrons › Account for [% INCLUDE 'patron-title.inc' no_html = 1 %]</title>
[% INCLUDE 'doc-head-close.inc' %]
<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
-[% INCLUDE 'datatables.inc' %]
-[% INCLUDE 'columns_settings.inc' %]
-<script type="text/javascript">
-$(document).ready(function() {
- var txtActivefilter = _("Filter paid transactions");
- var txtInactivefilter = _("Show all transactions");
- var columns_settings = [% ColumnsSettings.GetColumns('members', 'fines', 'account-fines', 'json') %];
- var table_account_fines = KohaTable("#table_account_fines", {
- "sPaginationType": "four_button",
- 'aaSorting': [[0, 'desc']],
- "sDom": 'C<"top pager"ilpfB><"#filter_c">tr<"bottom pager"ip>',
- "aoColumnDefs": [
- { "sType": "title-string", "aTargets" : [ "title-string" ] },
- { "bSortable": false, "bSearchable": false, "aTargets": [-1] }
- ]
- }, columns_settings);
- $("#filter_c").html('<p><a href="#" id="filter_transacs"><i class="fa fa-filter"></i> '+txtActivefilter+'</a>');
- $('#filter_transacs').click(function(e) {
- e.preventDefault();
- if ($(this).hasClass('filtered')) {
- var filteredValue = '';
- $(this).html('<i class="fa fa-filter"></i> '+txtActivefilter);
- } else { //Not filtered. Let's do it!
- var filteredValue = '^((?!0.00).*)$'; //Filter not matching 0.00 http://stackoverflow.com/a/406408
- $(this).html('<i class="fa fa-filter"></i> '+txtInactivefilter);
- }
- table_account_fines.fnFilter(filteredValue, 4, true, false);
- $(this).toggleClass('filtered');
- });
-});
-</script>
</head>
+
<body id="pat_borraccount" class="pat">
[% INCLUDE 'header.inc' %]
[% INCLUDE 'patron-search.inc' %]
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/members/members-home.pl">Patrons</a> › Account for [% INCLUDE 'patron-title.inc' %]</div>
<div id="doc3" class="yui-t2">
-
<div id="bd">
<div id="yui-main">
<div class="yui-b">
[% IF ( reverse_col) %]
[% IF ( account.payment ) %]
<a href="boraccount.pl?action=reverse&accountlines_id=[% account.accountlines_id %]&borrowernumber=[% account.borrowernumber %]" class="btn btn-default btn-xs"><i class="fa fa-undo"></i> Reverse</a>
- [% ELSE %]
+ [% ELSE %][% SET footerjs = 1 %]
[% END %]
[% END %]
[% INCLUDE 'circ-menu.inc' %]
</div>
</div>
+
+[% MACRO jsinclude BLOCK %]
+ [% INCLUDE 'datatables.inc' %]
+ [% INCLUDE 'columns_settings.inc' %]
+ <script type="text/javascript" src="[% interface %]/[% theme %]/js/members-menu_[% KOHA_VERSION %].js"></script>
+ <script type="text/javascript">
+ var dateformat = "[% Koha.Preference('dateformat') %]";
+ $(document).ready(function() {
+ var txtActivefilter = _("Filter paid transactions");
+ var txtInactivefilter = _("Show all transactions");
+ var columns_settings = [% ColumnsSettings.GetColumns('members', 'fines', 'account-fines', 'json') %];
+ var table_account_fines = KohaTable("#table_account_fines", {
+ "sPaginationType": "four_button",
+ 'aaSorting': [[0, 'desc']],
+ "sDom": 'C<"top pager"ilpfB><"#filter_c">tr<"bottom pager"ip>',
+ "aoColumnDefs": [
+ { "sType": "title-string", "aTargets" : [ "title-string" ] },
+ { "bSortable": false, "bSearchable": false, "aTargets": [-1] }
+ ]
+ }, columns_settings);
+ $("#filter_c").html('<p><a href="#" id="filter_transacs"><i class="fa fa-filter"></i> '+txtActivefilter+'</a>');
+ $('#filter_transacs').click(function(e) {
+ e.preventDefault();
+ if ($(this).hasClass('filtered')) {
+ var filteredValue = '';
+ $(this).html('<i class="fa fa-filter"></i> '+txtActivefilter);
+ } else { //Not filtered. Let's do it!
+ var filteredValue = '^((?!0.00).*)$'; //Filter not matching 0.00 http://stackoverflow.com/a/406408
+ $(this).html('<i class="fa fa-filter"></i> '+txtInactivefilter);
+ }
+ table_account_fines.fnFilter(filteredValue, 4, true, false);
+ $(this).toggleClass('filtered');
+ });
+ });
+ </script>
+[% END %]
+
[% INCLUDE 'intranet-bottom.inc' %]
+[% SET footerjs = 1 %]
[% INCLUDE 'doc-head-open.inc' %]
<title>Koha › Delete patron [% firstname %] [% surname %]</title>
[% INCLUDE 'doc-head-close.inc' %]
[% INCLUDE 'circ-menu.inc' %]
</div>
</div>
+
+[% MACRO jsinclude BLOCK %]
+ <script type="text/javascript" src="[% interface %]/[% theme %]/js/members-menu.js"></script>
+[% END %]
+
[% INCLUDE 'intranet-bottom.inc' %]
[% USE KohaDates %]
[% USE AuthorisedValues %]
[% USE Branches %]
+[% SET footerjs = 1 %]
[% INCLUDE 'doc-head-open.inc' %]
<title>Koha › Patrons › [% UNLESS blocking_error %]Discharge for [% firstname %] [% surname %] ([% cardnumber %])[% END %]</title>
[% INCLUDE 'doc-head-close.inc' %]
[% INCLUDE 'circ-menu.inc' %]
</div>
</div>
+
+[% MACRO jsinclude BLOCK %]
+ <script type="text/javascript" src="[% interface %]/[% theme %]/js/members-menu.js"></script>
+[% END %]
+
[% INCLUDE 'intranet-bottom.inc' %]
[% USE Branches %]
+[% SET footerjs = 1 %]
[% INCLUDE 'doc-head-open.inc' %]
<title>Koha › Patrons › Pending discharge requests</title>
[% INCLUDE 'doc-head-close.inc' %]
[% END %]
</div>
</div>
+
+[% MACRO jsinclude BLOCK %]
+ <script type="text/javascript" src="[% interface %]/[% theme %]/js/members-menu.js"></script>
+[% END %]
+
[% INCLUDE 'intranet-bottom.inc' %]
[% USE KohaDates %]
[% USE AuthorisedValues %]
+[% SET footerjs = 1 %]
[% INCLUDE 'doc-head-open.inc' %]
<title>Files for [% INCLUDE 'patron-title.inc' no_html = 1 %]</title>
[% INCLUDE 'doc-head-close.inc' %]
-<script type="text/javascript">
- $(document).ready(function(){
- $(".confirmdelete").on("click", function(){
- $(this).parents('tr').addClass("warn");
- if(confirm(_("Are you sure you want to delete this file?"))){
- return true;
- } else {
- $(this).parents('tr').removeClass("warn");
- return false;
- }
- });
-});
-</script>
</head>
+
<body id="pat_files" class="pat">
[% INCLUDE 'header.inc' %]
[% INCLUDE 'patron-search.inc' %]
[% INCLUDE 'circ-menu.inc' %]
</div>
</div>
+
+[% MACRO jsinclude BLOCK %]
+ <script type="text/javascript" src="[% interface %]/[% theme %]/js/members-menu.js"></script>
+ <script type="text/javascript">
+ $(document).ready(function(){
+ $(".confirmdelete").on("click", function(){
+ $(this).parents('tr').addClass("warn");
+ if(confirm(_("Are you sure you want to delete this file?"))){
+ return true;
+ } else {
+ $(this).parents('tr').removeClass("warn");
+ return false;
+ }
+ });
+ });
+ </script>
+[% END %]
+
[% INCLUDE 'intranet-bottom.inc' %]
[% USE AuthorisedValues %]
[% USE Branches %]
[% USE ColumnsSettings %]
+[% SET footerjs = 1 %]
[% INCLUDE 'doc-head-open.inc' %]
<title>Holds history for [% INCLUDE 'patron-title.inc' no_html = 1 %]</title>
[% INCLUDE 'doc-head-close.inc' %]
<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
-[% INCLUDE 'datatables.inc' %]
-[% INCLUDE 'columns_settings.inc' %]
-<script type="text/javascript" id="js">
-//<![CDATA[
-
- $(document).ready(function() {
- var columns_settings = [% ColumnsSettings.GetColumns('members', 'holdshistory', 'holdshistory-table', 'json') %];
- var table = KohaTable("#table_holdshistory", {
- "sPaginationType": "four_button",
- "aaSorting": [[4, 'desc']],
- "sDom": 'C<"top pager"ilpfB><"#filter_c">tr<"bottom pager"ip>',
- "aoColumnDefs": [
- { "sType": "anti-the", "aTargets" : [ "anti-the" ] },
- { "sType": "title-string", "aTargets" : [ "title-string" ] }
- ]
- }, columns_settings);
- });
-//]]>
-</script>
</head>
+
<body id="pat_holdshistory" class="pat">
[% INCLUDE 'header.inc' %]
[% INCLUDE 'patron-search.inc' %]
[% INCLUDE 'circ-menu.inc' %]
</div>
</div>
+
+[% MACRO jsinclude BLOCK %]
+ [% INCLUDE 'datatables.inc' %]
+ [% INCLUDE 'columns_settings.inc' %]
+ <script type="text/javascript" src="[% interface %]/[% theme %]/js/members-menu_[% KOHA_VERSION %].js"></script>
+ <script type="text/javascript" id="js">
+ $(document).ready(function() {
+ var columns_settings = [% ColumnsSettings.GetColumns('members', 'holdshistory', 'holdshistory-table', 'json') %];
+ var table = KohaTable("#table_holdshistory", {
+ "sPaginationType": "four_button",
+ "aaSorting": [[4, 'desc']],
+ "sDom": 'C<"top pager"ilpfB><"#filter_c">tr<"bottom pager"ip>',
+ "aoColumnDefs": [
+ { "sType": "anti-the", "aTargets" : [ "anti-the" ] },
+ { "sType": "title-string", "aTargets" : [ "title-string" ] }
+ ]
+ }, columns_settings);
+ });
+ </script>
+[% END %]
+
[% INCLUDE 'intranet-bottom.inc' %]
[% USE Koha %]
[% USE KohaDates %]
[% USE AuthorisedValues %]
+[% SET footerjs = 1 %]
[% INCLUDE 'doc-head-open.inc' %]
<title>Koha › Housebound › Details for [% INCLUDE 'patron-title.inc' no_html = 1 %]</title>
[% INCLUDE 'doc-head-close.inc' %]
-[% INCLUDE 'calendar.inc' %]
-<script type="text/javascript">
-//<![CDATA[
- $(document).ready(function() {
- $("a.delete").click(function(){
- return confirm(_("Are you sure you want to delete this delivery?"));
- });
- });
-//]]>
-</script>
</head>
+
<body id="housebound-home" class="housebound">
[% INCLUDE 'header.inc' %]
[% INCLUDE 'patron-search.inc' %]
[% INCLUDE 'circ-menu.inc' %]
</div>
</div>
+
+[% MACRO jsinclude BLOCK %]
+ [% INCLUDE 'calendar.inc' %]
+ <script type="text/javascript" src="[% interface %]/[% theme %]/js/members-menu.js"></script>
+ <script type="text/javascript">
+ $(document).ready(function() {
+ $("a.delete").click(function(){
+ return confirm(_("Are you sure you want to delete this delivery?"));
+ });
+ });
+ </script>
+[% END %]
+
[% INCLUDE 'intranet-bottom.inc' %]
[% USE Koha %]
+[% SET footerjs = 1 %]
[% INCLUDE 'doc-head-open.inc' %]
<title>Koha › Patrons › Create manual credit</title>
[% INCLUDE 'doc-head-close.inc' %]
-<script type="text/javascript">
-//<![CDATA[
-$(document).ready(function(){
- $('#mancredit').preventDoubleFormSubmit();
- $("fieldset.rows input, fieldset.rows select").addClass("noEnterSubmit");
-});
-//]]>
-</script>
</head>
+
<body id="pat_mancredit" class="pat">
[% INCLUDE 'header.inc' %]
[% INCLUDE 'patron-search.inc' %]
[% INCLUDE 'circ-menu.inc' %]
</div>
</div>
+
+[% MACRO jsinclude BLOCK %]
+ <script type="text/javascript" src="[% interface %]/[% theme %]/js/members-menu.js"></script>
+ <script type="text/javascript">
+ $(document).ready(function(){
+ $('#mancredit').preventDoubleFormSubmit();
+ $("fieldset.rows input, fieldset.rows select").addClass("noEnterSubmit");
+ });
+ </script>
+[% END %]
+
[% INCLUDE 'intranet-bottom.inc' %]
[% USE Koha %]
+[% SET footerjs = 1 %]
[% INCLUDE 'doc-head-open.inc' %]
<title>Koha › Patrons › Create manual invoice</title>
[% INCLUDE 'doc-head-close.inc' %]
-<script type="text/javascript">
-//<![CDATA[
- var type_fees = {'L':'','F':'','A':'','N':'','M':''};
- [% FOREACH invoice_types_loo IN invoice_types_loop %]
- type_fees['[% invoice_types_loo.authorised_value %]'] = "[% invoice_types_loo.lib %]";
- [% END %]
-$(document).ready(function(){
- $('#maninvoice').preventDoubleFormSubmit();
- $("fieldset.rows input, fieldset.rows select").addClass("noEnterSubmit");
- $("#invoice_type").on("change",function(){
- this.form.desc.value = this.options[this.selectedIndex].value;
- this.form.amount.value = type_fees[this.options[this.selectedIndex].value];
- });
-});
-//]]>
-</script>
</head>
+
<body id="pat_maninvoice" class="pat">
[% INCLUDE 'header.inc' %]
[% INCLUDE 'patron-search.inc' %]
[% INCLUDE 'circ-menu.inc' %]
</div>
</div>
+
+[% MACRO jsinclude BLOCK %]
+ <script type="text/javascript" src="[% interface %]/[% theme %]/js/members-menu.js"></script>
+ <script type="text/javascript">
+ var type_fees = {'L':'','F':'','A':'','N':'','M':''};
+ [% FOREACH invoice_types_loo IN invoice_types_loop %]
+ type_fees['[% invoice_types_loo.authorised_value %]'] = "[% invoice_types_loo.lib %]";
+ [% END %]
+ $(document).ready(function(){
+ $('#maninvoice').preventDoubleFormSubmit();
+ $("fieldset.rows input, fieldset.rows select").addClass("noEnterSubmit");
+ $("#invoice_type").on("change",function(){
+ this.form.desc.value = this.options[this.selectedIndex].value;
+ this.form.amount.value = type_fees[this.options[this.selectedIndex].value];
+ });
+ });
+ </script>
+[% END %]
+
[% INCLUDE 'intranet-bottom.inc' %]
[% USE Branches %]
+[% SET footerjs = 1 %]
[% PROCESS 'permissions.inc' %]
[% INCLUDE 'doc-head-open.inc' %]
<title>Koha › Patrons › Set permissions for [% surname %], [% firstname %]</title>
<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/treeview/jquery.treeview_[% KOHA_VERSION %].css"/>
[% INCLUDE 'doc-head-close.inc' %]
-<script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.treeview.pack_[% KOHA_VERSION %].js"></script>
-<!-- set up tree -->
-<script type="text/javascript">
- $(document).ready(function() {
- $("#permissionstree").treeview({animated: "fast", collapsed: true});
-
- // Enforce Superlibrarian Privilege Mutual Exclusivity
- if($('input[id="flag-0"]:checked').length){
- if ($('input[name="flag"]:checked').length > 1){
- alert(_("Inconsistency detected! The superlibrarian privilege is mutually exclusive of other privileges, as it includes them all. This patron's privileges will now be reset to include only superlibrarian."));
- }
-
- $('input[name="flag"]').each(function() {
- if($(this).attr('id') != "flag-0"){
- $(this).prop('disabled', true);
- $(this).prop('checked', false);
- }
- });
- }
-
- $('input#flag-0').click(function() {
- if($('input[id="flag-0"]:checked').length){
- $('input[name="flag"]').each(function() {
- if($(this).attr('id') != "flag-0"){
- $(this).prop('disabled', true);
- $(this).prop('checked', false);
- }
- });
- }
- else {
- $('input[name="flag"]').each(function() {
- $(this).prop('disabled', false);
- });
- }
- });
-
- $(".flag").on("change",function(){
- if( $(this).hasClass("parent") ){
- toggleChildren(this);
- } else {
- toggleParent(this);
- }
- });
-
- });
-
- // manage checking/unchecking parent permissions
- var originalChildStates = {}; /* keep track of subpermission checkbox values
- so that user can recover from accidentally
- toggling a parent/module permission */
- function selectChildren(parentInput) {
- var childListId = parentInput.id + '-children';
- var list = document.getElementById(childListId);
- var children = [];
- if (list) {
- var inputs = list.getElementsByTagName('input');
- for (var i = 0; i < inputs.length; i++) {
- if (inputs[i].type == 'checkbox') {
- children.push(inputs[i]);
- }
- }
-
- }
- return children;
- }
-
- function toggleChildren(parentInput) {
- var children = selectChildren(parentInput);
- if (children.length == 0) {
- return;
- }
- var checked = parentInput.checked;
- if (checked && parentInput.parentNode.className == 'expandable') {
- /* expand the tree */
- $(".hitarea", parentInput.parentNode).click();
- }
- for (var i = 0; i < children.length; i++) {
- if (checked) {
- originalChildStates[children[i].id] = children[i].checked;
- children[i].checked = checked;
- } else {
- if (children[i].id in originalChildStates) {
- children[i].checked = originalChildStates[children[i].id];
- } else {
- children[i].checked = checked;
- }
- }
- }
- }
-
- function toggleParent(childInput) {
- originalChildStates[childInput.id] = childInput.checked;
- if (childInput.checked) {
- return;
- }
- var parentId = childInput.parentNode.parentNode.id.replace(/-children$/, '');;
- var parentInput = document.getElementById(parentId);
- if (parentInput) {
- parentInput.checked = false;
- }
- }
-
-</script>
</head>
+
<body id="pat_member-flags" class="pat">
[% INCLUDE 'header.inc' %]
[% INCLUDE 'patron-search.inc' %]
[% INCLUDE 'circ-menu.inc' %]
</div>
</div>
+
+[% MACRO jsinclude BLOCK %]
+ <script type="text/javascript" src="[% interface %]/[% theme %]/js/members-menu_[% KOHA_VERSION %].js"></script>
+ <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.treeview.pack_[% KOHA_VERSION %].js"></script>
+ <!-- set up tree -->
+ <script type="text/javascript">
+ $(document).ready(function() {
+ $("#permissionstree").treeview({animated: "fast", collapsed: true});
+
+ // Enforce Superlibrarian Privilege Mutual Exclusivity
+ if($('input[id="flag-0"]:checked').length){
+ if ($('input[name="flag"]:checked').length > 1){
+ alert(_("Inconsistency detected! The superlibrarian privilege is mutually exclusive of other privileges, as it includes them all. This patron's privileges will now be reset to include only superlibrarian."));
+ }
+
+ $('input[name="flag"]').each(function() {
+ if($(this).attr('id') != "flag-0"){
+ $(this).prop('disabled', true);
+ $(this).prop('checked', false);
+ }
+ });
+ }
+
+ $('input#flag-0').click(function() {
+ if($('input[id="flag-0"]:checked').length){
+ $('input[name="flag"]').each(function() {
+ if($(this).attr('id') != "flag-0"){
+ $(this).prop('disabled', true);
+ $(this).prop('checked', false);
+ }
+ });
+ }
+ else {
+ $('input[name="flag"]').each(function() {
+ $(this).prop('disabled', false);
+ });
+ }
+ });
+
+ $(".flag").on("change",function(){
+ if( $(this).hasClass("parent") ){
+ toggleChildren(this);
+ } else {
+ toggleParent(this);
+ }
+ });
+
+ });
+
+ // manage checking/unchecking parent permissions
+ var originalChildStates = {}; /* keep track of subpermission checkbox values
+ so that user can recover from accidentally
+ toggling a parent/module permission */
+ function selectChildren(parentInput) {
+ var childListId = parentInput.id + '-children';
+ var list = document.getElementById(childListId);
+ var children = [];
+ if (list) {
+ var inputs = list.getElementsByTagName('input');
+ for (var i = 0; i < inputs.length; i++) {
+ if (inputs[i].type == 'checkbox') {
+ children.push(inputs[i]);
+ }
+ }
+ }
+ return children;
+ }
+
+ function toggleChildren(parentInput) {
+ var children = selectChildren(parentInput);
+ if (children.length == 0) {
+ return;
+ }
+ var checked = parentInput.checked;
+ if (checked && parentInput.parentNode.className == 'expandable') {
+ /* expand the tree */
+ $(".hitarea", parentInput.parentNode).click();
+ }
+ for (var i = 0; i < children.length; i++) {
+ if (checked) {
+ originalChildStates[children[i].id] = children[i].checked;
+ children[i].checked = checked;
+ } else {
+ if (children[i].id in originalChildStates) {
+ children[i].checked = originalChildStates[children[i].id];
+ } else {
+ children[i].checked = checked;
+ }
+ }
+ }
+ }
+
+ function toggleParent(childInput) {
+ originalChildStates[childInput.id] = childInput.checked;
+ if (childInput.checked) {
+ return;
+ }
+ var parentId = childInput.parentNode.parentNode.id.replace(/-children$/, '');;
+ var parentInput = document.getElementById(parentId);
+ if (parentInput) {
+ parentInput.checked = false;
+ }
+ }
+
+ </script>
+[% END %]
+
[% INCLUDE 'intranet-bottom.inc' %]
[% USE Koha %]
[% USE Branches %]
+[% SET footerjs = 1 %]
[% INCLUDE 'doc-head-open.inc' %]
<title>Koha › Patrons › [% IF ( newpassword ) %]Password updated [% ELSE %]Update password for [% surname %], [% firstname %][% END %]</title>
[% INCLUDE 'doc-head-close.inc' %]
-<script type="text/JavaScript">
-//<![CDATA[
-
- function generate_password() {
- // Always generate a strong password
- var chars = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
- var length = [% Koha.Preference('minPasswordLength') %];
- if ( length < 8 ) length = 8;
- var password='';
- for ( var i = 0 ; i < length ; i++){
- password += chars.charAt(Math.floor(Math.random()*chars.length));
- }
- return password;
- }
- $(document).ready(function() {
- $("body").on('click', "#fillrandom",function(e) {
- e.preventDefault();
- var password = '';
- var pattern_regex = /(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{[% Koha.Preference('minPasswordLength') %],}/;
- while ( ! pattern_regex.test( password ) ) {
- password = generate_password();
- }
- $("#newpassword").val(password);
- $("#newpassword").attr('type', 'text');
- $("#newpassword2").val(password);
- $("#newpassword2").attr('type', 'text');
- });
- $("div.hint").eq(0).after(" <div class=\"hint\"><a href=\"#\" id=\"fillrandom\">"+_("Click to fill with a randomly generated suggestion. ")+"<strong>"+_("Passwords will be displayed as text")+"</strong>.</a></div>");
-
- $(document).ajaxStart(function () {
- $("input[name^=newpassword]").hide();
- $("label[for=newpassword2]").hide();
- $(".hint:last").after($(".loading").show());
- });
- $(document).ajaxStop(function () {
- $("input[name^=newpassword]").show();
- $("label[for=newpassword2]").show();
- $(".loading").hide();
- $("label.error").hide();
- });
- [% IF NOMATCH %]
- $("#newpassword").addClass('focus');
- [% END %]
-
- $("#changepasswordf").validate({
- rules: {
- newpassword: {
- required: true,
- password_strong: true,
- password_no_spaces: true
- },
- newpassword2: {
- required: true,
- password_match: true
- }
- }
- });
- });
-//]]>
-</script>
</head>
+
<body id="pat_member-password" class="pat">
[% INCLUDE 'header.inc' %]
[% INCLUDE 'patron-search.inc' %]
[% INCLUDE 'circ-menu.inc' %]
</div>
</div>
+
+[% MACRO jsinclude BLOCK %]
+ <script type="text/javascript" src="[% interface %]/[% theme %]/js/members-menu.js"></script>
+ <script type="text/JavaScript">
+
+ function generate_password() {
+ // Always generate a strong password
+ var chars = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
+ var length = [% Koha.Preference('minPasswordLength') %];
+ if ( length < 8 ) length = 8;
+ var password='';
+ for ( var i = 0 ; i < length ; i++){
+ password += chars.charAt(Math.floor(Math.random()*chars.length));
+ }
+ return password;
+ }
+ $(document).ready(function() {
+ $("body").on('click', "#fillrandom",function(e) {
+ e.preventDefault();
+ var password = '';
+ var pattern_regex = /(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{[% Koha.Preference('minPasswordLength') %],}/;
+ while ( ! pattern_regex.test( password ) ) {
+ password = generate_password();
+ }
+ $("#newpassword").val(password);
+ $("#newpassword").attr('type', 'text');
+ $("#newpassword2").val(password);
+ $("#newpassword2").attr('type', 'text');
+ });
+ $("div.hint").eq(0).after(" <div class=\"hint\"><a href=\"#\" id=\"fillrandom\">"+_("Click to fill with a randomly generated suggestion. ")+"<strong>"+_("Passwords will be displayed as text")+"</strong>.</a></div>");
+
+ $(document).ajaxStart(function () {
+ $("input[name^=newpassword]").hide();
+ $("label[for=newpassword2]").hide();
+ $(".hint:last").after($(".loading").show());
+ });
+ $(document).ajaxStop(function () {
+ $("input[name^=newpassword]").show();
+ $("label[for=newpassword2]").show();
+ $(".loading").hide();
+ $("label.error").hide();
+ });
+ [% IF NOMATCH %]
+ $("#newpassword").addClass('focus');
+ [% END %]
+
+ $("#changepasswordf").validate({
+ rules: {
+ newpassword: {
+ required: true,
+ password_strong: true,
+ password_no_spaces: true
+ },
+ newpassword2: {
+ required: true,
+ password_match: true
+ }
+ }
+ });
+ });
+ </script>
+ [% 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' %]
[% USE ColumnsSettings %]
[% USE Branches %]
[% USE Categories %]
+[% SET footerjs = 1 %]
[% INCLUDE 'doc-head-open.inc' %]
<title>Koha › Patrons [% IF ( searching ) %]› Search results[% END %]</title>
[% INCLUDE 'doc-head-close.inc' %]
<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
-[% INCLUDE 'datatables.inc' %]
-[% INCLUDE 'columns_settings.inc' %]
-<script type="text/javascript">
-//<![CDATA[
-$(document).ready(function() {
- $('#add_to_patron_list_submit').prop('disabled', true);
- $('#new_patron_list').hide();
-
- $('#add_to_patron_list').change(function() {
- var value = $('#add_to_patron_list').val();
- if ( value == 'new' ) {
- $('#new_patron_list').val('')
- $('#new_patron_list').show();
- $('#new_patron_list').focus();
- } else if ( value ) {
- $('#new_patron_list').hide();
- $('#add_to_patron_list_submit').prop('disabled', false);
- } else {
- $('#new_patron_list').hide();
- $('#add_to_patron_list_submit').prop('disabled', true);
- }
- });
-
- $('#new_patron_list').on('input', function() {
- if ( $('#new_patron_list').val() ) {
- $('#add_to_patron_list_submit').prop('disabled', false);
- } else {
- $('#add_to_patron_list_submit').prop('disabled', true);
- }
- });
-
- $("#add_to_patron_list_submit").on('click', function(e){
- if ( $('#add_to_patron_list').val() == 'new' ) {
- if ( $('#new_patron_list').val() ) {
- $("#add_to_patron_list option").each(function() {
- if ( $(this).text() == $('#new_patron_list').val() ) {
- alert( _("You already have a list with that name!") );
- return false;
- }
- });
- } else {
- alert( _("You must give your new patron list a name!") );
- return false;
- }
- }
-
- if ( $("#memberresultst input:checkbox:checked").length == 0 ) {
- alert( _("You have not selected any patrons to add to a list!") );
- return false;
- }
-
- var borrowernumbers = [];
- $("#memberresultst").find("input:checkbox:checked").each(function(){
- borrowernumbers.push($(this).val());
- });
- var data = {
- add_to_patron_list: $("#add_to_patron_list").val(),
- new_patron_list: $("#new_patron_list").val(),
- borrowernumbers: borrowernumbers
- };
- $.ajax({
- data: data,
- type: 'POST',
- url: '/cgi-bin/koha/svc/members/add_to_list',
- success: function(data) {
- $("#patron_list_dialog").show();
- $("#patron_list_dialog > span.patrons-length").html(data.patrons_added_to_list);
- $("#patron_list_dialog > a").attr("href", "/cgi-bin/koha/patron_lists/list.pl?patron_list_id=" + data.patron_list.patron_list_id);
- $("#patron_list_dialog > a").html(data.patron_list.name);
- if ( $('#add_to_patron_list').val() == 'new' ) {
- var new_patron_list_added = $("<option>", {
- value: data.patron_list.patron_list_id,
- text: data.patron_list.name
- });
- $("#add_to_patron_list optgroup").append(new_patron_list_added);
- $("#add_to_patron_list").val(data.patron_list.patron_list_id);
- $("#new_patron_list").val('');
- $('#add_to_patron_list').change();
- }
- },
- error: function() {
- alert("an error occurred");
- }
- });
- return true;
- });
- $(".filterByLetter").on("click",function(e){
- e.preventDefault();
- filterByFirstLetterSurname($(this).text());
- });
- $("#select_all").on("click",function(e){
- e.preventDefault();
- $(".selection").prop("checked", true);
- });
- $("#clear_all").on("click",function(e){
- e.preventDefault();
- $(".selection").prop("checked", false);
- });
- $("#clear_search").on("click",function(e){
- e.preventDefault();
- clearFilters(true);
- });
- $("#searchform").on("submit", filter);
-});
-
-var dtMemberResults;
-var search = 1;
-$(document).ready(function() {
- [% IF searchmember %]
- $("#searchmember_filter").val("[% searchmember | html %]");
- [% END %]
- [% IF searchfieldstype %]
- $("searchfieldstype_filter").val("[% searchfieldstype %]");
- [% END %]
- [% IF searchtype %]
- $("#searchtype_filter").val("[% searchtype %]");
- [% END %]
- [% IF categorycode %]
- $("#categorycode_filter").val("[% categorycode_filter %]");
- [% END %]
- [% IF branchcode %]
- $("#branchcode_filter").val("[% branchcode_filter %]");
- [% END %]
-
- [% IF view != "show_results" %]
- search = 0;
- [% ELSE %]
- $("#searchresults").show();
- [% END %]
-
- // Build the aLengthMenu
- var aLengthMenu = [
- [%PatronsPerPage %], 10, 20, 50, 100, -1
- ];
- jQuery.unique(aLengthMenu);
- aLengthMenu.sort(function( a, b ){
- // Put "All" at the end
- if ( a == -1 ) {
- return 1;
- } else if ( b == -1 ) {
- return -1;
- }
- return parseInt(a) < parseInt(b) ? -1 : 1;}
- );
- var aLengthMenuLabel = [];
- $(aLengthMenu).each(function(){
- if ( this == -1 ) {
- // Label for -1 is "All"
- aLengthMenuLabel.push("All");
- } else {
- aLengthMenuLabel.push(this);
- }
- });
-
- // Apply DataTables on the results table
- var columns_settings = [% ColumnsSettings.GetColumns( 'members', 'member', 'memberresultst', 'json' ) %];
- [% UNLESS CAN_user_tools_manage_patron_lists %]
- [%# Remove the first column if we do not display the checkbox %]
- columns_settings.splice(0, 1);
- [% END %]
- dtMemberResults = KohaTable("#memberresultst", {
- 'bServerSide': true,
- 'sAjaxSource': "/cgi-bin/koha/svc/members/search",
- 'fnServerData': function(sSource, aoData, fnCallback) {
- if ( ! search ) {
- return;
- }
- aoData.push({
- 'name': 'searchmember',
- 'value': $("#searchmember_filter").val()
- },{
- 'name': 'firstletter',
- 'value': $("#firstletter_filter").val()
- },{
- 'name': 'searchfieldstype',
- 'value': $("#searchfieldstype_filter").val()
- },{
- 'name': 'searchtype',
- 'value': $("#searchtype_filter").val()
- },{
- 'name': 'categorycode',
- 'value': $("#categorycode_filter").val()
- },{
- 'name': 'branchcode',
- 'value': $("#branchcode_filter").val()
- },{
- 'name': 'name_sorton',
- 'value': 'borrowers.surname borrowers.firstname'
- },{
- 'name': 'dateofbirth',
- 'value': 'borrowers.dateofbirth',
- },{
- 'name': 'category_sorton',
- 'value': 'categories.description',
- },{
- 'name': 'branch_sorton',
- 'value': 'branches.branchname'
- },{
- 'name': 'template_path',
- 'value': 'members/tables/members_results.tt',
- });
- $.ajax({
- 'dataType': 'json',
- 'type': 'POST',
- 'url': sSource,
- 'data': aoData,
- 'success': function(json){
- // redirect if there is only 1 result.
- if ( json.aaData.length == 1 ) {
- var borrowernumber = json.aaData[0].borrowernumber;
- document.location.href="/cgi-bin/koha/members/moremember.pl?borrowernumber="+borrowernumber;
- return false;
- }
- fnCallback(json);
- }
- });
- },
- 'aoColumns':[
- [% IF CAN_user_tools_manage_patron_lists %]
- { 'mDataProp': 'dt_borrowernumber', 'bSortable': false },
- [% END %]
- { 'mDataProp': 'dt_cardnumber' },
- { 'mDataProp': 'dt_name' },
- { 'mDataProp': 'dt_dateofbirth' },
- { 'mDataProp': 'dt_category' },
- { 'mDataProp': 'dt_branch' },
- { 'mDataProp': 'dt_dateexpiry' },
- { 'mDataProp': 'dt_od_checkouts', 'bSortable': false },
- { 'mDataProp': 'dt_fines', 'bSortable': false },
- { 'mDataProp': 'dt_borrowernotes' },
- { 'mDataProp': 'dt_action', 'bSortable': false, 'sClass': 'actions' }
- ],
- 'fnRowCallback': function(nRow, aData, iDisplayIndex, iDisplayIndexFull) {
- /* Center text for 6th column */
- $("td:eq(5)", nRow).css("text-align", "center");
-
- return nRow;
- },
- 'bFilter': false,
- 'bAutoWidth': false,
- [% IF CAN_user_tools_manage_patron_lists %]
- 'aaSorting': [[2, 'asc']],
- [% ELSE %]
- 'aaSorting': [[1, 'asc']],
- [% END %]
- "aLengthMenu": [aLengthMenu, aLengthMenuLabel],
- 'sPaginationType': 'full_numbers',
- "iDisplayLength": [% PatronsPerPage %],
- "bProcessing": true,
- }, columns_settings);
- update_searched();
-});
-
-// Update the string "Results found ..."
-function update_searched(){
- var searched = $("#searchfieldstype_filter").find("option:selected").text();
- if ( $("#searchmember_filter").val() ) {
- if ( $("#searchtype_filter").val() == 'start_with' ) {
- searched += _(" starting with ");
- } else {
- searched += _(" containing ");
- }
- searched += "'" + $("#searchmember_filter").val() + "'";
- }
- if ( $("#firstletter_filter").val() ) {
- searched += _(" begins with ") + "'" + $("#firstletter_filter").val() +"'";
- }
- if ( $("#categorycode_filter").val() ) {
- searched += _(" with category ") + "'" + $("#categorycode_filter").find("option:selected").text() + "'";
- }
- if ( $("#branchcode_filter").val() ) {
- searched += _(" in library ") + $("#branchcode_filter").find("option:selected").text();
- }
- $("#searchpattern").text(searched);
-}
-
-// Redraw the table
-function filter() {
- $("#firstletter_filter").val('');
- update_searched();
- search = 1;
- $("#searchresults").show();
- dtMemberResults.fnDraw();
- return false;
-}
-
-// User has clicked on the Clear button
-function clearFilters(redraw) {
- $("#searchform select").val('');
- $("#firstletter_filter").val('');
- $("#searchmember_filter").val('');
- if(redraw) {
- search = 1;
- $("#searchresults").show();
- dtMemberResults.fnDraw();
- }
-}
-
-// User has clicked on a letter
-function filterByFirstLetterSurname(letter) {
- clearFilters(false);
- $("#firstletter_filter").val(letter);
- update_searched();
- search = 1;
- $("#searchresults").show();
- dtMemberResults.fnDraw();
-}
-//]]>
-</script>
</head>
+
<body id="pat_member" class="pat">
[% INCLUDE 'header.inc' %]
[% INCLUDE 'patron-search.inc' %]
[% INCLUDE 'members-menu.inc' %]
</div>
</div>
+
+[% MACRO jsinclude BLOCK %]
+ [% INCLUDE 'datatables.inc' %]
+ [% INCLUDE 'columns_settings.inc' %]
+ <script type="text/javascript" src="[% interface %]/[% theme %]/js/members-menu_[% KOHA_VERSION %].js"></script>
+ <script type="text/javascript">
+ $(document).ready(function() {
+ $('#add_to_patron_list_submit').prop('disabled', true);
+ $('#new_patron_list').hide();
+
+ $('#add_to_patron_list').change(function() {
+ var value = $('#add_to_patron_list').val();
+ if ( value == 'new' ) {
+ $('#new_patron_list').val('')
+ $('#new_patron_list').show();
+ $('#new_patron_list').focus();
+ } else if ( value ) {
+ $('#new_patron_list').hide();
+ $('#add_to_patron_list_submit').prop('disabled', false);
+ } else {
+ $('#new_patron_list').hide();
+ $('#add_to_patron_list_submit').prop('disabled', true);
+ }
+ });
+
+ $('#new_patron_list').on('input', function() {
+ if ( $('#new_patron_list').val() ) {
+ $('#add_to_patron_list_submit').prop('disabled', false);
+ } else {
+ $('#add_to_patron_list_submit').prop('disabled', true);
+ }
+ });
+
+ $("#add_to_patron_list_submit").on('click', function(e){
+ if ( $('#add_to_patron_list').val() == 'new' ) {
+ if ( $('#new_patron_list').val() ) {
+ $("#add_to_patron_list option").each(function() {
+ if ( $(this).text() == $('#new_patron_list').val() ) {
+ alert( _("You already have a list with that name!") );
+ return false;
+ }
+ });
+ } else {
+ alert( _("You must give your new patron list a name!") );
+ return false;
+ }
+ }
+
+ if ( $("#memberresultst input:checkbox:checked").length == 0 ) {
+ alert( _("You have not selected any patrons to add to a list!") );
+ return false;
+ }
+
+ var borrowernumbers = [];
+ $("#memberresultst").find("input:checkbox:checked").each(function(){
+ borrowernumbers.push($(this).val());
+ });
+ var data = {
+ add_to_patron_list: $("#add_to_patron_list").val(),
+ new_patron_list: $("#new_patron_list").val(),
+ borrowernumbers: borrowernumbers
+ };
+ $.ajax({
+ data: data,
+ type: 'POST',
+ url: '/cgi-bin/koha/svc/members/add_to_list',
+ success: function(data) {
+ $("#patron_list_dialog").show();
+ $("#patron_list_dialog > span.patrons-length").html(data.patrons_added_to_list);
+ $("#patron_list_dialog > a").attr("href", "/cgi-bin/koha/patron_lists/list.pl?patron_list_id=" + data.patron_list.patron_list_id);
+ $("#patron_list_dialog > a").html(data.patron_list.name);
+ if ( $('#add_to_patron_list').val() == 'new' ) {
+ var new_patron_list_added = $("<option>", {
+ value: data.patron_list.patron_list_id,
+ text: data.patron_list.name
+ });
+ $("#add_to_patron_list optgroup").append(new_patron_list_added);
+ $("#add_to_patron_list").val(data.patron_list.patron_list_id);
+ $("#new_patron_list").val('');
+ $('#add_to_patron_list').change();
+ }
+ },
+ error: function() {
+ alert("an error occurred");
+ }
+ });
+ return true;
+ });
+ $(".filterByLetter").on("click",function(e){
+ e.preventDefault();
+ filterByFirstLetterSurname($(this).text());
+ });
+ $("#select_all").on("click",function(e){
+ e.preventDefault();
+ $(".selection").prop("checked", true);
+ });
+ $("#clear_all").on("click",function(e){
+ e.preventDefault();
+ $(".selection").prop("checked", false);
+ });
+ $("#clear_search").on("click",function(e){
+ e.preventDefault();
+ clearFilters(true);
+ });
+ $("#searchform").on("submit", filter);
+ });
+
+ var dtMemberResults;
+ var search = 1;
+ $(document).ready(function() {
+ [% IF searchmember %]
+ $("#searchmember_filter").val("[% searchmember | html %]");
+ [% END %]
+ [% IF searchfieldstype %]
+ $("searchfieldstype_filter").val("[% searchfieldstype %]");
+ [% END %]
+ [% IF searchtype %]
+ $("#searchtype_filter").val("[% searchtype %]");
+ [% END %]
+ [% IF categorycode %]
+ $("#categorycode_filter").val("[% categorycode_filter %]");
+ [% END %]
+ [% IF branchcode %]
+ $("#branchcode_filter").val("[% branchcode_filter %]");
+ [% END %]
+
+ [% IF view != "show_results" %]
+ search = 0;
+ [% ELSE %]
+ $("#searchresults").show();
+ [% END %]
+
+ // Build the aLengthMenu
+ var aLengthMenu = [
+ [%PatronsPerPage %], 10, 20, 50, 100, -1
+ ];
+ jQuery.unique(aLengthMenu);
+ aLengthMenu.sort(function( a, b ){
+ // Put "All" at the end
+ if ( a == -1 ) {
+ return 1;
+ } else if ( b == -1 ) {
+ return -1;
+ }
+ return parseInt(a) < parseInt(b) ? -1 : 1;}
+ );
+ var aLengthMenuLabel = [];
+ $(aLengthMenu).each(function(){
+ if ( this == -1 ) {
+ // Label for -1 is "All"
+ aLengthMenuLabel.push("All");
+ } else {
+ aLengthMenuLabel.push(this);
+ }
+ });
+
+ // Apply DataTables on the results table
+ var columns_settings = [% ColumnsSettings.GetColumns( 'members', 'member', 'memberresultst', 'json' ) %];
+ [% UNLESS CAN_user_tools_manage_patron_lists %]
+ [%# Remove the first column if we do not display the checkbox %]
+ columns_settings.splice(0, 1);
+ [% END %]
+ dtMemberResults = KohaTable("#memberresultst", {
+ 'bServerSide': true,
+ 'sAjaxSource': "/cgi-bin/koha/svc/members/search",
+ 'fnServerData': function(sSource, aoData, fnCallback) {
+ if ( ! search ) {
+ return;
+ }
+ aoData.push({
+ 'name': 'searchmember',
+ 'value': $("#searchmember_filter").val()
+ },{
+ 'name': 'firstletter',
+ 'value': $("#firstletter_filter").val()
+ },{
+ 'name': 'searchfieldstype',
+ 'value': $("#searchfieldstype_filter").val()
+ },{
+ 'name': 'searchtype',
+ 'value': $("#searchtype_filter").val()
+ },{
+ 'name': 'categorycode',
+ 'value': $("#categorycode_filter").val()
+ },{
+ 'name': 'branchcode',
+ 'value': $("#branchcode_filter").val()
+ },{
+ 'name': 'name_sorton',
+ 'value': 'borrowers.surname borrowers.firstname'
+ },{
+ 'name': 'dateofbirth',
+ 'value': 'borrowers.dateofbirth',
+ },{
+ 'name': 'category_sorton',
+ 'value': 'categories.description',
+ },{
+ 'name': 'branch_sorton',
+ 'value': 'branches.branchname'
+ },{
+ 'name': 'template_path',
+ 'value': 'members/tables/members_results.tt',
+ });
+ $.ajax({
+ 'dataType': 'json',
+ 'type': 'POST',
+ 'url': sSource,
+ 'data': aoData,
+ 'success': function(json){
+ // redirect if there is only 1 result.
+ if ( json.aaData.length == 1 ) {
+ var borrowernumber = json.aaData[0].borrowernumber;
+ document.location.href="/cgi-bin/koha/members/moremember.pl?borrowernumber="+borrowernumber;
+ return false;
+ }
+ fnCallback(json);
+ }
+ });
+ },
+ 'aoColumns':[
+ [% IF CAN_user_tools_manage_patron_lists %]
+ { 'mDataProp': 'dt_borrowernumber', 'bSortable': false },
+ [% END %]
+ { 'mDataProp': 'dt_cardnumber' },
+ { 'mDataProp': 'dt_name' },
+ { 'mDataProp': 'dt_dateofbirth' },
+ { 'mDataProp': 'dt_category' },
+ { 'mDataProp': 'dt_branch' },
+ { 'mDataProp': 'dt_dateexpiry' },
+ { 'mDataProp': 'dt_od_checkouts', 'bSortable': false },
+ { 'mDataProp': 'dt_fines', 'bSortable': false },
+ { 'mDataProp': 'dt_borrowernotes' },
+ { 'mDataProp': 'dt_action', 'bSortable': false, 'sClass': 'actions' }
+ ],
+ 'fnRowCallback': function(nRow, aData, iDisplayIndex, iDisplayIndexFull) {
+ /* Center text for 6th column */
+ $("td:eq(5)", nRow).css("text-align", "center");
+
+ return nRow;
+ },
+ 'bFilter': false,
+ 'bAutoWidth': false,
+ [% IF CAN_user_tools_manage_patron_lists %]
+ 'aaSorting': [[2, 'asc']],
+ [% ELSE %]
+ 'aaSorting': [[1, 'asc']],
+ [% END %]
+ "aLengthMenu": [aLengthMenu, aLengthMenuLabel],
+ 'sPaginationType': 'full_numbers',
+ "iDisplayLength": [% PatronsPerPage %],
+ "bProcessing": true,
+ }, columns_settings);
+ update_searched();
+ });
+
+ // Update the string "Results found ..."
+ function update_searched(){
+ var searched = $("#searchfieldstype_filter").find("option:selected").text();
+ if ( $("#searchmember_filter").val() ) {
+ if ( $("#searchtype_filter").val() == 'start_with' ) {
+ searched += _(" starting with ");
+ } else {
+ searched += _(" containing ");
+ }
+ searched += "'" + $("#searchmember_filter").val() + "'";
+ }
+ if ( $("#firstletter_filter").val() ) {
+ searched += _(" begins with ") + "'" + $("#firstletter_filter").val() +"'";
+ }
+ if ( $("#categorycode_filter").val() ) {
+ searched += _(" with category ") + "'" + $("#categorycode_filter").find("option:selected").text() + "'";
+ }
+ if ( $("#branchcode_filter").val() ) {
+ searched += _(" in library ") + $("#branchcode_filter").find("option:selected").text();
+ }
+ $("#searchpattern").text(searched);
+ }
+
+ // Redraw the table
+ function filter() {
+ $("#firstletter_filter").val('');
+ update_searched();
+ search = 1;
+ $("#searchresults").show();
+ dtMemberResults.fnDraw();
+ return false;
+ }
+
+ // User has clicked on the Clear button
+ function clearFilters(redraw) {
+ $("#searchform select").val('');
+ $("#firstletter_filter").val('');
+ $("#searchmember_filter").val('');
+ if(redraw) {
+ search = 1;
+ $("#searchresults").show();
+ dtMemberResults.fnDraw();
+ }
+ }
+
+ // User has clicked on a letter
+ function filterByFirstLetterSurname(letter) {
+ clearFilters(false);
+ $("#firstletter_filter").val(letter);
+ update_searched();
+ search = 1;
+ $("#searchresults").show();
+ dtMemberResults.fnDraw();
+ }
+ </script>
+[% END %]
+
[% INCLUDE 'intranet-bottom.inc' %]
[% USE Koha %]
[% USE KohaDates %]
[% USE Branches %]
+[% SET footerjs = 1 %]
[% INCLUDE 'doc-head-open.inc' %]
<title>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 %])</title>
[% INCLUDE 'doc-head-close.inc' %]
-<script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.fixFloat_[% KOHA_VERSION %].js"></script>
-[% INCLUDE 'calendar.inc' %]
-<script type="text/javascript">
-//<![CDATA[
-$(document).ready(function() {
-
- $("#saverecord").css({ 'margin-left': 0 });
- var original_offset = $("#toolbar").position().top;
- var additional_height = $("#filters").height();
- $('#toolbar').fixFloat({ 'originalOffset': original_offset });
- $("#filteraction_on").on("click", function(){
- $(window).off('scroll');
- $("#toolbar").css({ top: original_offset + additional_height });
- $('#toolbar').fixFloat({ 'originalOffset': original_offset + additional_height });
- });
- $("#filteraction_off").on("click", function(){
- $(window).off('scroll');
- $("#toolbar").css({ top: original_offset });
- $('#toolbar').fixFloat({ 'originalOffset': original_offset });
- })
-
- [% IF categorycode %]
- update_category_code( "[% categorycode %]" );
- [% ELSE %]
- if ( $("#categorycode_entry").length > 0 ){
- var category_code = $("#categorycode_entry").find("option:selected").val();
- update_category_code( category_code );
- }
- [% END %]
-});
-
-function update_cardnumber_warning(size){
- var max_len = [% maxlength_cardnumber %];
- if ( size >= max_len ) {
- $("#cn_max").show();
- } else {
- $("#cn_max").hide();
- }
-}
-
-$(document).ready(function() {
- $("#cn_max").hide();
- var content;
- $("#cardnumber").on("keydown", function(e){
- content = $(this).val();
- });
- $("#cardnumber").on("keyup", function(e){
- // .val() will return the value of the input after the key has been released
- var l = $(this).val().length;
- if ( l == content.length + 1 ) { l--; }
- update_cardnumber_warning(l);
- });
- $("#cardnumber").bind("paste", function(e){
- var pastedData = e.originalEvent.clipboardData.getData('text');
- update_cardnumber_warning(pastedData.length - 1);
- } );
- var toggle_quick_add = $(".toggle_quick_add");
- $(toggle_quick_add).click(function(e){
- toggle_quick_add.toggle();
- e.preventDefault();
- var toggle_to = '';
- var toggle_from = '';
- if( $("#entryform:visible").length ) {
- toggle_to = "#quick_add_form label";
- toggle_from = "#entryform label";
- } else {
- toggle_to="#entryform label";
- toggle_from = "#quick_add_form label";
- }
- $(toggle_from).each(function() {
- var input_label = $(this).attr('for');
- if ( input_label == 'sex-male' || input_label == 'sex-none' || input_label == 'sex-female' ) {
- $(toggle_to+"[for='"+input_label+"']").next().prop('checked', $(this).next().prop('checked') );
- return;
- }
- $(toggle_to+"[for='"+input_label+"']").next().val( $(this).next().val() );
- });
-
- $(".toggler").toggle();
- });
-
- $("#save_quick_add").click(function(){
- $("#quick_add_form").validate();
- if( $("#quick_add_form").valid()){
- $('.toggle_quick_add').click();
- $('#saverecord').click();
- }
- else {return false;}
- });
-
- $("#entryform").validate({
- rules: {
- password: {
- required: true,
- password_strong: true,
- password_no_spaces: true
- },
- password2: {
- required: true,
- password_match: true
- }
- }
- });
-
- $("#saverecord").click(function(){
- if( check_form_borrowers() ){
- $("#entryform").submit();
- }
- });
-
- $('#duplicate').on('click', function() {
- $("input[name='op']").val('modify');
- $("input[name='borrowernumber']").val('[% check_member %]');
- $("input[name='check_member']").val('');
- $('#entryform').submit();
- });
-
- $('#not-duplicate').on('click', function() {
- $("input[name='nodouble']").val('1');
- $('#entryform').submit();
- });
-});
-
- var MSG_SEPARATOR = _("Separator must be / in field %s");
- var MSG_INCORRECT_DAY = _("Invalid day entered in field %s");
- var MSG_INCORRECT_MONTH = _("Invalid month entered in field %s");
- var MSG_INCORRECT_YEAR = _("Invalid year entered in field %s");
- var MSG_DUPLICATE_PATRON = _("Warning: Duplicate patron");
- var MSG_DUPLICATE_ORGANIZATION = _("Warning: Duplicate organization");
- var MSG_LATE_EXPIRY = _("Warning: Expiration date falls before enrollment date");
- var MSG_DUPLICATE_SUSPICION = _("Please confirm whether this is a duplicate patron");
- var MSG_MONTH = _("%s month")
- var MSG_MONTHS = _("%s months")
- var MSG_YEAR = _("%s year")
- var MSG_YEARS = _("%s years")
- var LABEL_CHANGE = _("Change");
- var LABEL_SET_TO_PATRON = _("Set to patron");
- var LABEL_AGE = _("Age");
-
-//]]>
-</script>
-<script type="text/javascript" src="[% interface %]/[% theme %]/js/members_[% KOHA_VERSION %].js"></script>
</head>
+
<body id="pat_memberentrygen" class="pat">
[% INCLUDE 'header.inc' %]
[% INCLUDE 'patron-search.inc' %]
</ol>
</fieldset>
</form>
- <script>
- $(document).ready(function () {
+[% END %]
+</div>
+</div>
+
+[% UNLESS ( opadd ) %]<div class="yui-b">
+[% INCLUDE 'members-menu.inc' %]
+</div>[% END %]
+[% END %]
+</div>
- $("#entryform,#saverecord").hide();
- [% q_add_f = Koha.Preference('PatronQuickAddFields').split('\|') %]
- var qaddfields = [[% FOREACH field IN q_add_f.unique %]"[% field %]",[% END %]];
- var skipped_fields = ["contactname","contactfirstname","relationship"]; //Guarantor form is pulled as a whole, ignore individual fields
- $("#entryform label").each(function () {
- var input_label = $(this).attr('for');
- if ( input_label == 'sex-female' ) {
- input_label='sex';
+[% MACRO jsinclude BLOCK %]
+ <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.fixFloat_[% KOHA_VERSION %].js"></script>
+ [% INCLUDE 'calendar.inc' %]
+ <script type="text/javascript">
+ $(document).ready(function() {
+
+ $("#saverecord").css({ 'margin-left': 0 });
+ var original_offset = $("#toolbar").position().top;
+ var additional_height = $("#filters").height();
+ $('#toolbar').fixFloat({ 'originalOffset': original_offset });
+ $("#filteraction_on").on("click", function(){
+ $(window).off('scroll');
+ $("#toolbar").css({ top: original_offset + additional_height });
+ $('#toolbar').fixFloat({ 'originalOffset': original_offset + additional_height });
+ });
+ $("#filteraction_off").on("click", function(){
+ $(window).off('scroll');
+ $("#toolbar").css({ top: original_offset });
+ $('#toolbar').fixFloat({ 'originalOffset': original_offset });
+ })
+
+ [% IF categorycode %]
+ update_category_code( "[% categorycode %]" );
+ [% ELSE %]
+ if ( $("#categorycode_entry").length > 0 ){
+ var category_code = $("#categorycode_entry").find("option:selected").val();
+ update_category_code( category_code );
}
- else if ( input_label == 'btitle' ) {
- input_label='title';
+ [% END %]
+ });
+
+ function update_cardnumber_warning(size){
+ var max_len = [% maxlength_cardnumber %];
+ if ( size >= max_len ) {
+ $("#cn_max").show();
+ } else {
+ $("#cn_max").hide();
+ }
+ }
+
+ $(document).ready(function() {
+ $("#cn_max").hide();
+ var content;
+ $("#cardnumber").on("keydown", function(e){
+ content = $(this).val();
+ });
+ $("#cardnumber").on("keyup", function(e){
+ // .val() will return the value of the input after the key has been released
+ var l = $(this).val().length;
+ if ( l == content.length + 1 ) { l--; }
+ update_cardnumber_warning(l);
+ });
+ $("#cardnumber").bind("paste", function(e){
+ var pastedData = e.originalEvent.clipboardData.getData('text');
+ update_cardnumber_warning(pastedData.length - 1);
+ } );
+ var toggle_quick_add = $(".toggle_quick_add");
+ $(toggle_quick_add).click(function(e){
+ toggle_quick_add.toggle();
+ e.preventDefault();
+ var toggle_to = '';
+ var toggle_from = '';
+ if( $("#entryform:visible").length ) {
+ toggle_to = "#quick_add_form label";
+ toggle_from = "#entryform label";
+ } else {
+ toggle_to="#entryform label";
+ toggle_from = "#quick_add_form label";
}
- if ( skipped_fields.indexOf( input_label ) != -1 ) { input_label=""; }
- if( qaddfields.indexOf( input_label ) != -1 || $(this).attr('class') == 'required' ){
- $(this).parent().clone().appendTo("#quick_add_list");
- [% UNLESS mandatorypassword %]
- if( input_label == 'password' ) $("#entryform label[for='password2']").parent().clone().appendTo("#quick_add_list");
- [% END %]
+ $(toggle_from).each(function() {
+ var input_label = $(this).attr('for');
+ if ( input_label == 'sex-male' || input_label == 'sex-none' || input_label == 'sex-female' ) {
+ $(toggle_to+"[for='"+input_label+"']").next().prop('checked', $(this).next().prop('checked') );
+ return;
+ }
+ $(toggle_to+"[for='"+input_label+"']").next().val( $(this).next().val() );
+ });
+
+ $(".toggler").toggle();
+ });
+
+ $("#save_quick_add").click(function(){
+ $("#quick_add_form").validate();
+ if( $("#quick_add_form").valid()){
+ $('.toggle_quick_add').click();
+ $('#saverecord').click();
+ }
+ else {return false;}
+ });
+
+ $("#entryform").validate({
+ rules: {
+ password: {
+ required: true,
+ password_strong: true,
+ password_no_spaces: true
+ },
+ password2: {
+ required: true,
+ password_match: true
+ }
}
});
- if( $("#memberentry_guarantor").length ) {
- $("#memberentry_guarantor").clone().appendTo("#quick_add_list").css("margin",0);
- $("#quick_add_form #memberentry_guarantor").append("<p>" + _("Note: Quick add guarantor form populates address fields in full form") + "</p>");
- $("#quick_add_list #guarantordelete").prop('id','qagd');
+
+ $("#saverecord").click(function(){
+ if( check_form_borrowers() ){
+ $("#entryform").submit();
}
- $("#qagd").click(function() { $("#guarantordelete").click(); });
- $("#quick_add_form").show();
+ });
+
+ $('#duplicate').on('click', function() {
+ $("input[name='op']").val('modify');
+ $("input[name='borrowernumber']").val('[% check_member %]');
+ $("input[name='check_member']").val('');
+ $('#entryform').submit();
+ });
+
+ $('#not-duplicate').on('click', function() {
+ $("input[name='nodouble']").val('1');
+ $('#entryform').submit();
+ });
});
+
+ var MSG_SEPARATOR = _("Separator must be / in field %s");
+ var MSG_INCORRECT_DAY = _("Invalid day entered in field %s");
+ var MSG_INCORRECT_MONTH = _("Invalid month entered in field %s");
+ var MSG_INCORRECT_YEAR = _("Invalid year entered in field %s");
+ var MSG_DUPLICATE_PATRON = _("Warning: Duplicate patron");
+ var MSG_DUPLICATE_ORGANIZATION = _("Warning: Duplicate organization");
+ var MSG_LATE_EXPIRY = _("Warning: Expiration date falls before enrollment date");
+ var MSG_DUPLICATE_SUSPICION = _("Please confirm whether this is a duplicate patron");
+ var MSG_MONTH = _("%s month")
+ var MSG_MONTHS = _("%s months")
+ var MSG_YEAR = _("%s year")
+ var MSG_YEARS = _("%s years")
+ var LABEL_CHANGE = _("Change");
+ var LABEL_SET_TO_PATRON = _("Set to patron");
+ var LABEL_AGE = _("Age");
+
+ [% IF quickadd && opadd && !check_member %]
+ $(document).ready(function () {
+
+ $("#entryform,#saverecord").hide();
+ [% q_add_f = Koha.Preference('PatronQuickAddFields').split('\|') %]
+ var qaddfields = [[% FOREACH field IN q_add_f.unique %]"[% field %]",[% END %]];
+ var skipped_fields = ["contactname","contactfirstname","relationship"]; //Guarantor form is pulled as a whole, ignore individual fields
+ $("#entryform label").each(function () {
+ var input_label = $(this).attr('for');
+ if ( input_label == 'sex-female' ) {
+ input_label='sex';
+ }
+ else if ( input_label == 'btitle' ) {
+ input_label='title';
+ }
+ if ( skipped_fields.indexOf( input_label ) != -1 ) { input_label=""; }
+ if( qaddfields.indexOf( input_label ) != -1 || $(this).attr('class') == 'required' ){
+ $(this).parent().clone().appendTo("#quick_add_list");
+ [% UNLESS mandatorypassword %]
+ if( input_label == 'password' ) $("#entryform label[for='password2']").parent().clone().appendTo("#quick_add_list");
+ [% END %]
+ }
+ });
+ if( $("#memberentry_guarantor").length ) {
+ $("#memberentry_guarantor").clone().appendTo("#quick_add_list").css("margin",0);
+ $("#quick_add_form #memberentry_guarantor").append("<p>" + _("Note: Quick add guarantor form populates address fields in full form") + "</p>");
+ $("#quick_add_list #guarantordelete").prop('id','qagd');
+ }
+ $("#qagd").click(function() { $("#guarantordelete").click(); });
+ $("#quick_add_form").show();
+ });
+ [% END %]
+
</script>
+ <script type="text/javascript" src="[% interface %]/[% theme %]/js/members_[% KOHA_VERSION %].js"></script>
+ <script type="text/javascript" src="[% interface %]/[% theme %]/js/messaging-preference-form_[% KOHA_VERSION %].js"></script>
[% END %]
-</div>
-</div>
-[% UNLESS ( opadd ) %]<div class="yui-b">
-[% INCLUDE 'members-menu.inc' %]
-</div>[% END %]
-[% END %]
-</div>
[% INCLUDE 'intranet-bottom.inc' %]
[% PROCESS 'password_check.inc' %]
[% PROCESS 'add_password_check' new_password => 'password' %]
[% USE Branches %]
[% USE Categories %]
[% USE KohaDates %]
+[% SET footerjs = 1 %]
[% INCLUDE 'doc-head-open.inc' %]
<title>Koha › Patrons › Update patron records</title>
[% INCLUDE 'doc-head-close.inc' %]
-<script type="text/javascript">
- $(function() {
- $( "#pending_updates" ).accordion();
- });
-</script>
</head>
+
<body id="pat_update" class="pat">
[% INCLUDE 'header.inc' %]
[% INCLUDE 'patron-search.inc' %]
</div>
</div>
+
+[% MACRO jsinclude BLOCK %]
+ <script type="text/javascript" src="[% interface %]/[% theme %]/js/members-menu.js"></script>
+ <script type="text/javascript">
+ $(function() {
+ $( "#pending_updates" ).accordion();
+ });
+ </script>
+[% END %]
+
[% INCLUDE 'intranet-bottom.inc' %]
[% USE Koha %]
[% USE KohaDates %]
+[% SET footerjs = 1 %]
[% INCLUDE 'doc-head-open.inc' %]
<title>Koha › Check duplicate patron</title>
[% INCLUDE 'doc-head-close.inc' %]
</div>
</div>
</div>
+
[% INCLUDE 'popup-bottom.inc' %]
[% USE Branches %]
[% USE KohaDates %]
[% USE Price %]
+[% SET footerjs = 1 %]
[% INCLUDE 'doc-head-open.inc' %]
<title>Summary for [% firstname %] [% surname %] ([% cardnumber %])</title>
[% INCLUDE 'doc-head-close.inc' %]
- [% INCLUDE 'slip-print.inc' #printThenClose %]
</head>
+
<body id="pat_moremember-print" class="pat">
<div id="main">
<h3><a href="/cgi-bin/koha/circ/circulation.pl?findborrower=[% cardnumber %]">Account summary: [% firstname %] [% surname %] ([% cardnumber %])</a></h3>
</table>
[% END %]
+[% MACRO jsinclude BLOCK %]
+ [% INCLUDE 'slip-print.inc' #printThenClose %]
+[% END %]
+
[% INCLUDE 'intranet-bottom.inc' %]
[% USE Koha %]
+[% SET footerjs = 1 %]
[% INCLUDE 'doc-head-open.inc' %]
<title>Print Receipt for [% cardnumber %]</title>
[% INCLUDE 'doc-head-close.inc' %]
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="shortcut icon" href="[% IF ( IntranetFavicon ) %][% IntranetFavicon %][% ELSE %][% interface %]/[% theme %]/img/favicon.ico[% END %]" type="image/x-icon" />
- <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/print_[% KOHA_VERSION %].css" />
-
-[% INCLUDE 'slip-print.inc' #printThenClose %]
+<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/print_[% KOHA_VERSION %].css" />
</head>
+
<body id="pat_moremember-receipt" class="pat">
<div id="receipt">
[% END %]
[% END %]
+[% MACRO jsinclude BLOCK %]
+ [% INCLUDE 'slip-print.inc' #printThenClose %]
+[% END %]
[% INCLUDE 'intranet-bottom.inc' %]
[% USE KohaDates %]
[% USE AuthorisedValues %]
[% USE ColumnsSettings %]
+[% SET footerjs = 1 %]
[% INCLUDE 'doc-head-open.inc' %]
<title>Koha › Patrons ›
[% UNLESS blocking_error %]
[% END %]
</title>
[% INCLUDE 'doc-head-close.inc' %]
-[% INCLUDE 'calendar.inc' %]
<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
-[% INCLUDE 'datatables.inc' %]
-[% INCLUDE 'columns_settings.inc' %]
-[% INCLUDE 'strings.inc' %]
-<script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.checkboxes.min_[% KOHA_VERSION %].js"></script>
-<script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery-ui-timepicker-addon.min_[% KOHA_VERSION %].js"></script>
-[% INCLUDE 'timepicker.inc' %]
-<script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.dataTables.rowGrouping_[% KOHA_VERSION %].js"></script>
-<script type="text/javascript" src="[% interface %]/[% theme %]/js/pages/circulation_[% KOHA_VERSION %].js"></script>
-<script type="text/javascript" src="[% interface %]/[% theme %]/js/checkouts_[% KOHA_VERSION %].js"></script>
-<script type="text/javascript" src="[% interface %]/[% theme %]/js/holds_[% KOHA_VERSION %].js"></script>
-<script type="text/JavaScript">
-//<![CDATA[
-/* Set some variable needed in circulation.js */
-var interface = "[% interface %]";
-var theme = "[% theme %]";
-var borrowernumber = "[% borrowernumber %]";
-var branchcode = "[% Branches.GetLoggedInBranchcode() %]";
-var exports_enabled = "[% Koha.Preference('ExportCircHistory') %]";
-var AllowCirculate = [% (CAN_user_circulate_circulate_remaining_permissions)? 1 : 0 %]
-var AllowRenewalLimitOverride = [% (CAN_user_circulate_override_renewals && Koha.Preference('AllowRenewalLimitOverride') )? 1: 0 %];
-var script = "moremember";
-var relatives_borrowernumbers = new Array();
-[% FOREACH b IN relatives_borrowernumbers %]
- relatives_borrowernumbers.push("[% b %]");
-[% END %]
-
-var MSG_EXPORT_SELECT_CHECKOUTS = _("You must select checkout(s) to export");
-var MSG_CONFIRM_DELETE_MESSAGE = _("Are you sure you want to delete this message? This cannot be undone.");
-
-columns_settings = [% ColumnsSettings.GetColumns( 'members', 'moremember', 'issues-table', 'json' ) %]
-
-$(document).ready(function() {
- if ( $('#clubs-tab').length ) {
- $('#clubs-tab-link').on('click', function() {
- $('#clubs-tab').text(_("Loading..."));
- $('#clubs-tab').load('/cgi-bin/koha/clubs/patron-clubs-tab.pl?borrowernumber=[% borrowernumber %]');
- });
- }
-
- $('#finesholdsissues').tabs({
- // Correct table sizing for tables hidden in tabs
- // http://www.datatables.net/examples/api/tabs_and_scrolling.html
- "show": function(event, ui) {
- var oTable = $('div.dataTables_wrapper>table', ui.panel).dataTable();
- if ( oTable.length > 0 ) {
- oTable.fnAdjustColumnSizing();
- }
- },
- "activate": function( event, ui ) {
- $('#'+ui.newTab.context.id).click();
- }
- } );
- $("#holdst").dataTable($.extend(true, {}, dataTablesDefaults, {
- "sDom": 't',
- "aoColumnDefs": [
- { "aTargets": [ -1,-2 ], "bSortable": false, "bSearchable": false }
- ],
- "aoColumns": [
- { "sType": "title-string" },{ "sType": "anti-the" },null,null,null,null,null,null
- ],
- "bPaginate": false
- }));
- [% IF ( picture ) %]
- // new YAHOO.widget.Button("delpicture"); // FIXME: formatting mismatch between YUI and normal button
- $('#delpicture').click(function(){
- return confirm(_("Are you sure you want to delete this patron image? This cannot be undone."));
- });
- $('#manage-patron-image').find("input[value*=Upload]").click(function(){
- if($("#uploadfile").val() == ""){
- alert(_("Please choose a file to upload"));
- return false;
- }
- return confirm(_("Are you sure you want to replace the current patron image? This cannot be undone."));
- });[% END %]
-
- $("#suspend_until").datepicker({
- onClose: function(dateText, inst) {
- validate_date(dateText, inst);
- },
- minDate: 1, // require that hold suspended until date is after today
- }).on("change", function(e, value) {
- if ( ! is_valid_date( $(this).val() ) ) {$(this).val("");}
- });
-
- $("#view_restrictions").on("click",function(){
- $('#debarments-tab-link').click();
- });
- });
-function uncheck_sibling(me){
-nodename=me.getAttribute("name");
-if (nodename =="barcodes[]"){
- var Node=me.parentNode.previousSibling;
- while (Node.nodeName!="TD"){Node=Node.previousSibling}
- var Nodes=Node.childNodes;
- for (var i=0;i < Nodes.length;i++){
- if (Nodes[i].nodeName=="INPUT" && Nodes[i].getAttribute("type")=="checkbox"){
- Nodes[i].checked=false;
- }
- }
-
-}else {
- var Node=me.parentNode.nextSibling;
- while (Node.nodeName!="TD"){Node=Node.nextSibling}
- var Nodes=Node.childNodes;
- for (var i=0;i<Nodes.length;i++){
- if (Nodes[i].nodeName=="INPUT" && Nodes[i].getAttribute("type")=="checkbox"){
- Nodes[i].checked=false;
- }
- }
-}
-}
-function validate1(date) {
- var today = new Date();
- if ( date < today ) {
- return true;
- } else {
- return false;
- }
-};
-//]]>
-</script>
-
</head>
+
<body id="pat_moremember" class="pat">
[% INCLUDE 'header.inc' %]
[% INCLUDE 'patron-search.inc' %]
[% INCLUDE 'circ-menu.inc' %]
</div>
</div>
+
+[% MACRO jsinclude BLOCK %]
+ [% INCLUDE 'datatables.inc' %]
+ [% INCLUDE 'columns_settings.inc' %]
+ [% INCLUDE 'strings.inc' %]
+ [% INCLUDE 'calendar.inc' %]
+ <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.checkboxes.min_[% KOHA_VERSION %].js"></script>
+ <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery-ui-timepicker-addon.min_[% KOHA_VERSION %].js"></script>
+ [% INCLUDE 'timepicker.inc' %]
+ <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.dataTables.rowGrouping_[% KOHA_VERSION %].js"></script>
+ <script type="text/javascript" src="[% interface %]/[% theme %]/js/pages/circulation_[% KOHA_VERSION %].js"></script>
+ <script type="text/javascript" src="[% interface %]/[% theme %]/js/checkouts_[% KOHA_VERSION %].js"></script>
+ <script type="text/javascript" src="[% interface %]/[% theme %]/js/holds_[% KOHA_VERSION %].js"></script>
+ <script type="text/javascript" src="[% interface %]/[% theme %]/js/members-menu_[% KOHA_VERSION %].js"></script>
+ <script type="text/javascript" src="[% interface %]/[% theme %]/js/messaging-preference-form_[% KOHA_VERSION %].js"></script>
+ <script type="text/javascript">
+ /* Set some variable needed in circulation.js */
+ var interface = "[% interface %]";
+ var theme = "[% theme %]";
+ var borrowernumber = "[% borrowernumber %]";
+ var branchcode = "[% Branches.GetLoggedInBranchcode() %]";
+ var exports_enabled = "[% Koha.Preference('ExportCircHistory') %]";
+ var AllowCirculate = [% (CAN_user_circulate_circulate_remaining_permissions)? 1 : 0 %]
+ var AllowRenewalLimitOverride = [% (CAN_user_circulate_override_renewals && Koha.Preference('AllowRenewalLimitOverride') )? 1: 0 %];
+ var script = "moremember";
+ var relatives_borrowernumbers = new Array();
+ [% FOREACH b IN relatives_borrowernumbers %]
+ relatives_borrowernumbers.push("[% b %]");
+ [% END %]
+
+ var MSG_EXPORT_SELECT_CHECKOUTS = _("You must select checkout(s) to export");
+ var MSG_CONFIRM_DELETE_MESSAGE = _("Are you sure you want to delete this message? This cannot be undone.");
+
+ columns_settings = [% ColumnsSettings.GetColumns( 'members', 'moremember', 'issues-table', 'json' ) %]
+
+ $(document).ready(function() {
+ if ( $('#clubs-tab').length ) {
+ $('#clubs-tab-link').on('click', function() {
+ $('#clubs-tab').text(_("Loading..."));
+ $('#clubs-tab').load('/cgi-bin/koha/clubs/patron-clubs-tab.pl?borrowernumber=[% borrowernumber %]');
+ });
+ }
+
+ $('#finesholdsissues').tabs({
+ // Correct table sizing for tables hidden in tabs
+ // http://www.datatables.net/examples/api/tabs_and_scrolling.html
+ "show": function(event, ui) {
+ var oTable = $('div.dataTables_wrapper>table', ui.panel).dataTable();
+ if ( oTable.length > 0 ) {
+ oTable.fnAdjustColumnSizing();
+ }
+ },
+ "activate": function( event, ui ) {
+ $('#'+ui.newTab.context.id).click();
+ }
+ } );
+ $("#holdst").dataTable($.extend(true, {}, dataTablesDefaults, {
+ "sDom": 't',
+ "aoColumnDefs": [
+ { "aTargets": [ -1,-2 ], "bSortable": false, "bSearchable": false }
+ ],
+ "aoColumns": [
+ { "sType": "title-string" },{ "sType": "anti-the" },null,null,null,null,null,null
+ ],
+ "bPaginate": false
+ }));
+ [% IF ( picture ) %]
+ $('#delpicture').click(function(){
+ return confirm(_("Are you sure you want to delete this patron image? This cannot be undone."));
+ });
+ $('#manage-patron-image').find("input[value*=Upload]").click(function(){
+ if($("#uploadfile").val() == ""){
+ alert(_("Please choose a file to upload"));
+ return false;
+ }
+ return confirm(_("Are you sure you want to replace the current patron image? This cannot be undone."));
+ });
+ [% END %]
+
+ $("#suspend_until").datepicker({
+ onClose: function(dateText, inst) {
+ validate_date(dateText, inst);
+ },
+ minDate: 1, // require that hold suspended until date is after today
+ }).on("change", function(e, value) {
+ if ( ! is_valid_date( $(this).val() ) ) {$(this).val("");}
+ });
+
+ $("#view_restrictions").on("click",function(){
+ $('#debarments-tab-link').click();
+ });
+ });
+ function uncheck_sibling(me){
+ nodename=me.getAttribute("name");
+ if (nodename =="barcodes[]"){
+ var Node=me.parentNode.previousSibling;
+ while (Node.nodeName!="TD"){Node=Node.previousSibling}
+ var Nodes=Node.childNodes;
+ for (var i=0;i < Nodes.length;i++){
+ if (Nodes[i].nodeName=="INPUT" && Nodes[i].getAttribute("type")=="checkbox"){
+ Nodes[i].checked=false;
+ }
+ }
+ } else {
+ var Node=me.parentNode.nextSibling;
+ while (Node.nodeName!="TD"){Node=Node.nextSibling}
+ var Nodes=Node.childNodes;
+ for (var i=0;i<Nodes.length;i++){
+ if (Nodes[i].nodeName=="INPUT" && Nodes[i].getAttribute("type")=="checkbox"){
+ Nodes[i].checked=false;
+ }
+ }
+ }
+ }
+
+ function validate1(date) {
+ var today = new Date();
+ if ( date < today ) {
+ return true;
+ } else {
+ return false;
+ }
+ };
+ </script>
+[% END %]
+
[% INCLUDE 'intranet-bottom.inc' %]
[% USE KohaDates %]
+[% SET footerjs = 1 %]
[% INCLUDE 'doc-head-open.inc' %]
<title>Search the Norwegian national patron database</title>
[% INCLUDE 'doc-head-close.inc' %]
[% INCLUDE 'circ-menu.inc' %]
</div>
</div>
+
+[% MACRO jsinclude BLOCK %]
+ <script type="text/javascript" src="[% interface %]/[% theme %]/js/members-menu.js"></script>
+[% END %]
+
[% INCLUDE 'intranet-bottom.inc' %]
[% BLOCK patron_detail %]
[% USE AuthorisedValues %]
[% USE Branches %]
[% USE KohaDates %]
+[% SET footerjs = 1 %]
[% INCLUDE 'doc-head-open.inc' %]
<title>Sent notices for [% INCLUDE 'patron-title.inc' no_html = 1 %]</title>
[% INCLUDE 'doc-head-close.inc' %]
<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
-[% INCLUDE 'datatables.inc' %]
-<script type="text/javascript">
-//<![CDATA[
- $(document).ready(function() {
- $("#noticestable").dataTable($.extend(true, {}, dataTablesDefaults, {
- "aaSorting": [[ 3, "desc" ]],
- "aoColumns": [ null,null,null,{ "sType": "title-string" } ],
- "sPaginationType": "four_button"
- }));
-
- $("#noticestable").on("click", ".notice-title", function(e){
- e.preventDefault();
- var rowid = $(this).data("noticeid");
- $("#notice"+rowid).toggle();
- $("#resend_notice"+rowid).toggle();
- });
-
- });
-//]]>
-</script>
<style type="text/css">
.notice { display: none; }
.notice-title { font-weight: bold; display: block; }
</style>
</head>
+
<body id="pat_notices" class="pat">
[% INCLUDE 'header.inc' %]
[% INCLUDE 'patron-search.inc' %]
[% INCLUDE 'circ-menu.inc' %]
</div>
</div>
+
+[% MACRO jsinclude BLOCK %]
+ <script type="text/javascript" src="[% interface %]/[% theme %]/js/members-menu_[% KOHA_VERSION %].js"></script>
+ [% INCLUDE 'datatables.inc' %]
+ <script type="text/javascript">
+ $(document).ready(function() {
+ $("#noticestable").dataTable($.extend(true, {}, dataTablesDefaults, {
+ "aaSorting": [[ 3, "desc" ]],
+ "aoColumns": [ null,null,null,{ "sType": "title-string" } ],
+ "sPaginationType": "four_button"
+ }));
+
+ $("#noticestable").on("click", ".notice-title", function(e){
+ e.preventDefault();
+ var rowid = $(this).data("noticeid");
+ $("#notice"+rowid).toggle();
+ $("#resend_notice"+rowid).toggle();
+ });
+ });
+ </script>
+[% END %]
+
[% INCLUDE 'intranet-bottom.inc' %]
[% USE AuthorisedValues %]
[% USE Branches %]
[% USE Price %]
+[% SET footerjs = 1 %]
[% INCLUDE 'doc-head-open.inc' %]
<title>Koha › Patrons › Pay Fines for [% borrower.firstname |html %] [% borrower.surname |html %]</title>
[% INCLUDE 'doc-head-close.inc' %]
-<script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.checkboxes.min_[% KOHA_VERSION %].js"></script>
-<script type= "text/javascript">
-//<![CDATA[
-function enableCheckboxActions(){
- // Enable/disable controls if checkboxes are checked
- var checkedBoxes = $("input.cb:checked");
- if ($(checkedBoxes).size()) {
- $("#payselected").prop("disabled",false);
- } else {
- $("#payselected").prop("disabled",true);
- }
-}
- $(document).ready(function(){
- $('#pay-fines-form').preventDoubleFormSubmit();
- $("#woall").click(function(event){
- var msg = _("Are you sure you want to write off %s in outstanding fines? This cannot be undone!").format( "[% total | $Price %]" );
- var answer = confirm(msg);
- if (!answer){
- event.preventDefault();
- }
- });
- $('#CheckAll').click(function(){
- $("#finest").checkCheckboxes();
- enableCheckboxActions();
- return false;
- });
- $('#CheckNone').click(function(){
- $("#finest").unCheckCheckboxes();
- enableCheckboxActions();
- return false;
- });
- $(".cb").change(function(){
- enableCheckboxActions();
- });
- enableCheckboxActions();
- });
-//]]>
-</script>
</head>
+
<body id="pat_pay" class="pat">
[% INCLUDE 'header.inc' %]
[% INCLUDE 'patron-search.inc' %]
[% INCLUDE 'circ-menu.inc' %]
</div>
</div>
+
+[% MACRO jsinclude BLOCK %]
+ <script type="text/javascript" src="[% interface %]/[% theme %]/js/members-menu_[% KOHA_VERSION %].js"></script>
+ <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.checkboxes.min_[% KOHA_VERSION %].js"></script>
+ <script type= "text/javascript">
+ function enableCheckboxActions(){
+ // Enable/disable controls if checkboxes are checked
+ var checkedBoxes = $("input.cb:checked");
+ if ($(checkedBoxes).size()) {
+ $("#payselected").prop("disabled",false);
+ } else {
+ $("#payselected").prop("disabled",true);
+ }
+ }
+ $(document).ready(function(){
+ $('#pay-fines-form').preventDoubleFormSubmit();
+ $("#woall").click(function(event){
+ var msg = _("Are you sure you want to write off %s in outstanding fines? This cannot be undone!").format( "[% total | $Price %]" );
+ var answer = confirm(msg);
+ if (!answer){
+ event.preventDefault();
+ }
+ });
+ $('#CheckAll').click(function(){
+ $("#finest").checkCheckboxes();
+ enableCheckboxActions();
+ return false;
+ });
+ $('#CheckNone').click(function(){
+ $("#finest").unCheckCheckboxes();
+ enableCheckboxActions();
+ return false;
+ });
+ $(".cb").change(function(){
+ enableCheckboxActions();
+ });
+ enableCheckboxActions();
+ });
+
+ </script>
+[% END %]
+
[% INCLUDE 'intranet-bottom.inc' %]
[% USE Koha %]
[% USE Branches %]
+[% SET footerjs = 1 %]
[% INCLUDE 'doc-head-open.inc' %]
<title>Koha › Patrons › Collect fine payment for [% borrower.firstname %] [% borrower.surname %]</title>
[% INCLUDE 'doc-head-close.inc' %]
-<script type= "text/javascript">
-//<![CDATA[
-$(document).ready(function() {
- $('#payindivfine, #woindivfine, #payfine').preventDoubleFormSubmit();
- $("#paid").on("change",function(){
- moneyFormat( this );
- });
-});
-
-function moneyFormat(textObj) {
- var newValue = textObj.value;
- var decAmount = "";
- var dolAmount = "";
- var decFlag = false;
- var aChar = "";
-
- for(i=0; i < newValue.length; i++) {
- aChar = newValue.substring(i, i+1);
- if (aChar >= "0" && aChar <= "9") {
- if(decFlag) {
- decAmount = "" + decAmount + aChar;
- }
- else {
- dolAmount = "" + dolAmount + aChar;
- }
- }
- if (aChar == ".") {
- if (decFlag) {
- dolAmount = "";
- break;
- }
- decFlag = true;
- }
- }
-
- if (dolAmount == "") {
- dolAmount = "0";
- }
-// Strip leading 0s
- if (dolAmount.length > 1) {
- while(dolAmount.length > 1 && dolAmount.substring(0,1) == "0") {
- dolAmount = dolAmount.substring(1,dolAmount.length);
- }
- }
- if (decAmount.length > 2) {
- decAmount = decAmount.substring(0,2);
- }
-// Pad right side
- if (decAmount.length == 1) {
- decAmount = decAmount + "0";
- }
- if (decAmount.length == 0) {
- decAmount = decAmount + "00";
- }
-
- textObj.value = dolAmount + "." + decAmount;
-}
-//]]>
-</script>
</head>
+
<body id="pat_paycollect" class="pat">
[% INCLUDE 'header.inc' %]
[% INCLUDE 'patron-search.inc' %]
[% INCLUDE 'circ-menu.inc' %]
</div>
</div>
-[% INCLUDE 'intranet-bottom.inc' %]
+[% MACRO jsinclude BLOCK %]
+ <script type="text/javascript" src="[% interface %]/[% theme %]/js/members-menu.js"></script>
+ <script type= "text/javascript">
+ $(document).ready(function() {
+ $('#payindivfine, #woindivfine, #payfine').preventDoubleFormSubmit();
+ $("#paid").on("change",function(){
+ moneyFormat( this );
+ });
+ });
+
+ function moneyFormat(textObj) {
+ var newValue = textObj.value;
+ var decAmount = "";
+ var dolAmount = "";
+ var decFlag = false;
+ var aChar = "";
+
+ for(i=0; i < newValue.length; i++) {
+ aChar = newValue.substring(i, i+1);
+ if (aChar >= "0" && aChar <= "9") {
+ if(decFlag) {
+ decAmount = "" + decAmount + aChar;
+ }
+ else {
+ dolAmount = "" + dolAmount + aChar;
+ }
+ }
+ if (aChar == ".") {
+ if (decFlag) {
+ dolAmount = "";
+ break;
+ }
+ decFlag = true;
+ }
+ }
+
+ if (dolAmount == "") {
+ dolAmount = "0";
+ }
+ // Strip leading 0s
+ if (dolAmount.length > 1) {
+ while(dolAmount.length > 1 && dolAmount.substring(0,1) == "0") {
+ dolAmount = dolAmount.substring(1,dolAmount.length);
+ }
+ }
+ if (decAmount.length > 2) {
+ decAmount = decAmount.substring(0,2);
+ }
+ // Pad right side
+ if (decAmount.length == 1) {
+ decAmount = decAmount + "0";
+ }
+ if (decAmount.length == 0) {
+ decAmount = decAmount + "00";
+ }
+
+ textObj.value = dolAmount + "." + decAmount;
+ }
+ </script>
+[% END %]
+
+[% INCLUDE 'intranet-bottom.inc' %]
[% USE Koha %]
[% USE KohaDates %]
+[% SET footerjs = 1 %]
[% INCLUDE 'doc-head-open.inc' %]
-<title>Print Receipt for [% cardnumber %]</title>
+<title>Print receipt for [% cardnumber %]</title>
[% INCLUDE 'doc-head-close.inc' %]
<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/printreceiptinvoice_[% KOHA_VERSION %].css" />
[% INCLUDE 'blocking_errors.inc' %]
-[% INCLUDE 'slip-print.inc' #printThenClose %]
</head>
+
<body id="pat_printfeercpt" class="pat">
<div id="receipt">
</tfoot>
</table>
</div>
+
+[% MACRO jsinclude BLOCK %]
+ [% INCLUDE 'slip-print.inc' #printThenClose %]
+[% END %]
+
[% INCLUDE 'intranet-bottom.inc' %]
[% USE Koha %]
+[% SET footerjs = 1 %]
[% INCLUDE 'doc-head-open.inc' %]
<title>Print receipt for [% cardnumber %]</title>
[% INCLUDE 'doc-head-close.inc' %]
<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/printreceiptinvoice_[% KOHA_VERSION %].css" />
-[% INCLUDE 'slip-print.inc' #printThenClose %]
</head>
+
<body id="printinvoice" class="pat">
<div id="receipt">
</tfoot>
</table>
</div>
+
+[% MACRO jsinclude BLOCK %]
+ [% INCLUDE 'slip-print.inc' #printThenClose %]
+[% END %]
+
[% INCLUDE 'intranet-bottom.inc' %]
[% USE Koha %]
[% USE AuthorisedValues %]
[% USE Branches %]
+[% SET footerjs = 1 %]
[% INCLUDE 'doc-head-open.inc' %]
<title>Koha › Patrons › Purchase suggestions for [% INCLUDE 'patron-title.inc' no_html = 1 %]</title>
<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
[% INCLUDE 'doc-head-close.inc' %]
-[% INCLUDE 'datatables.inc' %]
-<script type="text/javascript">
- $(document).ready(function() {
- $("#suggestions").dataTable($.extend(true, {}, dataTablesDefaults, {
- 'bPaginate': false,
- 'bFilter': false,
- 'bInfo': false,
- 'sDom': 't'
- } ));
- });
-</script>
</head>
<body id="pat_purchase_suggestions" class="pat">
[% INCLUDE 'circ-menu.inc' %]
</div>
</div>
+
+[% MACRO jsinclude BLOCK %]
+ <script type="text/javascript" src="[% interface %]/[% theme %]/js/members-menu.js"></script>
+ [% INCLUDE 'datatables.inc' %]
+ <script type="text/javascript">
+ $(document).ready(function() {
+ $("#suggestions").dataTable($.extend(true, {}, dataTablesDefaults, {
+ 'bPaginate': false,
+ 'bFilter': false,
+ 'bInfo': false,
+ 'sDom': 't'
+ } ));
+ });
+ </script>
+[% END %]
+
[% INCLUDE 'intranet-bottom.inc' %]
[% USE Koha %]
[% USE AuthorisedValues %]
[% USE Branches %]
+[% SET footerjs = 1 %]
[% INCLUDE 'doc-head-open.inc' %]
<title>Circulation History for [% INCLUDE 'patron-title.inc' no_html = 1 %]</title>
[% INCLUDE 'doc-head-close.inc' %]
<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
-[% INCLUDE 'datatables.inc' %]
-<script type="text/javascript" id="js">
-//<![CDATA[
-
- $(document).ready(function() {
- var table = $("#table_readingrec").dataTable($.extend(true, {}, dataTablesDefaults, {
- "sPaginationType": "four_button",
- "aaSorting": [],
- "aoColumnDefs": [
- { "sType": "anti-the", "aTargets" : [ "anti-the" ] },
- { "sType": "title-string", "aTargets" : [ "title-string" ] }
- ]
- }));
- var tabs = $("#tabs").tabs({
- activate: function(e, ui) {
- var active = tabs.tabs("option", "active" );
- if ( active == 1 ) {
- table.fnFilter("standard_checkout", 0);
- } else if ( active == 2 ) {
- table.fnFilter("onsite_checkout", 0);
- } else { // all
- table.fnFilter('', 0);
- }
- }
- });
- });
-//]]>
-</script>
</head>
+
<body id="pat_readingrec" class="pat">
[% INCLUDE 'header.inc' %]
[% INCLUDE 'patron-search.inc' %]
[% INCLUDE 'circ-menu.inc' %]
</div>
</div>
+
+[% MACRO jsinclude BLOCK %]
+ <script type="text/javascript" src="[% interface %]/[% theme %]/js/members-menu_[% KOHA_VERSION %].js"></script>
+ [% INCLUDE 'datatables.inc' %]
+ <script type="text/javascript" id="js">
+ $(document).ready(function() {
+ var table = $("#table_readingrec").dataTable($.extend(true, {}, dataTablesDefaults, {
+ "sPaginationType": "four_button",
+ "aaSorting": [],
+ "aoColumnDefs": [
+ { "sType": "anti-the", "aTargets" : [ "anti-the" ] },
+ { "sType": "title-string", "aTargets" : [ "title-string" ] }
+ ]
+ }));
+ var tabs = $("#tabs").tabs({
+ activate: function(e, ui) {
+ var active = tabs.tabs("option", "active" );
+ if ( active == 1 ) {
+ table.fnFilter("standard_checkout", 0);
+ } else if ( active == 2 ) {
+ table.fnFilter("onsite_checkout", 0);
+ } else { // all
+ table.fnFilter('', 0);
+ }
+ }
+ });
+ });
+ </script>
+[% END %]
+
[% INCLUDE 'intranet-bottom.inc' %]
[% USE Koha %]
[% USE AuthorisedValues %]
[% USE Branches %]
+[% SET footerjs = 1 %]
[% INCLUDE 'doc-head-open.inc' %]
<title>Subscription Routing Lists for [% INCLUDE 'patron-title.inc' no_html = 1 %]</title>
[% INCLUDE 'doc-head-close.inc' %]
</head>
+
<body id="pat_routing_lists" class="pat">
[% INCLUDE 'header.inc' %]
[% INCLUDE 'patron-search.inc' %]
[% INCLUDE 'circ-menu.inc' %]
</div>
</div>
+
+[% MACRO jsinclude BLOCK %]
+ <script type="text/javascript" src="[% interface %]/[% theme %]/js/members-menu.js"></script>
+[% END %]
+
[% INCLUDE 'intranet-bottom.inc' %]
[% USE Koha %]
[% USE AuthorisedValues %]
[% USE Branches %]
+[% SET footerjs = 1 %]
[% INCLUDE 'doc-head-open.inc' %]
<title>Koha › Patrons ›
[% UNLESS blocking_error %]
</title>
[% INCLUDE 'doc-head-close.inc' %]
<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
-[% INCLUDE 'datatables.inc' %]
-[% INCLUDE 'calendar.inc' %]
-<script type="text/javascript">
- $(document).ready(function() {
- $("#statistics").dataTable($.extend(true, {}, dataTablesDefaults, {
- "sDom": 't',
- "bPaginate": false
- }));
- });
-</script>
</head>
<body id="pat_statistics" class="pat">
[% INCLUDE 'circ-menu.inc' %]
</div>
</div>
+
+[% MACRO jsinclude BLOCK %]
+ <script type="text/javascript" src="[% interface %]/[% theme %]/js/members-menu_[% KOHA_VERSION %].js"></script>
+ [% INCLUDE 'datatables.inc' %]
+ <script type="text/javascript">
+ $(document).ready(function() {
+ $("#statistics").dataTable($.extend(true, {}, dataTablesDefaults, {
+ "sDom": 't',
+ "bPaginate": false
+ }));
+ });
+ </script>
+[% END %]
+
[% INCLUDE 'intranet-bottom.inc' %]
+[% SET footerjs = 1 %]
[% INCLUDE 'doc-head-open.inc' %]
-<title>Koha › Choose Adult category</title>
+<title>Koha › Choose adult category</title>
[% INCLUDE 'doc-head-close.inc' %]
<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
-[% INCLUDE 'datatables.inc' %]
-<script type="text/javascript">
- $(document).ready(function() {
- $("#catst").dataTable($.extend(true, {}, dataTablesDefaults, {
- "sDom": 't',
- "aaSorting": [[ 2, "asc" ]],
- "aoColumnDefs": [
- { "aTargets": [ 0 ], "bSortable": false, "bSearchable": false }
- ],
- "bPaginate": false
- }));
- });
-</script>
-<style type="text/css">
- #custom-doc { width:29em;*width:28.3em;min-width:377px; margin:auto; text-align:left; }
-</style>
+<style type="text/css">
+ #custom-doc { width:29em;*width:28.3em;min-width:377px; margin:auto; text-align:left; }
+</style>
</head>
+
<body id="pat_update-child" class="pat">
<div id="custom-doc" class="yui-t7">
<div id="bd">
-[% IF ( CONFIRM ) %]
-<script type="text/javascript">
-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 %]';
- }
-}
-
-confirm_updatechild([% borrowernumber %]);
-</script>
-[% END %]
-
-[% IF ( SUCCESS ) %]
-<script type="text/javascript">
-self.opener.location.href='/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]';
-window.close();
-</script>
-[% END %]
-
-
-
[% IF ( MULTI ) %]
- <h3> Choose Adult category </h3>
+ <h3> Choose adult category </h3>
[% IF patron_categories %]
<form method="post" action="update-child.pl">
</form>
[% END %]
[% END %]
+</div>
+[% MACRO jsinclude BLOCK %]
+ <script type="text/javascript" src="[% interface %]/[% theme %]/js/members-menu_[% KOHA_VERSION %].js"></script>
+ [% INCLUDE 'datatables.inc' %]
+ <script type="text/javascript">
+ $(document).ready(function() {
+ $("#catst").dataTable($.extend(true, {}, dataTablesDefaults, {
+ "sDom": 't',
+ "aaSorting": [[ 2, "asc" ]],
+ "aoColumnDefs": [
+ { "aTargets": [ 0 ], "bSortable": false, "bSearchable": false }
+ ],
+ "bPaginate": false
+ }));
+ });
+ </script>
+ [% IF ( CONFIRM ) %]
+ <script type="text/javascript">
+ 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 %]';
+ }
+ }
+ confirm_updatechild([% borrowernumber %]);
+ </script>
+ [% END %]
+ [% IF ( SUCCESS ) %]
+ <script type="text/javascript">
+ self.opener.location.href='/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]';
+ window.close();
+ </script>
+ [% END %]
+[% END %]
-
-
-</div>
[% INCLUDE 'popup-bottom.inc' %]
--- /dev/null
+/* 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";
+}
--- /dev/null
+$(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();
+});
$("#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) {