diff --git a/C4/Auth.pm b/C4/Auth.pm index ca061b5284..748cca6d62 100644 --- a/C4/Auth.pm +++ b/C4/Auth.pm @@ -301,16 +301,7 @@ sub get_template_and_user { } if(C4::Context->preference('dateformat')){ - $template->param( dateformat => C4::Context->preference('dateformat') ); - if(C4::Context->preference('dateformat') eq "metric"){ - $template->param(dateformat_metric => 1); - } elsif(C4::Context->preference('dateformat') eq "us"){ - $template->param(dateformat_us => 1); - } else { - $template->param(dateformat_iso => 1); - } - } else { - $template->param(dateformat_iso => 1); + $template->param(dateformat => C4::Context->preference('dateformat')) } # these template parameters are set the same regardless of $in->{'type'} diff --git a/acqui/newordersubscription.pl b/acqui/newordersubscription.pl index c44ff3b4ef..70048530bd 100755 --- a/acqui/newordersubscription.pl +++ b/acqui/newordersubscription.pl @@ -102,6 +102,5 @@ $template->param( basketno => $basket->{basketno}, basketname => $basket->{basketname}, booksellername => $bookseller->{name}, - dateformat => C4::Context->preference("dateformat"), ); output_html_with_http_headers $query, $cookie, $template->output; diff --git a/admin/aqbudgets.pl b/admin/aqbudgets.pl index c5f99e3d71..f7dcc754a1 100755 --- a/admin/aqbudgets.pl +++ b/admin/aqbudgets.pl @@ -217,7 +217,6 @@ if ($op eq 'add_form') { # if no buget_id is passed then its an add $template->param( add_validate => 1, - dateformat => C4::Dates->new()->visual(), budget_parent_id => $budget_parent->{'budget_id'}, budget_parent_name => $budget_parent->{'budget_name'}, branchloop_select => \@branchloop_select, diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/calendar.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/calendar.inc index f0552e8c22..13370446a3 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/calendar.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/calendar.inc @@ -37,7 +37,7 @@ jQuery(function($){ dayNamesShort: [_("Sun"), _("Mon"), _("Tue"), _("Wed"), _("Thu"), _("Fri"), _("Sat")], dayNamesMin: [_("Su"),_("Mo"),_("Tu"),_("We"),_("Th"),_("Fr"),_("Sa")], weekHeader: _("Wk"), - dateFormat: '[% IF ( dateformat_us ) %]mm/dd/yy[% ELSIF ( dateformat_metric ) %]dd/mm/yy[% ELSE %]yy-mm-dd[% END %]', + dateFormat: "[% IF ( dateformat == "us" ) %]mm/dd/yy[% ELSIF ( dateformat == "metric" ) %]dd/mm/yy[% ELSE %]yy-mm-dd[% END %]", firstDay: [% CalendarFirstDayOfWeek %], isRTL: [% IF ( bidi ) %]true[% ELSE %]false[% END %], showMonthAfterYear: false, @@ -75,4 +75,4 @@ $.datepicker.setDefaults({ }); }); //]]> - \ No newline at end of file + diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/date-format.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/date-format.inc index 8aafb045f5..53dae716a8 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/date-format.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/date-format.inc @@ -1 +1 @@ -[% IF ( dateformat_us ) %](MM/DD/YYYY)[% ELSIF ( dateformat_metric ) %](DD/MM/YYYY)[% ELSE %](YYYY-MM-DD)[% END %] \ No newline at end of file +[% IF ( dateformat == "us" ) %](MM/DD/YYYY)[% ELSIF ( dateformat == "metric" ) %](DD/MM/YYYY)[% ELSE %](YYYY-MM-DD)[% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt index 0098c09d58..fa9ed0bf5d 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt @@ -274,12 +274,12 @@ - - [% IF ( metric ) %] + + [% IF ( dateformat == "metric" ) %] -[% ELSE %] + [% ELSE %] -[% END %] + [% END %] [% IF ( mandatorydateofbirth ) %]Required[% END %] [% IF ( ERROR_dateofbirth ) %](Error)[% END %] @@ -1087,11 +1087,11 @@ - [% IF ( metric ) %] + [% IF ( dateformat == "metric" ) %] - [% ELSE %] + [% ELSE %] - [% END %] + [% END %] [% IF ( mandatorydateenrolled ) %]Required[% END %] [% IF ( ERROR_dateenrolled ) %](Error)[% END %]
| Day/Month | [% ELSE %]Month/Day | diff --git a/koha-tmpl/opac-tmpl/prog/en/includes/calendar.inc b/koha-tmpl/opac-tmpl/prog/en/includes/calendar.inc index 8a70550b1e..eb660d15e7 100644 --- a/koha-tmpl/opac-tmpl/prog/en/includes/calendar.inc +++ b/koha-tmpl/opac-tmpl/prog/en/includes/calendar.inc @@ -37,7 +37,7 @@ jQuery(function($){ dayNamesShort: [_("Sun"), _("Mon"), _("Tue"), _("Wed"), _("Thu"), _("Fri"), _("Sat")], dayNamesMin: [_("Su"),_("Mo"),_("Tu"),_("We"),_("Th"),_("Fr"),_("Sa")], weekHeader: _("Wk"), - dateFormat: '[% IF ( dateformat_us ) %]mm/dd/yy[% ELSIF ( dateformat_metric ) %]dd/mm/yy[% ELSE %]yy-mm-dd[% END %]', + dateFormat: '[% IF ( dateformat == "us" ) %]mm/dd/yy[% ELSIF ( dateformat == "metric" ) %]dd/mm/yy[% ELSE %]yy-mm-dd[% END %]', firstDay: [% CalendarFirstDayOfWeek %], isRTL: [% IF ( bidi ) %]true[% ELSE %]false[% END %], showMonthAfterYear: false, diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/sco/sco-main.tt b/koha-tmpl/opac-tmpl/prog/en/modules/sco/sco-main.tt index 5190dc71e4..bfd71a2bb2 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/sco/sco-main.tt +++ b/koha-tmpl/opac-tmpl/prog/en/modules/sco/sco-main.tt @@ -75,7 +75,7 @@ $(document).ready(function() { dofocus(); [% IF ( patronid ) %]sco_init();[% END %] $("#loanTable").tablesorter({ - [% IF ( dateformat_metric ) %] + [% IF ( dateformat == "metric" ) %] dateFormat: 'uk', [% END %] widgets: ['zebra'], diff --git a/members/memberentry.pl b/members/memberentry.pl index d2b701d4ab..f51e117e56 100755 --- a/members/memberentry.pl +++ b/members/memberentry.pl @@ -711,8 +711,6 @@ $template->param( borrotitlepopup => $borrotitlepopup, guarantorinfo => $guarantorinfo, flagloop => \@flagdata, - dateformat => C4::Dates->new()->visual(), - C4::Context->preference('dateformat') => 1, check_categorytype =>$check_categorytype,#to recover the category type with checkcategorytype function category_type =>$category_type, modify => $modify, diff --git a/reports/guided_reports.pl b/reports/guided_reports.pl index 46a65f1deb..929feea20a 100755 --- a/reports/guided_reports.pl +++ b/reports/guided_reports.pl @@ -105,7 +105,6 @@ elsif ( $phase eq 'Build new' ) { 'savedreports' => get_saved_reports($filter), 'usecache' => $usecache, 'groups_with_subgroups'=> groups_with_subgroups($group, $subgroup), - dateformat => C4::Context->preference('dateformat'), ); } diff --git a/serials/serials-collection.pl b/serials/serials-collection.pl index ad57e0755b..742849414c 100755 --- a/serials/serials-collection.pl +++ b/serials/serials-collection.pl @@ -172,7 +172,6 @@ $template->param( callnumber => $callnumber, uc(C4::Context->preference("marcflavour")) => 1, serialsadditems => $subscriptiondescs->[0]{'serialsadditems'}, - dateformatmetric => C4::Context->preference("dateformat") eq "metric" ? 1 : 0, ); output_html_with_http_headers $query, $cookie, $template->output;
|---|