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

(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/borrower_debarments.inc (-1 / +1 lines)
Lines 85-91 Link Here
85
                <legend>Add manual restriction</legend>
85
                <legend>Add manual restriction</legend>
86
                <ol>
86
                <ol>
87
                    <li><label for="rcomment">Comment:</label> <input type="text" id="rcomment" name="comment" /></li>
87
                    <li><label for="rcomment">Comment:</label> <input type="text" id="rcomment" name="comment" /></li>
88
                    <li><label for="rexpiration">Expiration:</label> <input name="expiration" id="rexpiration" size="10" readonly="readonly" value="" class="datepicker" />
88
                    <li><label for="rexpiration">Expiration:</label> <input name="expiration" id="rexpiration" size="10" value="" class="datepicker" />
89
                        <a href="#" class="clear-date" id="clear-date-rexpiration">Clear date</a></li>
89
                        <a href="#" class="clear-date" id="clear-date-rexpiration">Clear date</a></li>
90
                </ol>
90
                </ol>
91
            <fieldset class="action"><input type="submit" value="Add restriction" /> <a href="#" class="cancel" id="cancel_manual_restriction">Cancel</a></fieldset>
91
            <fieldset class="action"><input type="submit" value="Add restriction" /> <a href="#" class="cancel" id="cancel_manual_restriction">Cancel</a></fieldset>
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/calendar.inc (-2 / +27 lines)
Lines 6-11 var debug = "[% debug %]"; Link Here
6
var dformat  = "[% dateformat %]";
6
var dformat  = "[% dateformat %]";
7
var sentmsg = 0;
7
var sentmsg = 0;
8
if (debug > 1) {alert("dateformat: " + dformat + "\ndebug is on (level " + debug + ")");}
8
if (debug > 1) {alert("dateformat: " + dformat + "\ndebug is on (level " + debug + ")");}
9
var MSG_PLEASE_ENTER_A_VALID_DATE = ("Please enter a valid date.");
10
11
function validate_date (dateText, inst) {
12
    var dateformat = '[% Koha.Preference('dateformat') %]';
13
    if ( dateformat == 'us' ) {
14
        dateformat = 'mm/dd/yy';
15
    } else if ( dateformat == 'metric' ) {
16
        dateformat = 'dd/mm/yy';
17
    } else if (dateformat == 'iso' ) {
18
        dateformat = 'yy-mm-dd';
19
    }
20
    try {
21
        $.datepicker.parseDate(dateformat, dateText);
22
    } catch (e) {
23
        alert(MSG_PLEASE_ENTER_A_VALID_DATE);
24
        $('#'+inst.id).val('');
25
    };
26
}
9
27
10
function Date_from_syspref(dstring) {
28
function Date_from_syspref(dstring) {
11
        var dateX = dstring.split(/[-/.]/);
29
        var dateX = dstring.split(/[-/.]/);
Lines 89-95 $.datepicker.setDefaults({ Link Here
89
        selectOtherMonths: true
107
        selectOtherMonths: true
90
    });
108
    });
91
109
92
    $( ".datepicker" ).datepicker();
110
    $( ".datepicker" ).datepicker({
111
        onClose: function(dateText, inst) {
112
            validate_date(dateText, inst);
113
        },
114
    });
93
    // http://jqueryui.com/demos/datepicker/#date-range
115
    // http://jqueryui.com/demos/datepicker/#date-range
94
    var dates = $( ".datepickerfrom, .datepickerto" ).datepicker({
116
    var dates = $( ".datepickerfrom, .datepickerto" ).datepicker({
95
        changeMonth: true,
117
        changeMonth: true,
Lines 102-108 $.datepicker.setDefaults({ Link Here
102
                    $.datepicker._defaults.dateFormat,
124
                    $.datepicker._defaults.dateFormat,
103
                    selectedDate, instance.settings );
125
                    selectedDate, instance.settings );
104
            dates.not( this ).datepicker( "option", option, date );
126
            dates.not( this ).datepicker( "option", option, date );
105
        }
127
        },
128
        onClose: function(dateText, inst) {
129
            validate_date(dateText, inst);
130
        },
106
    });
131
    });
