View | Details | Raw Unified | Return to bug 19641
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt (-132 / +138 lines)
Lines 6-11 Link Here
6
[% USE ItemTypes %]
6
[% USE ItemTypes %]
7
[% USE Price %]
7
[% USE Price %]
8
[% USE AuthorisedValues %]
8
[% USE AuthorisedValues %]
9
[% SET footerjs = 1 %]
9
[% INCLUDE 'doc-head-open.inc' %]
10
[% INCLUDE 'doc-head-open.inc' %]
10
[% SET destination = "circ" %]
11
[% SET destination = "circ" %]
11
<title>Koha &rsaquo; Circulation
12
<title>Koha &rsaquo; Circulation
Lines 14-131 Link Here
14
[% END %]
15
[% END %]
15
</title>
16
</title>
16
[% INCLUDE 'doc-head-close.inc' %]
17
[% INCLUDE 'doc-head-close.inc' %]
17
[% INCLUDE 'calendar.inc' %]
18
19
<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" />
18
<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" />
20
[% INCLUDE 'strings.inc' %]
21
[% INCLUDE 'datatables.inc' %]
22
[% INCLUDE 'columns_settings.inc' %]
23
<script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script>
24
<script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery-ui-timepicker-addon.min.js"></script>
25
[% INCLUDE 'timepicker.inc' %]
26
<script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.dataTables.rowGrouping.js"></script>
27
<script type="text/javascript" src="[% interface %]/[% theme %]/js/pages/circulation.js"></script>
28
<script type="text/javascript" src="[% interface %]/[% theme %]/js/checkouts.js"></script>
29
<script type="text/javascript" src="[% interface %]/[% theme %]/js/holds.js"></script>
30
<script type="text/javascript">
31
//<![CDATA[
32
/* Set some variable needed in circulation.js */
33
var MSG_DT_LOADING_RECORDS = _("Loading... you may continue scanning.");
34
var interface = "[% interface %]";
35
var theme = "[% theme %]";
36
var borrowernumber = "[% borrowernumber %]";
37
var branchcode = "[% branch %]";
38
var exports_enabled = "[% Koha.Preference('ExportCircHistory') %]";
39
var AllowRenewalLimitOverride = [% (CAN_user_circulate_override_renewals && Koha.Preference('AllowRenewalLimitOverride') )? 1: 0 %];
40
var AllowCirculate = [% (CAN_user_circulate_circulate_remaining_permissions)? 1 : 0 %];
41
var script = "circulation";
42
var relatives_borrowernumbers = new Array();
43
[% FOREACH b IN relatives_borrowernumbers %]
44
    relatives_borrowernumbers.push("[% b %]");
45
[% END %]
46
47
var MSG_EXPORT_SELECT_CHECKOUTS = _("You must select checkout(s) to export");
48
var MSG_CONFIRM_DELETE_MESSAGE = _("Are you sure you want to delete this message? This cannot be undone.");
49
50
columns_settings = [% ColumnsSettings.GetColumns( 'circ', 'circulation', 'issues-table', 'json' ) %]
51
52
[% IF borrowernumber and borrower %]
53
    if($.cookie("holdfor") != [% borrowernumber %]){
54
        $.removeCookie("holdfor", { path: '/' });
55
    }
56
[% ELSE %]
57
    $.removeCookie("holdfor", { path: '/' });
