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 74-80 Link Here
74
                <legend>Add manual restriction</legend>
74
                <legend>Add manual restriction</legend>
75
                <ol>
75
                <ol>
76
                    <li><label for="rcomment">Comment:</label> <input type="text" id="rcomment" name="comment" /></li>
76
                    <li><label for="rcomment">Comment:</label> <input type="text" id="rcomment" name="comment" /></li>
77
                    <li><label for="rexpiration">Expiration:</label> <input name="expiration" id="rexpiration" size="10" readonly="readonly" value="" class="datepicker" />
77
                    <li><label for="rexpiration">Expiration:</label> <input name="expiration" id="rexpiration" size="10" value="" class="datepicker" />
78
                        <a href='#' onclick="document.getElementById('expiration').value='';">Clear date</a></li>
78
                        <a href='#' onclick="document.getElementById('expiration').value='';">Clear date</a></li>
79
                </ol>
79
                </ol>
80
            <fieldset class="action"><input type="submit" value="Add restriction" /> <a href="#" class="cancel" id="cancel_manual_restriction">Cancel</a></fieldset>
80
            <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 87-93 $.datepicker.setDefaults({ Link Here
87
        selectOtherMonths: true
105
        selectOtherMonths: true
88
    });
106
    });
89
107
90
    $( ".datepicker" ).datepicker();
108
    $( ".datepicker" ).datepicker({
109
        onClose: function(dateText, inst) {
110
            validate_date(dateText, inst);
111
        },
112
    });
91
    // http://jqueryui.com/demos/datepicker/#date-range
113
    // http://jqueryui.com/demos/datepicker/#date-range
92
    var dates = $( ".datepickerfrom, .datepickerto" ).datepicker({
114
    var dates = $( ".datepickerfrom, .datepickerto" ).datepicker({
93
        changeMonth: true,
115
        changeMonth: true,
Lines 100-106 $.datepicker.setDefaults({ Link Here
100
                    $.datepicker._defaults.dateFormat,
122
                    $.datepicker._defaults.dateFormat,
101
                    selectedDate, instance.settings );
123
                    selectedDate, instance.settings );
102
            dates.not( this ).datepicker( "option", option, date );
124
            dates.not( this ).datepicker( "option", option, date );
103
        }
125
        },
126
        onClose: function(dateText, inst) {
127
            validate_date(dateText, inst);
128
        },
104
    });
129
    });
105
});
130
});
106
//]]>
131
//]]>
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/checkouts-table-footer.inc (-1 / +1 lines)
Lines 5-11 Link Here
5
        <td id="totalfine">[% finetotal %]</td>
5
        <td id="totalfine">[% finetotal %]</td>
6
        <td id="totalprice">[% totalprice %]</td>
6
        <td id="totalprice">[% 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/js/pages/circulation.js (-1 / +8 lines)
Lines 31-42 $(document).ready(function() { Link Here
31
    });
31
    });
32
32
33
    $("#newduedate").datetimepicker({
33
    $("#newduedate").datetimepicker({
34
        onClose: function(dateText, inst) {
35
            validate_date(dateText, inst);
36
        },
34
        minDate: 1, // require that renewal date is after today
37
        minDate: 1, // require that renewal date is after today
35
        hour: 23,
38
        hour: 23,
36
        minute: 59
39
        minute: 59
37
    });
40
    });
38
    $("#duedatespec").datetimepicker({
41
    $("#duedatespec").datetimepicker({
39
        onClose: function(dateText, inst) { $("#barcode").focus(); },
42
        onClose: function(dateText, inst) {
43
            if ( validate_date(dateText, inst) ) {
44
                $("#barcode").focus();
45
            }
46
        },
40
        hour: 23,
47
        hour: 23,
41
        minute: 59
48
        minute: 59
42
    });
49
    });
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoice.tt (-2 / +2 lines)
Lines 74-83 Link Here
74
        <fieldset class="rows">
74
        <fieldset class="rows">
75
            <ol>
75
            <ol>
76
            <li><label for="shipmentdate">Shipment date:</label>
76
            <li><label for="shipmentdate">Shipment date:</label>
77
                    <input type="text" size="10" id="shipmentdate" name="shipmentdate" value="[% shipmentdate | $KohaDates %]" readonly="readonly" class="datepicker" /></li>
77
                    <input type="text" size="10" id="shipmentdate" name="shipmentdate" value="[% shipmentdate | $KohaDates %]" class="datepicker" /></li>
78
78
79
            <li><label for="billingdate">Billing date:</label>
79
            <li><label for="billingdate">Billing date:</label>
80
                    <input type="text" size="10" id="billingdate" name="billingdate" value="[% billingdate | $KohaDates %]" readonly="readonly" class="datepicker" /></li>
80
                    <input type="text" size="10" id="billingdate" name="billingdate" value="[% billingdate | $KohaDates %]" class="datepicker" /></li>
81
81
82
            <li><label for="shipmentcost">Shipping cost:</label>
82
            <li><label for="shipmentcost">Shipping cost:</label>
83
                    <input type="text" size="10" id="shipmentcost" name="shipmentcost" value="[% shipmentcost %]" /></li>