107
});
132
});
108
//]]>
133
//]]>
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/checkouts-table-footer.inc (-1 / +1 lines)
Lines 5-11 Link Here
5
        <td id="totalfine" style="text-align: right;">[% finetotal %]</td>
5
        <td id="totalfine" style="text-align: right;">[% finetotal %]</td>
6
        <td id="totalprice" style="text-align: right;">[% totalprice %]</td>
6
        <td id="totalprice" style="text-align: right;">[% totalprice %]</td>
7
                <td colspan="3"><div class="date-select">
7
                <td colspan="3"><div class="date-select">
8
            <p><label for="newduedate">Renewal due date:</label> <input type="text" size="12" id="newduedate" name="newduedate" value="[% newduedate %]" readonly="readonly" />
8
            <p><label for="newduedate">Renewal due date:</label> <input type="text" size="12" id="newduedate" name="newduedate" value="[% newduedate %]" />
9
</p>
9
</p>
10
            <p><label for="exemptfine">Forgive fines on return: <input type="checkbox" id="exemptfine" name="exemptfine" value="1" /></label></p></div>
10
            <p><label for="exemptfine">Forgive fines on return: <input type="checkbox" id="exemptfine" name="exemptfine" value="1" /></label></p></div>
11
		</td>
11
		</td>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoice.tt (-2 / +2 lines)
Lines 77-86 Link Here
77
        <fieldset class="rows">
77
        <fieldset class="rows">
78
            <ol>
78
            <ol>
79
            <li><label for="shipmentdate">Shipment date:</label>
79
            <li><label for="shipmentdate">Shipment date:</label>
80
                    <input type="text" size="10" id="shipmentdate" name="shipmentdate" value="[% shipmentdate | $KohaDates %]" readonly="readonly" class="datepicker" /></li>
80
                    <input type="text" size="10" id="shipmentdate" name="shipmentdate" value="[% shipmentdate | $KohaDates %]" class="datepicker" /></li>
81
81
82
            <li><label for="billingdate">Billing date:</label>
82
            <li><label for="billingdate">Billing date:</label>
83
                    <input type="text" size="10" id="billingdate" name="billingdate" value="[% billingdate | $KohaDates %]" readonly="readonly" class="datepicker" /></li>
83
                    <input type="text" size="10" id="billingdate" name="billingdate" value="[% billingdate | $KohaDates %]" class="datepicker" /></li>
84
84
85
            <li><label for="shipmentcost">Shipping cost:</label>
85
            <li><label for="shipmentcost">Shipping cost:</label>
86
                    <input type="text" size="10" id="shipmentcost" name="shipmentcost" value="[% shipmentcost %]" /></li>
86
                    <input type="text" size="10" id="shipmentcost" name="shipmentcost" value="[% shipmentcost %]" /></li>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoices.tt (-2 / +2 lines)
