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

(-)a/C4/Auth.pm (-9 / +1 lines)
Lines 300-314 sub get_template_and_user { Link Here
300
 	}
300
 	}
301
301
302
    if(C4::Context->preference('dateformat')){
302
    if(C4::Context->preference('dateformat')){
303
        if(C4::Context->preference('dateformat') eq "metric"){
303
        $template->param(dateformat => C4::Context->preference('dateformat'))
304
            $template->param(dateformat_metric => 1);
305
        } elsif(C4::Context->preference('dateformat') eq "us"){
306
            $template->param(dateformat_us => 1);
307
        } else {
308
            $template->param(dateformat_iso => 1);
309
        }
310
    } else {
311
        $template->param(dateformat_iso => 1);
312
    }
304
    }
313
305
314
    # these template parameters are set the same regardless of $in->{'type'}
306
    # these template parameters are set the same regardless of $in->{'type'}
(-)a/acqui/booksellers.pl (-1 lines)
Lines 148-154 $template->param( Link Here
148
    loop_suppliers => $loop_suppliers,
148
    loop_suppliers => $loop_suppliers,
149
    supplier       => ( $booksellerid || $supplier ),
149
    supplier       => ( $booksellerid || $supplier ),
150
    count          => $supplier_count,
150
    count          => $supplier_count,
151
    dateformat     => C4::Context->preference('dateformat'),
152
);
151
);
153
152
154
output_html_with_http_headers $query, $cookie, $template->output;
153
output_html_with_http_headers $query, $cookie, $template->output;
(-)a/acqui/histsearch.pl (-2 lines)
Lines 132-139 $template->param( Link Here
132
    basketgroupname         => $basketgroupname,
132
    basketgroupname         => $basketgroupname,
133
    from_placed_on          => $from_date,
133
    from_placed_on          => $from_date,
134
    to_placed_on            => $to_date,
134
    to_placed_on            => $to_date,
135
    DHTMLcalendar_dateformat=> C4::Dates->DHTMLcalendar(),
136
    dateformat              => C4::Dates->new()->format(),
137
    debug                   => $debug || $input->param('debug') || 0,
135
    debug                   => $debug || $input->param('debug') || 0,
138
    uc(C4::Context->preference("marcflavour")) => 1
136
    uc(C4::Context->preference("marcflavour")) => 1
139
);
137
);
(-)a/acqui/invoice.pl (-1 lines)
Lines 195-201 $template->param( Link Here
195
    total_quantity   => $total_quantity,
195
    total_quantity   => $total_quantity,
196
    invoiceincgst    => $bookseller->{invoiceincgst},
196
    invoiceincgst    => $bookseller->{invoiceincgst},
197
    currency         => $bookseller->{listprice},
197
    currency         => $bookseller->{listprice},
198
    DHTMLcalendar_dateformat => C4::Dates->DHTMLcalendar(),
199
    budgets_loop             => \@budgets_loop,
198
    budgets_loop             => \@budgets_loop,
200
);
199
);
201
200
(-)a/acqui/invoices.pl (-1 lines)
Lines 151-157 $template->param( Link Here
151
    branchname               => $branchname,
151
    branchname               => $branchname,
152
    suppliers_loop           => \@suppliers_loop,
152
    suppliers_loop           => \@suppliers_loop,
153
    branches_loop            => \@branches_loop,
153
    branches_loop            => \@branches_loop,
154
    DHTMLcalendar_dateformat => C4::Dates->DHTMLcalendar(),
155
);
154
);
156
155
157
output_html_with_http_headers $input, $cookie, $template->output;
156
output_html_with_http_headers $input, $cookie, $template->output;
(-)a/acqui/lateorders.pl (-1 lines)
Lines 173-178 $template->param( Link Here
173
    estimateddeliverydateto   => $estimateddeliverydateto,
173
    estimateddeliverydateto   => $estimateddeliverydateto,
174
	total => $total,
174
	total => $total,
175
	intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
175
	intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
176
    DHTMLcalendar_dateformat => C4::Dates->DHTMLcalendar(),
177
);
176
);
178
output_html_with_http_headers $input, $cookie, $template->output;
177
output_html_with_http_headers $input, $cookie, $template->output;
(-)a/acqui/parcels.pl (-1 lines)
Lines 175-181 $template->param( Link Here
175
    dateto                   => $dateto,
175
    dateto                   => $dateto,
176
    resultsperpage           => $resultsperpage,
176
    resultsperpage           => $resultsperpage,
177
    name                     => $bookseller->{'name'},
177
    name                     => $bookseller->{'name'},
178
    DHTMLcalendar_dateformat => C4::Dates->DHTMLcalendar(),
179
    shipmentdate_today       => C4::Dates->new()->output(),
178
    shipmentdate_today       => C4::Dates->new()->output(),
180
    booksellerid             => $booksellerid,
179
    booksellerid             => $booksellerid,
181
    GST                      => C4::Context->preference('gist'),
180
    GST                      => C4::Context->preference('gist'),
(-)a/acqui/supplier.pl (-1 lines)
Lines 105-111 if ( $op eq 'display' ) { Link Here
105
        basketcount   => $supplier->{'basketcount'},
105
        basketcount   => $supplier->{'basketcount'},
106
        subscriptioncount   => $supplier->{'subscriptioncount'},
106
        subscriptioncount   => $supplier->{'subscriptioncount'},
107
        contracts     => $contracts,
107
        contracts     => $contracts,
108
        dateformat    => C4::Context->preference("dateformat"),
109
    );
108
    );
110
} elsif ( $op eq 'delete' ) {
109
} elsif ( $op eq 'delete' ) {
111
    # no further message needed for the user
110
    # no further message needed for the user
(-)a/admin/aqbudgetperiods.pl (-3 lines)
Lines 133-139 if ( $op eq 'add_form' ) { Link Here
133
			%$budgetperiod_hash
133
			%$budgetperiod_hash
134
        );
134
        );
135
    } # IF-MOD
135
    } # IF-MOD
136
    $template->param( DHTMLcalendar_dateformat 	=> C4::Dates->DHTMLcalendar(),);