58
[% END %]
59
60
[% UNLESS ( borrowernumber ) %][% UNLESS ( borrowers ) %]window.onload=function(){ $('#findborrower').focus(); };[% END %][% END %]
61
62
// On-site checkout
63
function toggle_onsite_checkout(){
64
    if ( $("#onsite_checkout").prop('checked') ) {
65
        $("#duedatespec").val("[% todaysdate | $KohaDates with_hours => 1%]")
66
        [% IF !Koha.Preference('SpecifyDueDate') %]
67
            $("#duedatespec").datetimepicker('destroy');
68
        [% END %]
69
    } else {
70
        $("#duedatespec").datetimepicker({
71
            onClose: function(dateText, inst) {
72
                if (validate_date(dateText, inst) ) {
73
                    $("#barcode").focus();
74
                }
75
            },
76
            hour: 23,
77
            minute: 59
78
        }).on("change", function(e, value) {
79
            if ( ! is_valid_date( $(this).val() ) ) {$(this).val("");}
80
        });
81
    }
82
}
83
84
function Dopop(link) {
85
    var newin = window.open(link, 'popup', 'width=600,height=400,resizable=1,toolbar=0,scrollbars=1,top');
86
}
87
$(document).ready(function() {
88
    $('#mainform').on('submit',function() {
89
        if ($("#barcode") && $("#barcode").val()) {
90
            $('#barcode').on('keypress',function(event) {
91
                $('#barcodeSubmittedModal').modal();
92
                event.preventDefault(); }
93
            );
94
        }
95
    });
96
97
    if ( $('#clubs-tab').length ) {
98
        $('#clubs-tab-link').on('click', function() {
99
            $('#clubs-tab').text(_("Loading..."));
100
            $('#clubs-tab').load('/cgi-bin/koha/clubs/patron-clubs-tab.pl?borrowernumber=[% borrowernumber %]');
101
        });
102
    }
103
104
    [% IF !( CircAutoPrintQuickSlip == 'clear' ) %]
105
        // listen submit to trigger qslip on empty checkout
106
        $('#mainform').bind('submit',function() {
107
            if ($('#barcode').val() == '') {
108
                return printx_window( '[% CircAutoPrintQuickSlip %]' );
109
            }
110
        });
111
    [% END %]
112
    toggle_onsite_checkout();
113
    $("#onsite_checkout").click(function(){
114
        toggle_onsite_checkout();
115
    });
116
117
    $("#suspend_until").datepicker({
118
        onClose: function(dateText, inst) {
119
            validate_date(dateText, inst);
120
        },
121
        minDate: 1, // require that hold suspended until date is after today
122
    });
123
124
});
125
126
//]]>
127
</script>
128
</head>
19
</head>
20
129
<body id="circ_circulation" class="circ">
21
<body id="circ_circulation" class="circ">
130
22
131
[% INCLUDE 'header.inc' %]
23
[% INCLUDE 'header.inc' %]
Lines 300-326 $(document).ready(function() { Link Here
300
[% END %]
192
[% END %]
301
</ul>
193
</ul>
302
194
303
[% IF HIGHHOLDS %]
304
<script language="JavaScript" type="text/javascript">
305
$(document).ready(function() {
306
    [% IF !override_high_holds %]
307
        $("input[name=duedatespec]:hidden").val('[% HIGHHOLDS.returndate %]');
308
        if ('[% duedatespec %]' === '') {
309
            $("input[name=restoreduedatespec]:hidden").val('highholds_empty');
310
        } else {
311
            $("input[name=restoreduedatespec]:hidden").val('[% duedatespec %]');
312
        }
313
    [% END %]
314
315
    $("#override_high_holds_tmp").on( 'change', function() {
316
        if ( this.checked ) {
317
            $("input[name=duedatespec]:hidden").val('');
318
        }
319
    });
320
});
321
</script>
322
[% END %]
323
324
[% IF CAN_user_circulate_force_checkout or HIGHHOLDS %]
195
[% IF CAN_user_circulate_force_checkout or HIGHHOLDS %]
325
<form method="post" action="/cgi-bin/koha/circ/circulation.pl" autocomplete="off">
196
<form method="post" action="/cgi-bin/koha/circ/circulation.pl" autocomplete="off">
326
    <input type="hidden" name="restoreduedatespec" />
197
    <input type="hidden" name="restoreduedatespec" />
Lines 1095-1098 No patron matched <span class="ex">[% message | html %]</span> Link Here
1095
    </div>
966
    </div>
1096
    </div>
967
    </div>
1097
</div>
968
</div>
969
970
[% MACRO jsinclude BLOCK %]
971
    [% INCLUDE 'strings.inc' %]
972
    [% INCLUDE 'calendar.inc' %]
973
    [% INCLUDE 'datatables.inc' %]
974
    [% INCLUDE 'columns_settings.inc' %]
975
    <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script>
976
    <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery-ui-timepicker-addon.min.js"></script>
977
    [% INCLUDE 'timepicker.inc' %]
978
    <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.dataTables.rowGrouping.js"></script>
979
    <script type="text/javascript" src="[% interface %]/[% theme %]/js/pages/circulation.js"></script>
980
    <script type="text/javascript" src="[% interface %]/[% theme %]/js/checkouts.js"></script>
981
    <script type="text/javascript" src="[% interface %]/[% theme %]/js/holds.js"></script>
982
    <script type="text/javascript">
983
        /* Set some variable needed in circulation.js */
984
        var MSG_DT_LOADING_RECORDS = _("Loading... you may continue scanning.");
985
        var interface = "[% interface %]";
986
        var theme = "[% theme %]";
987
        var borrowernumber = "[% borrowernumber %]";
988
        var branchcode = "[% branch %]";
989
        var exports_enabled = "[% Koha.Preference('ExportCircHistory') %]";
990
        var AllowRenewalLimitOverride = [% (CAN_user_circulate_override_renewals && Koha.Preference('AllowRenewalLimitOverride') )? 1: 0 %];
991
        var AllowCirculate = [% (CAN_user_circulate_circulate_remaining_permissions)? 1 : 0 %];
992
        var script = "circulation";
993
        var relatives_borrowernumbers = new Array();
994
        [% FOREACH b IN relatives_borrowernumbers %]
995
            relatives_borrowernumbers.push("[% b %]");
996
        [% END %]
997
998
        var MSG_EXPORT_SELECT_CHECKOUTS = _("You must select checkout(s) to export");
999
        var MSG_CONFIRM_DELETE_MESSAGE = _("Are you sure you want to delete this message? This cannot be undone.");
1000
1001
        /* Set some variables needed in members-menu.js */
1002
        var advsearch = "[% advsearch %]";
1003
        var dateformat = "[% dateformat %]";
1004
        var NorwegianPatronDBEnable = "[% NorwegianPatronDBEnable %]";
1005
        var CATCODE_MULTI = "[% CATCODE_MULTI %]";
1006
        var catcode = "[% catcode %]";
1007
        var destination = "[% destination %]";
1008
        var CAN_user_borrowers = "[% CAN_user_borrowers %]";
1009
1010
        columns_settings = [% ColumnsSettings.GetColumns( 'circ', 'circulation', 'issues-table', 'json' ) %]
1011
1012
        [% IF borrowernumber and borrower %]
1013
            if($.cookie("holdfor") != [% borrowernumber %]){
1014
                $.removeCookie("holdfor", { path: '/' });
1015
            }
1016
        [% ELSE %]
1017
            $.removeCookie("holdfor", { path: '/' });
1018
        [% END %]
1019
1020
        [% UNLESS ( borrowernumber ) %][% UNLESS ( borrowers ) %]window.onload=function(){ $('#findborrower').focus(); };[% END %][% END %]
1021
1022
        // On-site checkout
1023
        function toggle_onsite_checkout(){
1024
            if ( $("#onsite_checkout").prop('checked') ) {
1025
                $("#duedatespec").val("[% todaysdate | $KohaDates with_hours => 1%]")
1026
                [% IF !Koha.Preference('SpecifyDueDate') %]
1027
                    $("#duedatespec").datetimepicker('destroy');
1028
                [% END %]
1029
            } else {
1030
                $("#duedatespec").datetimepicker({
1031
                    onClose: function(dateText, inst) {
1032
                        if (validate_date(dateText, inst) ) {
1033
                            $("#barcode").focus();
1034
                        }
1035
                    },
1036
                    hour: 23,
1037
                    minute: 59
1038
                }).on("change", function(e, value) {
1039
                    if ( ! is_valid_date( $(this).val() ) ) {$(this).val("");}
1040
                });
1041
            }
1042
        }
1043
1044
        function Dopop(link) {
1045
            var newin = window.open(link, 'popup', 'width=600,height=400,resizable=1,toolbar=0,scrollbars=1,top');
1046
        }
1047
        $(document).ready(function() {
1048
            $('#mainform').on('submit',function() {
1049
                if ($("#barcode") && $("#barcode").val()) {
1050
                    $('#barcode').on('keypress',function(event) {
1051
                        $('#barcodeSubmittedModal').modal();
1052
                        event.preventDefault(); }
1053
                    );
1054
                }
1055
            });
1056
1057
            if ( $('#clubs-tab').length ) {
1058
                $('#clubs-tab-link').on('click', function() {
1059
                    $('#clubs-tab').text(_("Loading..."));
1060
                    $('#clubs-tab').load('/cgi-bin/koha/clubs/patron-clubs-tab.pl?borrowernumber=[% borrowernumber %]');
1061
                });
1062
            }
1063
1064
            [% IF !( CircAutoPrintQuickSlip == 'clear' ) %]
1065
                // listen submit to trigger qslip on empty checkout
1066
                $('#mainform').bind('submit',function() {
1067
                    if ($('#barcode').val() == '') {
1068
                        return printx_window( '[% CircAutoPrintQuickSlip %]' );
1069
                    }
1070
                });
1071
            [% END %]
1072
            toggle_onsite_checkout();
1073
            $("#onsite_checkout").click(function(){
1074
                toggle_onsite_checkout();
1075
            });
1076
1077
            $("#suspend_until").datepicker({
1078
                onClose: function(dateText, inst) {
1079
                    validate_date(dateText, inst);
1080
                },
1081
                minDate: 1, // require that hold suspended until date is after today
1082
            });
1083
1084
            [% IF HIGHHOLDS %]
1085
                [% IF !override_high_holds %]
1086
                    $("input[name=duedatespec]:hidden").val('[% HIGHHOLDS.returndate %]');
1087
                    if ('[% duedatespec %]' === '') {
1088
                        $("input[name=restoreduedatespec]:hidden").val('highholds_empty');
1089
                    } else {
1090
                        $("input[name=restoreduedatespec]:hidden").val('[% duedatespec %]');
1091
                    }
1092
                [% END %]
1093
1094
                $("#override_high_holds_tmp").on( 'change', function() {
1095
                    if ( this.checked ) {
1096
                        $("input[name=duedatespec]:hidden").val('');
1097
                    }
1098
                });
1099
            [% END %]
1100
        });
1101
    </script>
1102
    <script type="text/javascript" src="[% interface %]/[% theme %]/js/members-menu.js"></script>
1103
[% END %]
1104
1098
[% INCLUDE 'intranet-bottom.inc' %]
1105
[% INCLUDE 'intranet-bottom.inc' %]
1099
- 

Return to bug 19641