Lines 180-189 $(document).ready(function() { Link Here
180
                    </table></li>
180
                    </table></li>
181
                    <li><label for="merge_invoicenumber">Invoice number:</label><span id="merge_invoicenumber"></span></li>
181
                    <li><label for="merge_invoicenumber">Invoice number:</label><span id="merge_invoicenumber"></span></li>
182
                    <li><label for="merge_shipmentdate">Shipment date:</label>
182
                    <li><label for="merge_shipmentdate">Shipment date:</label>
183
                            <input type="text" size="10" id="merge_shipmentdate" name="shipmentdate" value="" readonly="readonly" class="datepicker" /></li>
183
                            <input type="text" size="10" id="merge_shipmentdate" name="shipmentdate" value="" class="datepicker" /></li>
184
184
185
                    <li><label for="merge_billingdate">Billing date:</label>
185
                    <li><label for="merge_billingdate">Billing date:</label>
186
                            <input type="text" size="10" id="merge_billingdate" name="billingdate" value="" readonly="readonly" class="datepicker" /></li>
186
                            <input type="text" size="10" id="merge_billingdate" name="billingdate" value="" class="datepicker" /></li>
187
187
188
                    <li><label for="merge_shipmentcost">Shipment cost:</label>
188
                    <li><label for="merge_shipmentcost">Shipment cost:</label>
189
                            <input type="text" size="10" id="merge_shipmentcost" name="shipmentcost" value="" /></li>
189
                            <input type="text" size="10" id="merge_shipmentcost" name="shipmentcost" value="" /></li>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt (-5 / +9 lines)
Lines 71-77 function toggle_onsite_checkout(){ Link Here
71
        [% END %]
71
        [% END %]
72
    } else {
72
    } else {
73
        $("#duedatespec").datetimepicker({
73
        $("#duedatespec").datetimepicker({
74
            onClose: function(dateText, inst) { $("#barcode").focus(); },
74
            onClose: function(dateText, inst) {
75
                if (validate_date(dateText, inst) ) {
76
                    $("#barcode").focus();
77
                }
78
            },
75
            hour: 23,
79
            hour: 23,
76
            minute: 59
80
            minute: 59
77
        });
81
        });
Lines 335-341 $(document).ready(function() { Link Here
335
    [% IF ( DEBT ) %]<input type="hidden" name="debt_confirmed" value="1" />[% END %]
339
    [% IF ( DEBT ) %]<input type="hidden" name="debt_confirmed" value="1" />[% END %]
336
    [% IF ( INVALID_DATE ) %]
340
    [% IF ( INVALID_DATE ) %]
337
    <p>
341
    <p>
338
    <input type="text" size="13" id="duedatespec" name="duedatespec" readonly="readonly" value="[% duedatespec %]" />
342
    <input type="text" size="13" id="duedatespec" name="duedatespec" value="[% duedatespec %]" />
339
    <label for="duedatespec">Due date</label>
343
    <label for="duedatespec">Due date</label>
340
    </p>
344
    </p>
341
    [% ELSE %]
345
    [% ELSE %]
Lines 597-605 No patron matched <span class="ex">[% message | html %]</span> Link Here
597
                <div id="specify-due-date" class="checkout-setting">
601
                <div id="specify-due-date" class="checkout-setting">
598
                    <div class="hint">Specify due date [% INCLUDE 'date-format.inc' %]: </div>
602
                    <div class="hint">Specify due date [% INCLUDE 'date-format.inc' %]: </div>
599
                    [% IF ( duedatespec ) %]
603
                    [% IF ( duedatespec ) %]
600
                        <input type="text" size="13" id="duedatespec" name="duedatespec" value="[% duedatespec %]" readonly="readonly" />
604
                        <input type="text" size="13" id="duedatespec" name="duedatespec" value="[% duedatespec %]" />
601
                    [% ELSE %]
605
                    [% ELSE %]
602
                        <input type="text" size="13" id="duedatespec" name="duedatespec" value="" readonly="readonly" />
606
                        <input type="text" size="13" id="duedatespec" name="duedatespec" value="" />
603
                    [% END %]
607
                    [% END %]
604
                    <label for="stickyduedate"> Remember for session:</label>
608
                    <label for="stickyduedate"> Remember for session:</label>
605
                    [% IF ( stickyduedate ) %]
609
                    [% IF ( stickyduedate ) %]
Lines 647-653 No patron matched <span class="ex">[% message | html %]</span> Link Here
647
                [% IF noissues %]
651
                [% IF noissues %]
648
                    <div class="onsite-checkout-only">
652
                    <div class="onsite-checkout-only">
649
                        <input type="checkbox" id="onsite_checkout" name="onsite_checkout_forced" checked="checked" disabled="disabled" /> <label for="onsite_checkout">On-site checkouts only. Automatic due date: </label>
653
                        <input type="checkbox" id="onsite_checkout" name="onsite_checkout_forced" checked="checked" disabled="disabled" /> <label for="onsite_checkout">On-site checkouts only. Automatic due date: </label>
650
                        <input type="text" name="duedatespec" id="duedatespec" readonly="readonly" />
654
                        <input type="text" name="duedatespec" id="duedatespec" />
651
                        <input type="hidden" name="onsite_checkout" checked="checked" value="1" />
655
                        <input type="hidden" name="onsite_checkout" checked="checked" value="1" />
652
                    </div>
656
                    </div>
653
                [% ELSE %]
657
                [% ELSE %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/offline.tt (-2 / +6 lines)
Lines 553-559 $(document).ready(function () { Link Here
553
        minute: 59
553
        minute: 59
554
    });
554
    });
555
    $("#duedatespec").datetimepicker({
555
    $("#duedatespec").datetimepicker({
556
        onClose: function(dateText, inst) { setTimeout(function() { $('#checkout-barcode').trigger('focus'), 1 }); },
556
        onClose: function(dateText, inst) {
557
            if (validate_date(dateText, inst) ) {
558
                setTimeout(function() { $('#checkout-barcode').trigger('focus'), 1 });
559
            }
560
        },
557
        hour: 23,
561
        hour: 23,
558
        minute: 59
562
        minute: 59
559
    });
563
    });
Lines 690-696 $(document).ready(function () { Link Here
690
694
691
                            <div class="date-select">
695
                            <div class="date-select">
692
                                <div class="hint">Specify due date [% INCLUDE 'date-format.inc' %]: </div>
696
                                <div class="hint">Specify due date [% INCLUDE 'date-format.inc' %]: </div>
693
                                <input type="text" size="13" id="duedatespec" name="duedatespec" value="[% duedatespec %]" readonly="readonly" />
697
                                <input type="text" size="13" id="duedatespec" name="duedatespec" value="[% duedatespec %]" />
694
                                <label for="stickyduedate"> Remember for session:</label>
698
                                <label for="stickyduedate"> Remember for session:</label>
695
                                <input type="checkbox" id="stickyduedate" onclick="this.form.barcode.focus();" name="stickyduedate" checked="checked" />
699
                                <input type="checkbox" id="stickyduedate" onclick="this.form.barcode.focus();" name="stickyduedate" checked="checked" />
696
                                <input type="button" class="action" id="cleardate" value="Clear" name="cleardate" onclick="this.checked = false; this.form.duedatespec.value = ''; this.form.stickyduedate.checked = false; this.form.barcode.focus(); return false;" />
700
                                <input type="button" class="action" id="cleardate" value="Clear" name="cleardate" onclick="this.checked = false; this.form.duedatespec.value = ''; this.form.stickyduedate.checked = false; this.form.barcode.focus(); return false;" />
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt (-1 / +5 lines)
Lines 53-59 $(document).ready(function () { Link Here
53
            }, columns_settings);
53
            }, columns_settings);
54
54
55
    $("#return_date_override").datetimepicker({
55
    $("#return_date_override").datetimepicker({
56
        onClose: function(dateText, inst) { $("#barcode").focus(); },
56
        onClose: function(dateText, inst) {
57
            if (validate_date(dateText, inst) ) {
58
                $("#barcode").focus();
59
            }
60
        },
57
        defaultDate: -1,
61
        defaultDate: -1,
58
        hour: 23,
62
        hour: 23,
59
        minute: 59,
63
        minute: 59,
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt (-1 / +1 lines)
Lines 1003-1009 $(document).ready(function() { Link Here
1003
                        <legend id="manual_restriction_lgd">Add manual restriction</legend>
1003
                        <legend id="manual_restriction_lgd">Add manual restriction</legend>
1004
                        <ol>
1004
                        <ol>
1005
                            <li><label for="debarred_comment">Comment: </label><input type="text" id="debarred_comment" name="debarred_comment" onchange="$('#add_debarment').val(1);" /></li>
1005
                            <li><label for="debarred_comment">Comment: </label><input type="text" id="debarred_comment" name="debarred_comment" onchange="$('#add_debarment').val(1);" /></li>
1006
                            <li><label for="debarred_expiration">Expiration: </label><input name="debarred_expiration" id="debarred_expiration" size="10" readonly="readonly" value="" class="datepicker" onchange="$('#add_debarment').val(1);" />
1006
                            <li><label for="debarred_expiration">Expiration: </label><input name="debarred_expiration" id="debarred_expiration" size="10" value="" class="datepicker" onchange="$('#add_debarment').val(1);" />
1007
                                    <a href='javascript:void(0)' onclick="$('#debarred_expiration').val('');">Clear date</a></li>
1007
                                    <a href='javascript:void(0)' onclick="$('#debarred_expiration').val('');">Clear date</a></li>
1008
1008
1009
                        </ol>
1009
                        </ol>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt (-5 lines)
Lines 84-94 $(document).ready(function() { Link Here
84
	});[% END %]
84
	});[% END %]
85
85
86
    $("#suspend_until").datepicker({ minDate: 1 }); // require that hold suspended until date is after today
86
    $("#suspend_until").datepicker({ minDate: 1 }); // require that hold suspended until date is after today
87
    $("#newduedate").datetimepicker({
88
        minDate: 1, // require that renewal date is after today
89
        hour: 23,
90
        minute: 59
91
    });
92
    $("#view_restrictions").on("click",function(){
87
    $("#view_restrictions").on("click",function(){
93
        $('#debarments-tab-link').click();
88
        $('#debarments-tab-link').click();
94
    });
89
    });
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt (-3 / +3 lines)
Lines 390-403 function checkMultiHold() { Link Here
390
	[% IF ( reserve_in_future ) %]
390
	[% IF ( reserve_in_future ) %]
391
	<li>
391
	<li>
392
        <label for="from">Hold starts on date:</label>
392
        <label for="from">Hold starts on date:</label>
393
        <input name="reserve_date" id="from" size="10" readonly="readonly" class="datepickerfrom">
393
        <input name="reserve_date" id="from" size="10" class="datepickerfrom">
394
        <a href="#" id="clear-date-from" class="clear-date">Clear date</a>
394
        <a href="#" id="clear-date-from" class="clear-date">Clear date</a>
395
	</li>
395
	</li>
396
	[% END %]
396
	[% END %]
397
397
398
	<li>
398
	<li>
399
        <label for="to">Hold expires on date:</label>
399
        <label for="to">Hold expires on date:</label>
400
        <input name="expiration_date" id="to" size="10" readonly="readonly" class="datepickerto" />
400
        <input name="expiration_date" id="to" size="10" class="datepickerto" />
401
        <a href="#" id="clear-date-to" class="clear-date">Clear date</a>
401
        <a href="#" id="clear-date-to" class="clear-date">Clear date</a>
402
	</li>
402
	</li>
403
403
Lines 810-816 function checkMultiHold() { Link Here
810
810
811
            [% IF AutoResumeSuspendedHolds %]
811
            [% IF AutoResumeSuspendedHolds %]
812
                <label for="suspend_until_[% reserveloo.reserve_id %]">[% IF ( reserveloo.suspend ) %] on [% ELSE %] until [% END %]</label>
812
                <label for="suspend_until_[% reserveloo.reserve_id %]">[% IF ( reserveloo.suspend ) %] on [% ELSE %] until [% END %]</label>
813
                <input name="suspend_until" id="suspend_until_[% reserveloo.reserve_id %]" size="10" readonly="readonly" value="[% reserveloo.suspend_until | $KohaDates %]" class="datepicker suspend_until_datepicker" />
813
                <input name="suspend_until" id="suspend_until_[% reserveloo.reserve_id %]" size="10" value="[% reserveloo.suspend_until | $KohaDates %]" class="datepicker suspend_until_datepicker" />
814
                <a href='#' onclick="document.getElementById('suspend_until_[% reserveloo.reserve_id %]').value='';">Clear date</a>
814
                <a href='#' onclick="document.getElementById('suspend_until_[% reserveloo.reserve_id %]').value='';">Clear date</a>
815
            [% ELSE %]
815
            [% ELSE %]
816
                <input type="hidden" name="suspend_until" id="suspend_until_[% reserveloo.reserve_id %]" value=""/>
816
                <input type="hidden" name="suspend_until" id="suspend_until_[% reserveloo.reserve_id %]" value=""/>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/modborrowers.tt (-2 / +3 lines)
Lines 1-3 Link Here
1
[% USE Koha %]
1
[% USE KohaDates %]
2
[% USE KohaDates %]
2
[% INCLUDE 'doc-head-open.inc'%]
3
[% INCLUDE 'doc-head-open.inc'%]
3
<title>Koha &rsaquo; Tools &rsaquo; Batch patron modification</title>
4
<title>Koha &rsaquo; Tools &rsaquo; Batch patron modification</title>
Lines 335-341 Link Here
335
                                            [% END %]
336
                                            [% END %]
336
                                            </label>
337
                                            </label>
337
                                            [% IF field.mandatory %]
338
                                            [% IF field.mandatory %]
338
                                                <input type="checkbox" title="This field is mandatory" name="disable_input" value="[% field.name %]" readonly="readonly" onclick="return false;" />
339
                                                <input type="checkbox" title="This field is mandatory" name="disable_input" value="[% field.name %]" onclick="return false;" />
339
                                            [% ELSE %]
340
                                            [% ELSE %]
340
                                                <input type="checkbox" title="Check to delete this field" name="disable_input" value="[% field.name %]" />
341
                                                <input type="checkbox" title="Check to delete this field" name="disable_input" value="[% field.name %]" />
341
                                            [% END %]
342
                                            [% END %]
Lines 354-360 Link Here
354
                                                [% END %]
355
                                                [% END %]
355
                                            [% END %]
356
                                            [% END %]
356
                                            [% IF ( field.type == 'date' ) %]
357
                                            [% IF ( field.type == 'date' ) %]
357
                                                <input type="text" name="[% field.name %]" id="[% field.name %]" value="" size="10" maxlength="10" readonly="readonly" class="datepicker" />
358
                                                <input type="text" name="[% field.name %]" id="[% field.name %]" value="" size="10" maxlength="10" class="datepicker" />
358
                                                <a href="#" onclick="clearDate('[% field.name %]');return false;"><i class="fa fa-fw fa-trash"></i> Clear</a>
359
                                                <a href="#" onclick="clearDate('[% field.name %]');return false;"><i class="fa fa-fw fa-trash"></i> Clear</a>
359
                                            [% END %]
360
                                            [% END %]
360
                                            [% IF field.mandatory %]
361
                                            [% IF field.mandatory %]
(-)a/koha-tmpl/intranet-tmpl/prog/js/pages/circulation.js (-2 / +8 lines)
Lines 29-40 $(document).ready(function() { Link Here
29
    });
29
    });
30
30
31
    $("#newduedate").datetimepicker({
31
    $("#newduedate").datetimepicker({
32
        onClose: function(dateText, inst) {
33
            validate_date(dateText, inst);
34
        },
32
        minDate: 1, // require that renewal date is after today
35
        minDate: 1, // require that renewal date is after today
33
        hour: 23,
36
        hour: 23,
34
        minute: 59
37
        minute: 59
35
    });
38
    });
36
    $("#duedatespec").datetimepicker({
39
    $("#duedatespec").datetimepicker({
37
        onClose: function(dateText, inst) { $("#barcode").focus(); },
40
        onClose: function(dateText, inst) {
41
            if ( validate_date(dateText, inst) ) {
42
                $("#barcode").focus();
43
            }
44
        },
38
        hour: 23,
45
        hour: 23,
39
        minute: 59
46
        minute: 59
40
    });
47
    });
41
- 

Return to bug 14060