83
                    <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 68-74 function toggle_onsite_checkout(){ Link Here
68
        [% END %]
68
        [% END %]
69
    } else {
69
    } else {
70
        $("#duedatespec").datetimepicker({
70
        $("#duedatespec").datetimepicker({
71
            onClose: function(dateText, inst) { $("#barcode").focus(); },
71
            onClose: function(dateText, inst) {
72
                if (validate_date(dateText, inst) ) {
73
                    $("#barcode").focus();
74
                }
75
            },
72
            hour: 23,
76
            hour: 23,
73
            minute: 59
77
            minute: 59
74
        });
78
        });
Lines 347-353 $(document).ready(function() { Link Here
347
    [% IF ( DEBT ) %]<input type="hidden" name="debt_confirmed" value="1" />[% END %]
351
    [% IF ( DEBT ) %]<input type="hidden" name="debt_confirmed" value="1" />[% END %]
348
    [% IF ( INVALID_DATE ) %]
352
    [% IF ( INVALID_DATE ) %]
349
    <p>
353
    <p>
350
    <input type="text" size="13" id="duedatespec" name="duedatespec" readonly="readonly" value="[% duedatespec %]" />
354
    <input type="text" size="13" id="duedatespec" name="duedatespec" value="[% duedatespec %]" />
351
    <label for="duedatespec">Due date</label>
355
    <label for="duedatespec">Due date</label>
352
    </p>
356
    </p>
353
    [% ELSE %]
357
    [% ELSE %]
Lines 636-644 No patron matched <span class="ex">[% message %]</span> Link Here
636
            <div class="date-select">
640
            <div class="date-select">
637
                <div class="hint">Specify due date [% INCLUDE 'date-format.inc' %]: </div>
641
                <div class="hint">Specify due date [% INCLUDE 'date-format.inc' %]: </div>
638
                [% IF ( duedatespec ) %]
642
                [% IF ( duedatespec ) %]
639
                    <input type="text" size="13" id="duedatespec" name="duedatespec" value="[% duedatespec %]" readonly="readonly" />
643
                    <input type="text" size="13" id="duedatespec" name="duedatespec" value="[% duedatespec %]" />
640
                [% ELSE %]
644
                [% ELSE %]
641
                    <input type="text" size="13" id="duedatespec" name="duedatespec" value="" readonly="readonly" />
645
                    <input type="text" size="13" id="duedatespec" name="duedatespec" value="" />
642
                [% END %]
646
                [% END %]
643
                <label for="stickyduedate"> Remember for session:</label>
647
                <label for="stickyduedate"> Remember for session:</label>
644
                [% IF ( stickyduedate ) %]
648
                [% IF ( stickyduedate ) %]
Lines 656-662 No patron matched <span class="ex">[% message %]</span> Link Here
656
            [% IF noissues %]
660
            [% IF noissues %]
657
                <div class="onsite-checkout-only">
661
                <div class="onsite-checkout-only">
658
                    <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>
662
                    <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>
659
                    <input type="text" name="duedatespec" id="duedatespec" readonly="readonly" />
663
                    <input type="text" name="duedatespec" id="duedatespec" />
660
                    <input type="hidden" name="onsite_checkout" checked="checked" value="1" />
664
                    <input type="hidden" name="onsite_checkout" checked="checked" value="1" />
661
                </div>
665
                </div>
662
            [% ELSE %]
666
            [% 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 25-31 $(document).ready(function () { Link Here
25
    [% END %]
25
    [% END %]
26
26
27
    $("#return_date_override").datetimepicker({
27
    $("#return_date_override").datetimepicker({
28
        onClose: function(dateText, inst) { $("#barcode").focus(); },
28
        onClose: function(dateText, inst) {
29
            if (validate_date(dateText, inst) ) {
30
                $("#barcode").focus(); },
31
            }
32
        },
29
        defaultDate: -1,
33
        defaultDate: -1,
30
        hour: 23,
34
        hour: 23,
31
        minute: 59,
35
        minute: 59,
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt (-1 / +1 lines)
Lines 979-985 Link Here
979
                        <legend>Add manual restriction</legend>
979
                        <legend>Add manual restriction</legend>
980
                        <ol>
980
                        <ol>
981
                            <li><label for="debarred_comment">Comment: </label><input type="text" id="debarred_comment" name="debarred_comment" onchange="$('#add_debarment').val(1);" /></li>
981
                            <li><label for="debarred_comment">Comment: </label><input type="text" id="debarred_comment" name="debarred_comment" onchange="$('#add_debarment').val(1);" /></li>
982
                            <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);" />
982
                            <li><label for="debarred_expiration">Expiration: </label><input name="debarred_expiration" id="debarred_expiration" size="10" value="" class="datepicker" onchange="$('#add_debarment').val(1);" />
983
                                    <a href='javascript:void(0)' onclick="$('#debarred_expiration').val('');">Clear date</a></li>
983
                                    <a href='javascript:void(0)' onclick="$('#debarred_expiration').val('');">Clear date</a></li>
984
984
985
                        </ol>
985
                        </ol>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt (-5 lines)
Lines 83-93 $(document).ready(function() { Link Here
83
	});[% END %]
83
	});[% END %]
84
84
85
    $("#suspend_until").datepicker({ minDate: 1 }); // require that hold suspended until date is after today
85
    $("#suspend_until").datepicker({ minDate: 1 }); // require that hold suspended until date is after today
86
    $("#newduedate").datetimepicker({
87
        minDate: 1, // require that renewal date is after today
88
        hour: 23,
89
        minute: 59
90
    });
91
 });
86
 });
92
function uncheck_sibling(me){
87
function uncheck_sibling(me){
93
nodename=me.getAttribute("name");
88
nodename=me.getAttribute("name");
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt (-3 / +3 lines)
Lines 412-425 function checkMultiHold() { Link Here
412
	[% IF ( reserve_in_future ) %]
412
	[% IF ( reserve_in_future ) %]
413
	<li>
413
	<li>
414
        <label for="from">Hold starts on date:</label>
414
        <label for="from">Hold starts on date:</label>
415
        <input name="reserve_date" id="from" size="10" readonly="readonly" class="datepickerfrom">
415
        <input name="reserve_date" id="from" size="10" class="datepickerfrom">
416
        <a href="#" id="clear-date-from" class="clear-date">Clear date</a>
416
        <a href="#" id="clear-date-from" class="clear-date">Clear date</a>
417
	</li>
417
	</li>
418
	[% END %]
418
	[% END %]
419
419
420
	<li>
420
	<li>
421
        <label for="to">Hold expires on date:</label>
421
        <label for="to">Hold expires on date:</label>
422
        <input name="expiration_date" id="to" size="10" readonly="readonly" class="datepickerto" />
422
        <input name="expiration_date" id="to" size="10" class="datepickerto" />
423
        <a href="#" id="clear-date-to" class="clear-date">Clear date</a>
423
        <a href="#" id="clear-date-to" class="clear-date">Clear date</a>
424
	</li>
424
	</li>
425
425
Lines 822-828 function checkMultiHold() { Link Here
822
822
823
            [% IF AutoResumeSuspendedHolds %]
823
            [% IF AutoResumeSuspendedHolds %]
824
        <label for="suspend_until_[% reserveloo.reserve_id %]">[% IF ( reserveloo.suspend ) %] on [% ELSE %] until [% END %]</label>
824
        <label for="suspend_until_[% reserveloo.reserve_id %]">[% IF ( reserveloo.suspend ) %] on [% ELSE %] until [% END %]</label>
825
            <input name="suspend_until" id="suspend_until_[% reserveloo.reserve_id %]" size="10" readonly="readonly" value="[% reserveloo.suspend_until | $KohaDates %]" class="datepicker suspend_until_datepicker" />
825
            <input name="suspend_until" id="suspend_until_[% reserveloo.reserve_id %]" size="10" value="[% reserveloo.suspend_until | $KohaDates %]" class="datepicker suspend_until_datepicker" />
826
            <a href='#' onclick="document.getElementById('suspend_until_[% reserveloo.reserve_id %]').value='';">Clear date</a>
826
            <a href='#' onclick="document.getElementById('suspend_until_[% reserveloo.reserve_id %]').value='';">Clear date</a>
827
            [% END %]
827
            [% END %]
828
	[% ELSE %]
828
	[% ELSE %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/modborrowers.tt (-3 / +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 318-324 Link Here
318
                                            [% END %]
319
                                            [% END %]
319
                                            </label>
320
                                            </label>
320
                                            [% IF field.mandatory %]
321
                                            [% IF field.mandatory %]
321
                                                <input type="checkbox" title="This field is mandatory" name="disable_input" value="[% field.name %]" readonly="readonly" onclick="return false;" />
322
                                                <input type="checkbox" title="This field is mandatory" name="disable_input" value="[% field.name %]" onclick="return false;" />
322
                                            [% ELSE %]
323
                                            [% ELSE %]
323
                                                <input type="checkbox" title="Check to delete this field" name="disable_input" value="[% field.name %]" />
324
                                                <input type="checkbox" title="Check to delete this field" name="disable_input" value="[% field.name %]" />
324
                                            [% END %]
325
                                            [% END %]
Lines 337-343 Link Here
337
                                                [% END %]
338
                                                [% END %]
338
                                            [% END %]
339
                                            [% END %]
339
                                            [% IF ( field.type == 'date' ) %]
340
                                            [% IF ( field.type == 'date' ) %]
340
                                                <input type="text" name="[% field.name %]" id="[% field.name %]" value="" size="10" maxlength="10" readonly="readonly" class="datepicker" />
341
                                                <input type="text" name="[% field.name %]" id="[% field.name %]" value="" size="10" maxlength="10" class="datepicker" />
341
                                                <a href="#" class="clear-field" onclick="clearDate('[% field.name %]');return false;">Clear</a>
342
                                                <a href="#" class="clear-field" onclick="clearDate('[% field.name %]');return false;">Clear</a>
342
                                            [% END %]
343
                                            [% END %]
343
                                            [% IF field.mandatory %]
344
                                            [% IF field.mandatory %]
344
- 

Return to bug 14060