137
}
136
}
138
137
139
elsif ( $op eq 'add_validate' ) {
138
elsif ( $op eq 'add_validate' ) {
Lines 175-181 elsif ( $op eq 'delete_confirmed' ) { Link Here
175
# display the form for duplicating
174
# display the form for duplicating
176
elsif ( $op eq 'duplicate_form'){
175
elsif ( $op eq 'duplicate_form'){
177
    $template->param(
176
    $template->param(
178
        DHTMLcalendar_dateformat 	=> C4::Dates->DHTMLcalendar(),
179
        'duplicate_form' => '1',
177
        'duplicate_form' => '1',
180
        'budget_period_id' => $budget_period_id,
178
        'budget_period_id' => $budget_period_id,
181
    );
179
    );
Lines 291-297 $template->param( Link Here
291
    active_pagination_bar   => $active_pagination_bar,
289
    active_pagination_bar   => $active_pagination_bar,
292
    inactive_pagination_bar => $inactive_pagination_bar,
290
    inactive_pagination_bar => $inactive_pagination_bar,
293
    tab                     => $tab,
291
    tab                     => $tab,
294
    dateformat              => C4::Context->preference('dateformat'),
295
);
292
);
296
293
297
$template->param($op=>1);
294
$template->param($op=>1);
(-)a/admin/aqbudgets.pl (-1 lines)
Lines 217-223 if ($op eq 'add_form') { Link Here
217
    # if no buget_id is passed then its an add
217
    # if no buget_id is passed then its an add
218
    $template->param(
218
    $template->param(
219
        add_validate                  => 1,
219
        add_validate                  => 1,
220
        dateformat                => C4::Dates->new()->visual(),
221
        budget_parent_id    		  => $budget_parent->{'budget_id'},
220
        budget_parent_id    		  => $budget_parent->{'budget_id'},
222
        budget_parent_name    		  => $budget_parent->{'budget_name'},
221
        budget_parent_name    		  => $budget_parent->{'budget_name'},
223
        branchloop_select         => \@branchloop_select,
222
        branchloop_select         => \@branchloop_select,
(-)a/admin/aqcontract.pl (-4 lines)
Lines 51-58 $template->param( Link Here
51
    contractnumber => $contractnumber,
51
    contractnumber => $contractnumber,
52
    booksellerid   => $booksellerid,
52
    booksellerid   => $booksellerid,
53
    booksellername => $bookseller->{name},
53
    booksellername => $bookseller->{name},
54
    DHTMLcalendar_dateformat => C4::Dates->DHTMLcalendar(),
55
    dateformat     => C4::Context->preference("dateformat"),
56
);
54
);
57
55
58
#ADD_FORM: called if $op is 'add_form'. Used to create form to add or  modify a record
56
#ADD_FORM: called if $op is 'add_form'. Used to create form to add or  modify a record
Lines 70-76 if ( $op eq 'add_form' ) { Link Here
70
            contractdescription => $contract->{contractdescription},
68
            contractdescription => $contract->{contractdescription},
71
            contractstartdate => format_date( $contract->{contractstartdate} ),
69
            contractstartdate => format_date( $contract->{contractstartdate} ),
72
            contractenddate   => format_date( $contract->{contractenddate} ),
70
            contractenddate   => format_date( $contract->{contractenddate} ),
73
            DHTMLcalendar_dateformat => C4::Dates->DHTMLcalendar,
74
        );
71
        );
75
    } else {
72
    } else {
76
        $template->param(
73
        $template->param(
Lines 79-85 if ( $op eq 'add_form' ) { Link Here
79
            contractdescription      => undef,
76
            contractdescription      => undef,
80
            contractstartdate        => undef,
77
            contractstartdate        => undef,
81
            contractenddate          => undef,
78
            contractenddate          => undef,
82
            DHTMLcalendar_dateformat => C4::Dates->DHTMLcalendar,
83
        );
79
        );
84
    }
80
    }
85
81
(-)a/admin/categorie.pl (-1 lines)
Lines 130-136 if ($op eq 'add_form') { Link Here
130
				reservefee              => sprintf("%.2f",$data->{'reservefee'}),
130
				reservefee              => sprintf("%.2f",$data->{'reservefee'}),
131
                                hidelostitems           => $data->{'hidelostitems'},
131
                                hidelostitems           => $data->{'hidelostitems'},
132
				category_type           => $data->{'category_type'},
132
				category_type           => $data->{'category_type'},
133
				DHTMLcalendar_dateformat => C4::Dates->DHTMLcalendar(),
134
                SMSSendDriver => C4::Context->preference("SMSSendDriver"),
133
                SMSSendDriver => C4::Context->preference("SMSSendDriver"),
135
                TalkingTechItivaPhone => C4::Context->preference("TalkingTechItivaPhoneNotification"),
134
                TalkingTechItivaPhone => C4::Context->preference("TalkingTechItivaPhoneNotification"),
136
				"type_".$data->{'category_type'} => 1,
135
				"type_".$data->{'category_type'} => 1,
(-)a/circ/circulation.pl (-2 lines)
Lines 735-742 $template->param( Link Here
735
    SpecifyDueDate            => $duedatespec_allow,
735
    SpecifyDueDate            => $duedatespec_allow,
736
    CircAutocompl             => C4::Context->preference("CircAutocompl"),
736
    CircAutocompl             => C4::Context->preference("CircAutocompl"),
737
	AllowRenewalLimitOverride => C4::Context->preference("AllowRenewalLimitOverride"),
737
	AllowRenewalLimitOverride => C4::Context->preference("AllowRenewalLimitOverride"),
738
    dateformat                => C4::Context->preference("dateformat"),
739
    DHTMLcalendar_dateformat  => C4::Dates->DHTMLcalendar(),
740
    export_remove_fields      => C4::Context->preference("ExportRemoveFields"),
738
    export_remove_fields      => C4::Context->preference("ExportRemoveFields"),
741
    export_with_csv_profile   => C4::Context->preference("ExportWithCsvProfile"),
739
    export_with_csv_profile   => C4::Context->preference("ExportWithCsvProfile"),
742
    canned_bor_notes_loop     => $canned_notes,
740
    canned_bor_notes_loop     => $canned_notes,
(-)a/circ/overdue.pl (-1 lines)
Lines 221-227 $template->param( Link Here
221
    borname => $bornamefilter,
221
    borname => $bornamefilter,
222
    order => $order,
222
    order => $order,
223
    showall => $showall,
223
    showall => $showall,
224
    DHTMLcalendar_dateformat => C4::Dates->DHTMLcalendar(),
225
    dateduefrom => $input->param( 'dateduefrom' ) || '',
224
    dateduefrom => $input->param( 'dateduefrom' ) || '',
226
    datedueto   => $input->param( 'datedueto' ) || '',
225
    datedueto   => $input->param( 'datedueto' ) || '',
227
);
226
);
(-)a/circ/pendingreserves.pl (-2 lines)
Lines 201-208 $template->param( Link Here
201
    run_report          => $run_report,
201
    run_report          => $run_report,
202
    reserveloop         => \@reservedata,
202
    reserveloop         => \@reservedata,
203
    "BiblioDefaultView".C4::Context->preference("BiblioDefaultView") => 1,
203
    "BiblioDefaultView".C4::Context->preference("BiblioDefaultView") => 1,
204
    DHTMLcalendar_dateformat    =>  C4::Dates->DHTMLcalendar(),
205
    dateformat                  => C4::Context->preference("dateformat"),
206
    HoldsToPullStartDate        => (C4::Context->preference('HoldsToPullStartDate')?C4::Context->preference('HoldsToPullStartDate'):2),
204
    HoldsToPullStartDate        => (C4::Context->preference('HoldsToPullStartDate')?C4::Context->preference('HoldsToPullStartDate'):2),
207
);
205
);
208
206
(-)a/circ/reserveratios.pl (-1 lines)
Lines 185-191 $template->param( Link Here
185
    to              => $enddate,
185
    to              => $enddate,
186
    ratio           => $ratio,
186
    ratio           => $ratio,
187
    reserveloop     => \@reservedata,
187
    reserveloop     => \@reservedata,
188
    DHTMLcalendar_dateformat =>  C4::Dates->DHTMLcalendar(),
189
);
188
);
190
189
191
output_html_with_http_headers $input, $cookie, $template->output;
190
output_html_with_http_headers $input, $cookie, $template->output;
(-)a/circ/transferstoreceive.pl (-1 lines)
Lines 120-126 foreach my $br ( keys %$branches ) { Link Here
120
$template->param(
120
$template->param(
121
    branchesloop => \@branchesloop,
121
    branchesloop => \@branchesloop,
122
    show_date    => format_date(C4::Dates->today('iso')),
122
    show_date    => format_date(C4::Dates->today('iso')),
123
	'dateformat_' . (C4::Context->preference("dateformat") || '') => 1,
124
	TransfersMaxDaysWarning => C4::Context->preference('TransfersMaxDaysWarning'),
123
	TransfersMaxDaysWarning => C4::Context->preference('TransfersMaxDaysWarning'),
125
	latetransfers => $latetransfers ? 1 : 0,
124
	latetransfers => $latetransfers ? 1 : 0,
126
);
125
);
(-)a/circ/view_holdsqueue.pl (-1 lines)
Lines 58-64 if ( $run_report ) { Link Here
58
        total      => scalar @$items,
58
        total      => scalar @$items,
59
        itemsloop  => $items,
59
        itemsloop  => $items,
60
        run_report => $run_report,
60
        run_report => $run_report,
61
        dateformat => C4::Context->preference("dateformat"),
62
    );
61
    );
63
}
62
}
64
63
(-)a/circ/waitingreserves.pl (-1 lines)
Lines 155-161 $template->param( Link Here
155
    overloop    => \@overloop,
155
    overloop    => \@overloop,
156
    overcount   => $overcount,
156
    overcount   => $overcount,
157
    show_date   => format_date(C4::Dates->today('iso')),
157
    show_date   => format_date(C4::Dates->today('iso')),
158
    dateformat  => C4::Context->preference("dateformat"),
159
    ReservesMaxPickUpDelay => C4::Context->preference('ReservesMaxPickUpDelay')
158
    ReservesMaxPickUpDelay => C4::Context->preference('ReservesMaxPickUpDelay')
160
);
159
);
161
160
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/calendar.inc (-2 / +2 lines)
Lines 37-43 jQuery(function($){ Link Here
37
        dayNamesShort: [_('Sun'), _('Mon'), _('Tue'), _('Wed'), _('Thu'), _('Fri'), _('Sat')],
37
        dayNamesShort: [_('Sun'), _('Mon'), _('Tue'), _('Wed'), _('Thu'), _('Fri'), _('Sat')],
38
        dayNamesMin: [_('Su'),_('Mo'),_('Tu'),_('We'),_('Th'),_('Fr'),_('Sa')],
38
        dayNamesMin: [_('Su'),_('Mo'),_('Tu'),_('We'),_('Th'),_('Fr'),_('Sa')],
39
        weekHeader: _('Wk'),
39
        weekHeader: _('Wk'),
40
        dateFormat: '[% IF ( dateformat_us ) %]mm/dd/yy[% ELSIF ( dateformat_metric ) %]dd/mm/yy[% ELSE %]yy-mm-dd[% END %]',
40
        dateFormat: '[% IF ( dateformat == "us" ) %]mm/dd/yy[% ELSIF ( dateformat == "metric" ) %]dd/mm/yy[% ELSE %]yy-mm-dd[% END %]',
41
        firstDay: [% CalendarFirstDayOfWeek %],
41
        firstDay: [% CalendarFirstDayOfWeek %],
42
        isRTL: [% IF ( bidi ) %]true[% ELSE %]false[% END %],
42
        isRTL: [% IF ( bidi ) %]true[% ELSE %]false[% END %],
43
        showMonthAfterYear: false,
43
        showMonthAfterYear: false,
Lines 75-78 $.datepicker.setDefaults({ Link Here
75
    });
75
    });
76
});
76
});
77
//]]>
77
//]]>
78
</script>
78
</script>
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/date-format.inc (-1 / +1 lines)
Line 1 Link Here
1
[% IF ( dateformat_us ) %](MM/DD/YYYY)[% ELSIF ( dateformat_metric ) %](DD/MM/YYYY)[% ELSE %](YYYY-MM-DD)[% END %]
1
[% IF ( dateformat == "us" ) %](MM/DD/YYYY)[% ELSIF ( dateformat == "metric" ) %](DD/MM/YYYY)[% ELSE %](YYYY-MM-DD)[% END %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt (-14 / +22 lines)
Lines 23-37 Link Here
23
	 $(document).ready(function() {
23
	 $(document).ready(function() {
24
24
25
        $('#patronlists').tabs();
25
        $('#patronlists').tabs();
26
		[% IF ( UseTablesortForCirc ) %]$.tablesorter.defaults.widgets = ['zebra'];
26
        [% IF ( UseTablesortForCirc ) %]
27
		$("#issuest").tablesorter({[% IF ( dateformat_metric ) %]
27
            $.tablesorter.defaults.widgets = ['zebra'];
28
		dateFormat: 'uk',[% END %]
28
            $("#issuest").tablesorter({
29
		headers: { 1: { sorter: 'articles' },6: { sorter: false },7:{sorter:false},8:{sorter:false},9:{sorter:false}}
29
                [% IF ( dateformat == "metric" ) %]
30
		});
30
                    dateFormat: 'uk',
31
		$("#relissuest").tablesorter({[% IF ( dateformat_metric ) %]
31
                [% END %]
32
		dateFormat: 'uk',[% END %]
32
                headers: { 1: { sorter: 'articles' },6: { sorter: false },7:{sorter:false},8:{sorter:false},9:{sorter:false}}
33
		headers: { 1: { sorter: 'articles' },6: { sorter: false },7:{sorter:false},8:{sorter:false},9:{sorter:false}}
33
            });
34
		});
34
            $("#relissuest").tablesorter({
35
                [% IF ( dateformat == "metric" ) %]
36
                    dateFormat: 'uk',
37
                [% END %]
38
                headers: { 1: { sorter: 'articles' },6: { sorter: false },7:{sorter:false},8:{sorter:false},9:{sorter:false}}
39
            });
35
40
36
		//FIXME: Sorting does not work when there are previous checkouts only
41
		//FIXME: Sorting does not work when there are previous checkouts only
37
		// (It works fine when there are only checkouts of the day, or both previous and today checkouts)
42
		// (It works fine when there are only checkouts of the day, or both previous and today checkouts)
Lines 41-51 Link Here
41
		$("#relissuest").bind("sortEnd",function() {
46
		$("#relissuest").bind("sortEnd",function() {
42
		    $("#relprevious").parents("tr").remove();  // 'previous checkouts' header chokes table sorter
47
		    $("#relprevious").parents("tr").remove();  // 'previous checkouts' header chokes table sorter
43
		});
48
		});
44
		$("#holdst").tablesorter({[% IF ( dateformat_metric ) %]
49
            $("#holdst").tablesorter({
45
		dateFormat: 'uk',[% END %]
50
                [% IF ( dateformat == "metric" ) %]
46
			sortList: [[0,0]],
51
                    dateFormat: 'uk',
47
			headers: { 1: { sorter: 'articles' },5: { sorter: false }}
52
                [% END %]
48
		});[% END %]
53
                sortList: [[0,0]],
54
                headers: { 1: { sorter: 'articles' },5: { sorter: false }}
55
            });
56
        [% END %]
49
        [% IF ( AllowRenewalLimitOverride ) %]
57
        [% IF ( AllowRenewalLimitOverride ) %]
50
        $( '#override_limit' ).click( function () {
58
        $( '#override_limit' ).click( function () {
51
            if ( this.checked ) {
59
            if ( this.checked ) {
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/transferstoreceive.tt (-2 / +4 lines)
Lines 13-20 $.tablesorter.addParser({ Link Here
13
$(document).ready(function() {
13
$(document).ready(function() {
14
    [% FOREACH branchesloo IN branchesloop %]
14
    [% FOREACH branchesloo IN branchesloop %]
15
    $.tablesorter.defaults.widgets = ['zebra'];
15
    $.tablesorter.defaults.widgets = ['zebra'];
16
    $("#transferst[% branchesloo.branchcode %]").tablesorter({[% IF ( dateformat_metric ) %]
16
    $("#transferst[% branchesloo.branchcode %]").tablesorter({
17
        dateFormat: 'uk',[% END %]
17
        [% IF ( dateformat == "metric" ) %]
18
            dateFormat: 'uk',
19
        [% END %]
18
        sortList: [[0,0]],
20
        sortList: [[0,0]],
19
        headers: { 1: { sorter: 'articles' }}
21
        headers: { 1: { sorter: 'articles' }}
20
    });
22
    });
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt (-8 / +8 lines)
Lines 278-289 Link Here
278
                <label for="dateofbirth">
278
                <label for="dateofbirth">
279
                [% END %]
279
                [% END %]
280
                Date of birth: </label>
280
                Date of birth: </label>
281
				
281
282
	[% IF ( metric ) %]			
282
        [% IF ( dateformat == "metric" ) %]
283
                <input type="text" id="dateofbirth" name="dateofbirth" size="20" onchange="CheckDate(document.form.dateofbirth);" value="[% IF ( opduplicate ) %][% ELSE %][% dateofbirth %][% END %]" />
283
                <input type="text" id="dateofbirth" name="dateofbirth" size="20" onchange="CheckDate(document.form.dateofbirth);" value="[% IF ( opduplicate ) %][% ELSE %][% dateofbirth %][% END %]" />
284
[% ELSE %]
284
        [% ELSE %]
285
                <input type="text" id="dateofbirth" name="dateofbirth" size="20" value="[% IF ( opduplicate ) %][% ELSE %][% dateofbirth %][% END %]" />
285
                <input type="text" id="dateofbirth" name="dateofbirth" size="20" value="[% IF ( opduplicate ) %][% ELSE %][% dateofbirth %][% END %]" />
286
[% END %]
286
        [% END %]
287
287
288
        [% IF ( mandatorydateofbirth ) %]<span class="required">Required</span>[% END %]
288
        [% IF ( mandatorydateofbirth ) %]<span class="required">Required</span>[% END %]
289
        [% IF ( ERROR_dateofbirth ) %]<span class="required">(Error)</span>[% END %]
289
        [% IF ( ERROR_dateofbirth ) %]<span class="required">(Error)</span>[% END %]
Lines 1077-1087 Link Here
1077
            <label for="from">
1077
            <label for="from">
1078
			[% END %]
1078
			[% END %]
1079
			Registration date: </label>
1079
			Registration date: </label>
1080
			[% IF ( metric ) %]
1080
            [% IF ( dateformat == "metric" ) %]
1081
                <input type="text" id="from" name="dateenrolled"  maxlength="10" size="10" onchange="CheckDate(document.form.dateenrolled);check_manip_date('verify');" value="[% dateenrolled %]" class="datepickerfrom" />
1081
                <input type="text" id="from" name="dateenrolled"  maxlength="10" size="10" onchange="CheckDate(document.form.dateenrolled);check_manip_date('verify');" value="[% dateenrolled %]" class="datepickerfrom" />
1082
			[% ELSE %]
1082
            [% ELSE %]
1083
                <input type="text" id="from" name="dateenrolled"  maxlength="10" size="10" value="[% dateenrolled %]" class="datepickerfrom" />
1083
                <input type="text" id="from" name="dateenrolled"  maxlength="10" size="10" value="[% dateenrolled %]" class="datepickerfrom" />
1084
			[% END %]
1084
            [% END %]
1085
		[% IF ( mandatorydateenrolled ) %]<span class="required">Required</span>[% END %]
1085
		[% IF ( mandatorydateenrolled ) %]<span class="required">Required</span>[% END %]
1086
		[% IF ( ERROR_dateenrolled ) %]<span class="required">(Error)</span>[% END %]
1086
		[% IF ( ERROR_dateenrolled ) %]<span class="required">(Error)</span>[% END %]
1087
		<div class="hint">[% INCLUDE 'date-format.inc' %]</div>
1087
		<div class="hint">[% INCLUDE 'date-format.inc' %]</div>
Lines 1098-1104 Link Here
1098
            <label for="to">
1098
            <label for="to">
1099
			[% END %]
1099
			[% END %]
1100
			Expiry date (leave blank for auto calc) </label>
1100
			Expiry date (leave blank for auto calc) </label>
1101
			[% IF ( metric ) %]
1101
            [% IF ( dateformat == "metric" ) %]
1102
				[% UNLESS ( opadd ) %]
1102
				[% UNLESS ( opadd ) %]
1103
                    <input type="text" id="to" name="dateexpiry" maxlength="10"  size="10" onchange="CheckDate(document.form.dateexpiry);check_manip_date('verify');" value="[% dateexpiry %]" class="datepickerto" />
1103
                    <input type="text" id="to" name="dateexpiry" maxlength="10"  size="10" onchange="CheckDate(document.form.dateexpiry);check_manip_date('verify');" value="[% dateexpiry %]" class="datepickerto" />
1104
				[% ELSE %]
1104
				[% ELSE %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt (-12 / +18 lines)
Lines 23-41 $.tablesorter.addParser({ Link Here
23
$(document).ready(function() {
23
$(document).ready(function() {
24
    $('#finesholdsissues').tabs();
24
    $('#finesholdsissues').tabs();
25
	$.tablesorter.defaults.widgets = ['zebra'];
25
	$.tablesorter.defaults.widgets = ['zebra'];
26
	$("#issuest").tablesorter({[% IF ( dateformat_metric ) %]
26
    $("#issuest").tablesorter({
27
		dateFormat: 'uk',[% END %]
27
        [% IF ( dateformat == "metric" ) %]
28
            dateFormat: 'uk',
29
        [% END %]
30
        headers: { 1: { sorter: 'articles'},8:{sorter:false},9:{sorter:false }}
31
    }); 
32
    $("#relissuest").tablesorter({
33
        [% IF ( dateformat == "metric" ) %]
34
            dateFormat: 'uk',
35
        [% END %]
28
        headers: { 1: { sorter: 'articles'},8:{sorter:false},9:{sorter:false }}
36
        headers: { 1: { sorter: 'articles'},8:{sorter:false},9:{sorter:false }}
29
	}); 
37
    }); 
30
	$("#relissuest").tablesorter({[% IF ( dateformat_metric ) %]
38
    $("#holdst").tablesorter({
31
		dateFormat: 'uk',[% END %]
39
        [% IF ( dateformat == "metric" ) %]
32
		headers: { 1: { sorter: 'articles'},8:{sorter:false},9:{sorter:false }}
40
            dateFormat: 'uk',
33
	}); 
41
        [% END %]
34
	$("#holdst").tablesorter({[% IF ( dateformat_metric ) %]
42
        sortList: [[0,0]],
35
		dateFormat: 'uk',[% END %]
43
        headers: { 1: { sorter: 'articles' },5: { sorter: false }}
36
		sortList: [[0,0]],
44
    }); 
37
		headers: { 1: { sorter: 'articles' },5: { sorter: false }}
38
	}); 
39
    [% IF ( picture ) %]
45
    [% IF ( picture ) %]
40
    // new YAHOO.widget.Button("delpicture");   // FIXME: formatting mismatch between YUI and normal button
46
    // new YAHOO.widget.Button("delpicture");   // FIXME: formatting mismatch between YUI and normal button
41
	$('#delpicture').click(function(){
47
	$('#delpicture').click(function(){
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-collection.tt (-1 / +1 lines)
Lines 59-65 function CheckNone( node ) { Link Here
59
}
59
}
60
$(document).ready(function() {
60
$(document).ready(function() {
61
    $('#subscription_years').tabs();
61
    $('#subscription_years').tabs();
62
    [% IF dateformatmetric %]
62
    [% IF dateformat == "metric" %]
63
      dt_add_type_uk_date();
63
      dt_add_type_uk_date();
64
    [% END %]
64
    [% END %]
65
65
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-add.tt (-3 / +3 lines)
Lines 23-35 function formatDate(myDate) { Link Here
23
    var d = new Array( myDate.getFullYear(), myDate.getMonth() + 1 ,myDate.getDate());
23
    var d = new Array( myDate.getFullYear(), myDate.getMonth() + 1 ,myDate.getDate());
24
    if(d[1].toString().length == 1) { d[1] = '0'+d[1] };
24
    if(d[1].toString().length == 1) { d[1] = '0'+d[1] };
25
    if(d[2].toString().length == 1) { d[2] = '0'+d[2] };
25
    if(d[2].toString().length == 1) { d[2] = '0'+d[2] };
26
    [% IF ( dateformat_us ) %]
26
    [% IF ( dateformat == "us" ) %]
27
        return(d[1] + '/' + d[2] + '/' + d[0]) ;
27
        return(d[1] + '/' + d[2] + '/' + d[0]) ;
28
    [% ELSIF ( dateformat_metric ) %]
28
    [% ELSIF ( dateformat == "metric" ) %]
29
        return(d[2] + '/' + d[1] + '/' + d[0]) ;
29
        return(d[2] + '/' + d[1] + '/' + d[0]) ;
30
    [% ELSE %]
30
    [% ELSE %]
31
        return(''+d[0] + '-' + d[1] + '-' + d[2]) ;
31
        return(''+d[0] + '-' + d[1] + '-' + d[2]) ;
32
    [% END %]    
32
    [% END %]
33
}
33
}
34
34
35
Date.prototype.addDays = function(days) {
35
Date.prototype.addDays = function(days) {
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/holidays.tt (-8 / +8 lines)
Lines 153-159 Link Here
153
153
154
	$(document).ready(function() {
154
	$(document).ready(function() {
155
155
156
[% IF ( dateformat_metric ) %]		$.tablesorter.addParser({ // http://tablesorter.com/docs/example-parsers.html
156
[% IF ( dateformat == "metric" ) %]		$.tablesorter.addParser({ // http://tablesorter.com/docs/example-parsers.html
157
			id: 'shortDates',
157
			id: 'shortDates',
158
			is: function(s){
158
			is: function(s){
159
				return false;
159
				return false;
Lines 173-187 Link Here
173
		$("#branch").change(function(){
173
		$("#branch").change(function(){
174
			changeBranch();
174
			changeBranch();
175
		});
175
		});
176
		$("#holidayexceptions").tablesorter({[% IF ( dateformat_metric ) %]
176
		$("#holidayexceptions").tablesorter({[% IF ( dateformat == "metric" ) %]
177
		  dateFormat: 'uk',[% END %]
177
		  dateFormat: 'uk',[% END %]
178
		  sortList: [[0,0]], widgets: ['zebra']
178
		  sortList: [[0,0]], widgets: ['zebra']
179
		});
179
		});
180
		$("#holidayweeklyrepeatable").tablesorter({[% IF ( dateformat_metric ) %]
180
		$("#holidayweeklyrepeatable").tablesorter({[% IF ( dateformat == "metric" ) %]
181
		  dateFormat: 'uk',[% END %]
181
		  dateFormat: 'uk',[% END %]
182
		  sortList: [[0,0]], widgets: ['zebra']
182
		  sortList: [[0,0]], widgets: ['zebra']
183
		});
183
		});
184
		$("#holidaysyearlyrepeatable").tablesorter({[% IF ( dateformat_metric ) %]
184
		$("#holidaysyearlyrepeatable").tablesorter({[% IF ( dateformat == "metric" ) %]
185
			headers : {
185
			headers : {
186
				0: {
186
				0: {
187
					sorter : 'shortDates'
187
					sorter : 'shortDates'
Lines 189-195 Link Here
189
			},[% END %]
189
			},[% END %]
190
			sortList: [[0,0]], widgets: ['zebra']
190
			sortList: [[0,0]], widgets: ['zebra']
191
		});
191
		});
192
		$("#holidaysunique").tablesorter({[% IF ( dateformat_metric ) %]
192
		$("#holidaysunique").tablesorter({[% IF ( dateformat == "metric" ) %]
193
		  dateFormat: 'uk',[% END %]
193
		  dateFormat: 'uk',[% END %]
194
		  sortList: [[0,0]], widgets: ['zebra']
194
		  sortList: [[0,0]], widgets: ['zebra']
195
		});
195
		});
Lines 281-287 td.repeatableyearly a.ui-state-default, .repeatableyearly { background: #FFFF9 Link Here
281
				<strong>From Date:</strong>
281
				<strong>From Date:</strong>
282
				<span id="showDaynameOutput"></span>, 
282
				<span id="showDaynameOutput"></span>, 
283
				
283
				
284
				[% IF ( dateformat_us ) %]<span id="showMonthOutput"></span>/<span id="showDayOutput"></span>/<span id="showYearOutput"></span>[% ELSIF ( dateformat_metric ) %]<span id="showDayOutput"></span>/<span id="showMonthOutput"></span>/<span id="showYearOutput"></span>[% ELSE %]<span id="showYearOutput"></span>/<span id="showMonthOutput"></span>/<span id="showDayOutput"></span>[% END %]
284
				[% IF ( dateformat == "us" ) %]<span id="showMonthOutput"></span>/<span id="showDayOutput"></span>/<span id="showYearOutput"></span>[% ELSIF ( dateformat == "metric" ) %]<span id="showDayOutput"></span>/<span id="showMonthOutput"></span>/<span id="showYearOutput"></span>[% ELSE %]<span id="showYearOutput"></span>/<span id="showMonthOutput"></span>/<span id="showDayOutput"></span>[% END %]
285
285
286
				<input type="hidden" id="showDayname" name="showDayname" />
286
				<input type="hidden" id="showDayname" name="showDayname" />
287
				<input type="hidden" id="showWeekday" name="showWeekday" />
287
				<input type="hidden" id="showWeekday" name="showWeekday" />
Lines 351-357 td.repeatableyearly a.ui-state-default, .repeatableyearly { background: #FFFF9 Link Here
351
                <strong>From date:</strong>
351
                <strong>From date:</strong>
352
				<span id="newDaynameOutput"></span>, 
352
				<span id="newDaynameOutput"></span>, 
353
353
354
				[% IF ( dateformat_us ) %]<span id="newMonthOutput"></span>/<span id="newDayOutput"></span>/<span id="newYearOutput"></span>[% ELSIF ( dateformat_metric ) %]<span id="newDayOutput"></span>/<span id="newMonthOutput"></span>/<span id="newYearOutput"></span>[% ELSE %]<span id="newYearOutput"></span>/<span id="newMonthOutput"></span>/<span id="newDayOutput"></span>[% END %]
354
				[% IF ( dateformat == "us" ) %]<span id="newMonthOutput"></span>/<span id="newDayOutput"></span>/<span id="newYearOutput"></span>[% ELSIF ( dateformat == "metric" ) %]<span id="newDayOutput"></span>/<span id="newMonthOutput"></span>/<span id="newYearOutput"></span>[% ELSE %]<span id="newYearOutput"></span>/<span id="newMonthOutput"></span>/<span id="newDayOutput"></span>[% END %]
355
355
356
				<input type="hidden" id="newDayname" name="showDayname" />
356
				<input type="hidden" id="newDayname" name="showDayname" />
357
				<input type="hidden" id="newWeekday" name="newWeekday" />
357
				<input type="hidden" id="newWeekday" name="newWeekday" />
Lines 505-511 td.repeatableyearly a.ui-state-default, .repeatableyearly { background: #FFFF9 Link Here
505
<table id="holidaysyearlyrepeatable">
505
<table id="holidaysyearlyrepeatable">
506
<thead>
506
<thead>
507
<tr>
507
<tr>
508
  [% IF ( dateformat_metric ) %]
508
  [% IF ( dateformat == "metric" ) %]
509
  <th class="repeatableyearly">Day/Month</th>
509
  <th class="repeatableyearly">Day/Month</th>
510
  [% ELSE %]
510
  [% ELSE %]
511
  <th class="repeatableyearly">Month/Day</th>
511
  <th class="repeatableyearly">Month/Day</th>
(-)a/koha-tmpl/opac-tmpl/prog/en/modules/sco/sco-main.tt (-1 / +1 lines)
Lines 85-91 $(document).ready(function() { Link Here
85
    [% ELSIF ( timedout ) %] sco_init(1);
85
    [% ELSIF ( timedout ) %] sco_init(1);
86
    [% END %]
86
    [% END %]
87
    $("#loanTable").tablesorter({
87
    $("#loanTable").tablesorter({
88
        [% IF ( dateformat_metric ) %]
88
        [% IF ( dateformat == "metric" ) %]
89
            dateFormat: 'uk',
89
            dateFormat: 'uk',
90
        [% END %]
90
        [% END %]
91
        widgets:   ['zebra'],
91
        widgets:   ['zebra'],
(-)a/labels/label-item-search.pl (-1 lines)
Lines 250-254 else { Link Here
250
}
250
}
251
251
252
# Print the page
252
# Print the page
253
$template->param( DHTMLcalendar_dateformat => C4::Dates->DHTMLcalendar(), );
254
output_html_with_http_headers $query, $cookie, $template->output;
253
output_html_with_http_headers $query, $cookie, $template->output;
(-)a/members/memberentry.pl (-3 lines)
Lines 704-710 $template->param( debug => $debug ) if $debug; Link Here
704
$template->param(
704
$template->param(
705
  BorrowerMandatoryField => C4::Context->preference("BorrowerMandatoryField"),#field to test with javascript
705
  BorrowerMandatoryField => C4::Context->preference("BorrowerMandatoryField"),#field to test with javascript
706
  category_type => $category_type,#to know the category type of the borrower
706
  category_type => $category_type,#to know the category type of the borrower
707
  DHTMLcalendar_dateformat => C4::Dates->DHTMLcalendar(),
708
  select_city => $select_city,
707
  select_city => $select_city,
709
  "$category_type"  => 1,# associate with step to know where u are
708
  "$category_type"  => 1,# associate with step to know where u are
710
  destination   => $destination,#to know wher u come from and wher u must go in redirect
709
  destination   => $destination,#to know wher u come from and wher u must go in redirect
Lines 723-730 $template->param( Link Here
723
  borrotitlepopup => $borrotitlepopup,
722
  borrotitlepopup => $borrotitlepopup,
724
  guarantorinfo   => $guarantorinfo,
723
  guarantorinfo   => $guarantorinfo,
725
  flagloop  => \@flagdata,
724
  flagloop  => \@flagdata,
726
  dateformat      => C4::Dates->new()->visual(),
727
  C4::Context->preference('dateformat') => 1,
728
  check_categorytype =>$check_categorytype,#to recover the category type with checkcategorytype function
725
  check_categorytype =>$check_categorytype,#to recover the category type with checkcategorytype function
729
  category_type =>$category_type,
726
  category_type =>$category_type,
730
  modify          => $modify,
727
  modify          => $modify,
(-)a/members/moremember.pl (-4 lines)
Lines 406-412 $template->param( $data->{'categorycode'} => 1 ); Link Here
406
$template->param(
406
$template->param(
407
    detailview => 1,
407
    detailview => 1,
408
    AllowRenewalLimitOverride => C4::Context->preference("AllowRenewalLimitOverride"),
408
    AllowRenewalLimitOverride => C4::Context->preference("AllowRenewalLimitOverride"),
409
    DHTMLcalendar_dateformat => C4::Dates->DHTMLcalendar(),
410
    CANDELETEUSER    => $candeleteuser,
409
    CANDELETEUSER    => $candeleteuser,
411
    roaddetails     => $roaddetails,
410
    roaddetails     => $roaddetails,
412
    borrowernumber  => $borrowernumber,
411
    borrowernumber  => $borrowernumber,
Lines 424-432 $template->param( Link Here
424
    error           => $error,
423
    error           => $error,
425
    StaffMember     => ($category_type eq 'S'),
424
    StaffMember     => ($category_type eq 'S'),
426
    is_child        => ($category_type eq 'C'),
425
    is_child        => ($category_type eq 'C'),
427
#   reserveloop     => \@reservedata,
428
    dateformat      => C4::Context->preference("dateformat"),
429
    "dateformat_" . (C4::Context->preference("dateformat") || '') => 1,
430
    samebranch     => $samebranch,
426
    samebranch     => $samebranch,
431
    quickslip		  => $quickslip,
427
    quickslip		  => $quickslip,
432
    activeBorrowerRelationship => (C4::Context->preference('borrowerRelationship') ne ''),
428
    activeBorrowerRelationship => (C4::Context->preference('borrowerRelationship') ne ''),
(-)a/opac/opac-reserve.pl (-2 lines)
Lines 568-574 if ( Link Here
568
    );
568
    );
569
}
569
}
570
570
571
$template->param( DHTMLcalendar_dateformat  => C4::Dates->DHTMLcalendar() );
572
573
output_html_with_http_headers $query, $cookie, $template->output;
571
output_html_with_http_headers $query, $cookie, $template->output;
574
572
(-)a/opac/opac-search-history.pl (-2 lines)
Lines 45-52 my ($template, $loggedinuser, $cookie) Link Here
45
                                debug => 1,
45
                                debug => 1,
46
                                });
46
                                });
47
47
48
$template->param(dateformat => C4::Context->preference("dateformat"));
49
50
# If the user is not logged in, we deal with the cookie
48
# If the user is not logged in, we deal with the cookie
51
if (!$loggedinuser) {
49
if (!$loggedinuser) {
52
50
(-)a/opac/opac-tags.pl (-2 / +1 lines)
Lines 236-243 if ($loggedinuser) { Link Here
236
	}
236
	}
237
}
237
}
238
238
239
$template->param(tagsview => 1,
239
$template->param(tagsview => 1);
240
dateformat => C4::Context->preference("dateformat"));
241
240
242
if ($add_op) {
241
if ($add_op) {
243
	my $adds = 0;
242
	my $adds = 0;
(-)a/opac/opac-topissues.pl (-1 lines)
Lines 158-164 if (!$advanced_search_types or $advanced_search_types eq 'itemtypes') { Link Here
158
158
159
$template->param(
159
$template->param(
160
                 itemtypeloop =>\@itemtypesloop,
160
                 itemtypeloop =>\@itemtypesloop,
161
                 dateformat    => C4::Context->preference("dateformat"),
162
                );
161
                );
163
output_html_with_http_headers $input, $cookie, $template->output;
162
output_html_with_http_headers $input, $cookie, $template->output;
164
163
(-)a/opac/opac-user.pl (-2 lines)
Lines 362-371 $template->param( Link Here
362
    patronupdate => $patronupdate,
362
    patronupdate => $patronupdate,
363
    OpacRenewalAllowed => C4::Context->preference("OpacRenewalAllowed"),
363
    OpacRenewalAllowed => C4::Context->preference("OpacRenewalAllowed"),
364
    userview => 1,
364
    userview => 1,
365
    dateformat    => C4::Context->preference("dateformat"),
366
);
365
);
367
366
368
$template->param( DHTMLcalendar_dateformat  => C4::Dates->DHTMLcalendar() );
369
$template->param(
367
$template->param(
370
    SuspendHoldsOpac => C4::Context->preference('SuspendHoldsOpac'),
368
    SuspendHoldsOpac => C4::Context->preference('SuspendHoldsOpac'),
371
    AutoResumeSuspendedHolds => C4::Context->preference('AutoResumeSuspendedHolds'),
369
    AutoResumeSuspendedHolds => C4::Context->preference('AutoResumeSuspendedHolds'),
(-)a/opac/sco/sco-main.pl (-1 lines)
Lines 246-252 if ($borrower->{cardnumber}) { Link Here
246
    $template->param(
246
    $template->param(
247
        inputfocus => $inputfocus,
247
        inputfocus => $inputfocus,
248
        nofines => 1,
248
        nofines => 1,
249
        "dateformat_" . C4::Context->preference('dateformat') => 1,
250
    );
249
    );
251
    if (C4::Context->preference('ShowPatronImageInWebBasedSelfCheck')) {
250
    if (C4::Context->preference('ShowPatronImageInWebBasedSelfCheck')) {
252
        my ($image, $dberror) = GetPatronImage($borrower->{cardnumber});
251
        my ($image, $dberror) = GetPatronImage($borrower->{cardnumber});
(-)a/reports/acquisitions_stats.pl (-1 lines)
Lines 74-80 our $sep = $input->param("sep") // ''; Link Here
74
$sep = "\t" if ($sep eq 'tabulation');
74
$sep = "\t" if ($sep eq 'tabulation');
75
$template->param(
75
$template->param(
76
    do_it                    => $do_it,
76
    do_it                    => $do_it,
77
    DHTMLcalendar_dateformat => C4::Dates->DHTMLcalendar(),
78
);
77
);
79
if ($do_it) {
78
if ($do_it) {
80
    my $results =
79
    my $results =
(-)a/reports/bor_issues_top.pl (-1 lines)
Lines 66-72 my ($template, $borrowernumber, $cookie) Link Here
66
our $sep     = $input->param("sep");
66
our $sep     = $input->param("sep");
67
$sep = "\t" if ($sep eq 'tabulation');
67
$sep = "\t" if ($sep eq 'tabulation');
68
$template->param(do_it => $do_it,
68
$template->param(do_it => $do_it,
69
        DHTMLcalendar_dateformat => C4::Dates->DHTMLcalendar(),
70
        );
69
        );
71
if ($do_it) {
70
if ($do_it) {
72
# Displaying results
71
# Displaying results
(-)a/reports/borrowers_out.pl (-1 lines)
Lines 60-66 my ($template, $borrowernumber, $cookie) Link Here
60
                debug => 1,
60
                debug => 1,
61
                });
61
                });
62
$template->param(do_it => $do_it,
62
$template->param(do_it => $do_it,
63
        DHTMLcalendar_dateformat => C4::Dates->DHTMLcalendar(),
64
        );
63
        );
65
if ($do_it) {
64
if ($do_it) {
66
# Displaying results
65
# Displaying results
(-)a/reports/borrowers_stats.pl (-1 lines)
Lines 140-146 if ($do_it) { Link Here
140
	$template->param(
140
	$template->param(
141
		CGIextChoice => $CGIextChoice,
141
		CGIextChoice => $CGIextChoice,
142
		CGIsepChoice => $CGIsepChoice,
142
		CGIsepChoice => $CGIsepChoice,
143
		DHTMLcalendar_dateformat => C4::Dates->DHTMLcalendar(),
144
    );
143
    );
145
144
146
}
145
}
(-)a/reports/cat_issues_top.pl (-1 lines)
Lines 65-71 my ($template, $borrowernumber, $cookie) Link Here
65
our $sep     = $input->param("sep");
65
our $sep     = $input->param("sep");
66
$sep = "\t" if ($sep eq 'tabulation');
66
$sep = "\t" if ($sep eq 'tabulation');
67
$template->param(do_it => $do_it,
67
$template->param(do_it => $do_it,
68
        DHTMLcalendar_dateformat => C4::Dates->DHTMLcalendar(),
69
        );
68
        );
70
if ($do_it) {
69
if ($do_it) {
71
# Displaying results
70
# Displaying results
(-)a/reports/dictionary.pl (-1 lines)
Lines 124-130 elsif ( $phase eq 'New Term step 4' ) { Link Here
124
		'definition_description' => $definition_description,
124
		'definition_description' => $definition_description,
125
		'columns' => \@column_loop,
125
		'columns' => \@column_loop,
126
		'columnstring' => $columnstring,
126
		'columnstring' => $columnstring,
127
                'DHTMLcalendar_dateformat' => C4::Dates->DHTMLcalendar(),
128
	);
127
	);
129
}
128
}
130
129
(-)a/reports/guided_reports.pl (-1 lines)
Lines 776-782 foreach (1..6) { Link Here
776
     $template->{VARS}->{'build' . $_} and $template->{VARS}->{'buildx' . $_} and last;
776
     $template->{VARS}->{'build' . $_} and $template->{VARS}->{'buildx' . $_} and last;
777
}
777
}
778
$template->param(   'referer' => $input->referer(),
778
$template->param(   'referer' => $input->referer(),
779
                    'DHTMLcalendar_dateformat' => C4::Dates->DHTMLcalendar(),
780
                );
779
                );
781
780
782
output_html_with_http_headers $input, $cookie, $template->output;
781
output_html_with_http_headers $input, $cookie, $template->output;
(-)a/reports/issues_avg_stats.pl (-1 lines)
Lines 68-74 my ($template, $borrowernumber, $cookie) Link Here
68
our $sep     = $input->param("sep");
68
our $sep     = $input->param("sep");
69
$sep = "\t" if ($sep eq 'tabulation');
69
$sep = "\t" if ($sep eq 'tabulation');
70
$template->param(do_it => $do_it,
70
$template->param(do_it => $do_it,
71
        DHTMLcalendar_dateformat => C4::Dates->DHTMLcalendar(),
72
    );
71
    );
73
if ($do_it) {
72
if ($do_it) {
74
# Displaying results
73
# Displaying results
(-)a/reports/issues_stats.pl (-1 lines)
Lines 72-78 my ($template, $borrowernumber, $cookie) = get_template_and_user({ Link Here
72
our $sep     = $input->param("sep");
72
our $sep     = $input->param("sep");
73
$sep = "\t" if ($sep eq 'tabulation');
73
$sep = "\t" if ($sep eq 'tabulation');
74
$template->param(do_it => $do_it,
74
$template->param(do_it => $do_it,
75
	DHTMLcalendar_dateformat => C4::Dates->DHTMLcalendar(),
76
);
75
);
77
76
78
my $itemtypes = GetItemTypes();
77
my $itemtypes = GetItemTypes();
(-)a/reports/reserves_stats.pl (-1 lines)
Lines 78-84 my ($template, $borrowernumber, $cookie) = get_template_and_user({ Link Here
78
our $sep     = $input->param("sep") || '';
78
our $sep     = $input->param("sep") || '';
79
$sep = "\t" if ($sep eq 'tabulation');
79
$sep = "\t" if ($sep eq 'tabulation');
80
$template->param(do_it => $do_it,
80
$template->param(do_it => $do_it,
81
	DHTMLcalendar_dateformat => C4::Dates->DHTMLcalendar(),
82
);
81
);
83
82
84
my $itemtypes = GetItemTypes();
83
my $itemtypes = GetItemTypes();
(-)a/reports/stats.screen.pl (-1 lines)
Lines 261-267 else { Link Here
261
        totalwritten => $totalwritten,
261
        totalwritten => $totalwritten,
262
        totalrefund  => $totalrefunds,
262
        totalrefund  => $totalrefunds,
263
        totalcash    => $totalcash,
263
        totalcash    => $totalcash,
264
        DHTMLcalendar_dateformat => C4::Dates->DHTMLcalendar(),
265
    );
264
    );
266
    output_html_with_http_headers $input, $cookie, $template->output;
265
    output_html_with_http_headers $input, $cookie, $template->output;
267
}
266
}
(-)a/reserve/request.pl (-1 lines)
Lines 623-629 foreach my $biblionumber (@biblionumbers) { Link Here
623
623
624
$template->param( biblioloop => \@biblioloop );
624
$template->param( biblioloop => \@biblioloop );
625
$template->param( biblionumbers => $biblionumbers );
625
$template->param( biblionumbers => $biblionumbers );
626
$template->param( DHTMLcalendar_dateformat  => C4::Dates->DHTMLcalendar() );
627
626
628
if ($multihold) {
627
if ($multihold) {
629
    $template->param( multi_hold => 1 );
628
    $template->param( multi_hold => 1 );
(-)a/serials/checkexpiration.pl (-1 lines)
Lines 97-103 if ($date) { Link Here
97
    );
97
    );
98
}
98
}
99
$template->param (
99
$template->param (
100
    DHTMLcalendar_dateformat => C4::Dates->DHTMLcalendar(),
101
    (uc(C4::Context->preference("marcflavour"))) => 1
100
    (uc(C4::Context->preference("marcflavour"))) => 1
102
);
101
);
103
output_html_with_http_headers $query, $cookie, $template->output;
102
output_html_with_http_headers $query, $cookie, $template->output;
(-)a/serials/claims.pl (-2 lines)
Lines 98-105 $template->param( Link Here
98
        claimletter => $claimletter,
98
        claimletter => $claimletter,
99
        supplierloop => \@supplierinfo,
99
        supplierloop => \@supplierinfo,
100
        branchloop   => $branchloop,
100
        branchloop   => $branchloop,
101
        dateformat    => C4::Context->preference("dateformat"),
102
    	DHTMLcalendar_dateformat => C4::Dates->DHTMLcalendar(),
103
        (uc(C4::Context->preference("marcflavour"))) => 1
101
        (uc(C4::Context->preference("marcflavour"))) => 1
104
        );
102
        );
105
output_html_with_http_headers $input, $cookie, $template->output;
103
output_html_with_http_headers $input, $cookie, $template->output;
(-)a/serials/serials-collection.pl (-1 lines)
Lines 172-178 $template->param( Link Here
172
          callnumber	       => $callnumber,
172
          callnumber	       => $callnumber,
173
          uc(C4::Context->preference("marcflavour")) => 1,
173
          uc(C4::Context->preference("marcflavour")) => 1,
174
          serialsadditems   => $subscriptiondescs->[0]{'serialsadditems'},
174
          serialsadditems   => $subscriptiondescs->[0]{'serialsadditems'},
175
          dateformatmetric   => C4::Context->preference("dateformat") eq "metric" ? 1 : 0,
176
          );
175
          );
177
176
178
output_html_with_http_headers $query, $cookie, $template->output;
177
output_html_with_http_headers $query, $cookie, $template->output;
(-)a/serials/subscription-add.pl (-2 lines)
Lines 139-149 for my $thisbranch (sort { $branches->{$a}->{branchname} cmp $branches->{$b}->{b Link Here
139
my $locations_loop = GetAuthorisedValues("LOC",$subs->{'location'});
139
my $locations_loop = GetAuthorisedValues("LOC",$subs->{'location'});
140
140
141
$template->param(branchloop => $branchloop,
141
$template->param(branchloop => $branchloop,
142
    DHTMLcalendar_dateformat => C4::Dates->DHTMLcalendar(),
143
    locations_loop=>$locations_loop,
142
    locations_loop=>$locations_loop,
144
);
143
);
145
# prepare template variables common to all $op conditions:
144
# prepare template variables common to all $op conditions:
146
$template->param(  'dateformat_' . C4::Context->preference('dateformat') => 1 );
147
if ($op!~/^mod/) {
145
if ($op!~/^mod/) {
148
    letter_loop(q{}, $template);
146
    letter_loop(q{}, $template);
149
}
147
}
(-)a/suggestion/suggestion.pl (-2 lines)
Lines 252-258 foreach my $element ( qw(managedby suggestedby acceptedby) ) { Link Here
252
$template->param(
252
$template->param(
253
    %$suggestion_ref,  
253
    %$suggestion_ref,  
254
    "op_$op"                => 1,
254
    "op_$op"                => 1,
255
    dateformat    => C4::Context->preference("dateformat"),
256
    "op"             =>$op,
255
    "op"             =>$op,
257
);
256
);
258
257
Lines 369-373 foreach my $field ( qw(managedby acceptedby suggestedby budgetid) ) { Link Here
369
    $hashlists{ lc($field) . "_loop" } = \@codes_list;
368
    $hashlists{ lc($field) . "_loop" } = \@codes_list;
370
}
369
}
371
$template->param(%hashlists);
370
$template->param(%hashlists);
372
$template->param(DHTMLcalendar_dateformat => C4::Dates->DHTMLcalendar(),);
373
output_html_with_http_headers $input, $cookie, $template->output;
371
output_html_with_http_headers $input, $cookie, $template->output;
(-)a/tags/review.pl (-1 lines)
Lines 207-213 $qstring = "limit=$pagesize" . ($qstring ? '&amp;' . $qstring : ''); Link Here
207
$debug and print STDERR "number of approval_rows: " . scalar(@$tagloop) . "rows\n";
207
$debug and print STDERR "number of approval_rows: " . scalar(@$tagloop) . "rows\n";
208
(scalar @errors) and $template->param(message_loop=>\@errors);
208
(scalar @errors) and $template->param(message_loop=>\@errors);
209
$template->param(
209
$template->param(
210
	DHTMLcalendar_dateformat => C4::Dates->DHTMLcalendar(),
211
	offset => $offset,	# req'd for EXPR
210
	offset => $offset,	# req'd for EXPR
212
	op => $op,
211
	op => $op,
213
	op_count => scalar(@tags),
212
	op_count => scalar(@tags),
(-)a/tools/cleanborrowers.pl (-1 lines)
Lines 163-169 $template->param( Link Here
163
    step1       => '1',
163
    step1       => '1',
164
    filterdate1 => $filterdate1,
164
    filterdate1 => $filterdate1,
165
    filterdate2 => $filterdate2,
165
    filterdate2 => $filterdate2,
166
    DHTMLcalendar_dateformat => C4::Dates->DHTMLcalendar(),
167
);
166
);
168
167
169
#writing the template
168
#writing the template
(-)a/tools/export.pl (-1 lines)
Lines 466-472 else { Link Here
466
    $template->param(
466
    $template->param(
467
        branchloop               => \@branchloop,
467
        branchloop               => \@branchloop,
468
        itemtypeloop             => \@itemtypesloop,
468
        itemtypeloop             => \@itemtypesloop,
469
        DHTMLcalendar_dateformat => C4::Dates->DHTMLcalendar(),
470
        authtypeloop             => \@authtypesloop,
469
        authtypeloop             => \@authtypesloop,
471
        export_remove_fields     => C4::Context->preference("ExportRemoveFields"),
470
        export_remove_fields     => C4::Context->preference("ExportRemoveFields"),
472
    );
471
    );
(-)a/tools/holidays.pl (-1 lines)
Lines 148-154 $template->param( Link Here
148
    keydate                  => $keydate,
148
    keydate                  => $keydate,
149
    branchcodes              => $branchcodes,
149
    branchcodes              => $branchcodes,
150
    branch                   => $branch,
150
    branch                   => $branch,
151
    DHTMLcalendar_dateformat => C4::Dates->DHTMLcalendar(),
152
    branchname               => $branchname,
151
    branchname               => $branchname,
153
    branch                   => $branch,
152
    branch                   => $branch,
154
);
153
);
(-)a/tools/inventory.pl (-1 lines)
Lines 125-131 $statussth =~ s, and $,,g; Link Here
125
 
125
 
126
$template->param(branchloop => \@branch_loop,
126
$template->param(branchloop => \@branch_loop,
127
                authorised_values=>\@authorised_value_list,   
127
                authorised_values=>\@authorised_value_list,   
128
                DHTMLcalendar_dateformat => C4::Dates->DHTMLcalendar(),
129
                today			=>	C4::Dates->today(),
128
                today			=>	C4::Dates->today(),
130
                minlocation => $minlocation,
129
                minlocation => $minlocation,
131
                maxlocation => $maxlocation,
130
                maxlocation => $maxlocation,
(-)a/tools/koha-news.pl (-4 lines)
Lines 118-125 else { Link Here
118
        opac_news_count => $opac_news_count,
118
        opac_news_count => $opac_news_count,
119
		);
119
		);
120
}
120
}
121
$template->param(
122
				DHTMLcalendar_dateformat =>  C4::Dates->DHTMLcalendar(),
123
				dateformat    => C4::Context->preference("dateformat"),
124
		);
125
output_html_with_http_headers $cgi, $cookie, $template->output;
121
output_html_with_http_headers $cgi, $cookie, $template->output;
(-)a/tools/modborrowers.pl (-1 lines)
Lines 228-234 if ( $op eq 'show' ) { Link Here
228
    $template->param('patron_attributes_values', \@patron_attributes_values);
228
    $template->param('patron_attributes_values', \@patron_attributes_values);
229
229
230
    $template->param( fields => \@fields );
230
    $template->param( fields => \@fields );
231
    $template->param( DHTMLcalendar_dateformat => C4::Dates->DHTMLcalendar() );
232
}
231
}
233
232
234
# Process modifications
233
# Process modifications
(-)a/tools/scheduler.pl (-2 lines)
Lines 109-116 $template->param( JOBS => \@jobloop ); Link Here
109
my $time = localtime(time);
109
my $time = localtime(time);
110
$template->param( 'time' => $time );
110
$template->param( 'time' => $time );
111
$template->param(
111
$template->param(
112
    DHTMLcalendar_dateformat => C4::Dates->DHTMLcalendar(),
113
    dateformat               => C4::Dates->new()->format(),
114
    debug                    => $debug,
112
    debug                    => $debug,
115
);
113
);
116
output_html_with_http_headers $input, $cookie, $template->output;
114
output_html_with_http_headers $input, $cookie, $template->output;
(-)a/tools/viewlog.pl (-3 lines)
Lines 100-107 if ($src eq 'circ') { # if we were called from circulation, use the circulatio Link Here
100
}
100
}
101
101
102
$template->param(
102
$template->param(
103
	DHTMLcalendar_dateformat => C4::Dates->DHTMLcalendar(),
104
	              dateformat => C4::Dates->new()->format(),
105
				       debug => $debug,
103
				       debug => $debug,
106
	C4::Search::enabled_staff_search_views,
104
	C4::Search::enabled_staff_search_views,
107
);
105
);
108
- 

Return to bug 9108