Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/indico/modules/categories/client/js/calendar.js b/indico/modules/categories/client/js/calendar.js
- index 5533706954..351548120b 100644
- --- a/indico/modules/categories/client/js/calendar.js
- +++ b/indico/modules/categories/client/js/calendar.js
- @@ -47,7 +47,9 @@ import 'fullcalendar/dist/fullcalendar.css';
- });
- ajaxDialog({
- dialogClasses: 'all-events-dialog',
- - title: $T.gettext('Events happening on {0}').format(cellInfo.date.format('MMMM Do YYYY')),
- +// Franklin.20191214
- +// title: $T.gettext('Events happening on {0}').format(cellInfo.date.format('MMMM Do YYYY')),
- + title: $T.gettext('Events happening on {0}').format(cellInfo.date.format('YYYYMMMM DD ?')),
- content,
- });
- },
- diff --git a/indico/modules/categories/controllers/display.py b/indico/modules/categories/controllers/display.py
- index 7f8344f4de..667682ac54 100644
- --- a/indico/modules/categories/controllers/display.py
- +++ b/indico/modules/categories/controllers/display.py
- @@ -244,7 +244,9 @@ class RHDisplayCategoryEventsBase(RHDisplayCategoryBase):
- self.now = now_utc(exact=False).astimezone(self.category.display_tzinfo)
- def format_event_date(self, event):
- - day_month = 'dd MMM'
- + # Franklin.20191214
- + #day_month = 'dd MMM'
- + day_month = 'MMMdd?'
- tzinfo = self.category.display_tzinfo
- start_dt = event.start_dt.astimezone(tzinfo)
- end_dt = event.end_dt.astimezone(tzinfo)
- @@ -260,7 +262,9 @@ class RHDisplayCategoryEventsBase(RHDisplayCategoryBase):
- def group_by_month(self, events):
- def _format_tuple(x):
- (year, month), events = x
- - return {'name': format_date(date(year, month, 1), format='MMMM yyyy'),
- + # Franklin.20191214
- + #return {'name': format_date(date(year, month, 1), format='MMMM yyyy'),
- + return {'name': format_date(date(year, month, 1), format='yyyy MMMM'),
- 'events': list(events),
- 'is_current': year == self.now.year and month == self.now.month}
- diff --git a/indico/modules/categories/templates/display/calendar.html b/indico/modules/categories/templates/display/calendar.html
- index 4907dce689..81707939f3 100644
- --- a/indico/modules/categories/templates/display/calendar.html
- +++ b/indico/modules/categories/templates/display/calendar.html
- @@ -16,7 +16,9 @@
- return [date.getDate() == 1, ''];
- },
- onSelect: function(date) {
- - $('#event-calendar').fullCalendar('gotoDate', new moment(date, 'DD/MM/YYYY'));
- +// Franklin.20191214
- +// $('#event-calendar').fullCalendar('gotoDate', new moment(date, 'DD/MM/YYYY'));
- + $('#event-calendar').fullCalendar('gotoDate', new moment(date, 'YYYY/MM/DD'));
- }
- });
- })();
- diff --git a/indico/modules/categories/templates/display/overview/week.html b/indico/modules/categories/templates/display/overview/week.html
- index 5d0f59495e..346b370eb6 100644
- --- a/indico/modules/categories/templates/display/overview/week.html
- +++ b/indico/modules/categories/templates/display/overview/week.html
- @@ -24,7 +24,9 @@
- <tr>
- {% for day, events in events_by_day %}
- <th>
- - {{ day|format_date(format='EEE d MMM') }}
- + <!-- Franklin.20191214 -->
- + <!-- {{ day|format_date(format='EEE d MMM') }} -->
- + {{ day|format_date(format='MMMd??EEE?') }}
- </th>
- {% endfor %}
- </tr>
- diff --git a/indico/modules/designer/placeholders.py b/indico/modules/designer/placeholders.py
- index 33902fd2d1..88d9908401 100644
- --- a/indico/modules/designer/placeholders.py
- +++ b/indico/modules/designer/placeholders.py
- @@ -85,7 +85,9 @@ class EventDatesPlaceholder(DesignerPlaceholder):
- interval = to_unicode(format_datetime(start_dt))
- elif start_dt.date().replace(day=1) == end_dt.date().replace(day=1):
- interval = "{} - {} {}".format(start_dt.day, end_dt.day,
- - to_unicode(format_date(start_dt, format='MMMM yyyy')))
- + # Franklin.20191214
- + #to_unicode(format_date(start_dt, format='MMMM yyyy')))
- + to_unicode(format_date(start_dt, format='yyyy MMMM')))
- return interval
- diff --git a/indico/modules/events/client/js/creation.js b/indico/modules/events/client/js/creation.js
- index 7525de71b7..0c68a9dc63 100644
- --- a/indico/modules/events/client/js/creation.js
- +++ b/indico/modules/events/client/js/creation.js
- @@ -98,8 +98,11 @@ import {camelizeKeys} from 'indico/utils/case';
- if (occurrences && occurrences.length === 1) {
- setLectureTimes(occurrences[0]);
- } else {
- - startDt = moment(`${startDate} ${startTime}`, 'DD/MM/YYYY HH:mm');
- - endDt = moment(`${endDate} ${endTime}`, 'DD/MM/YYYY HH:mm');
- + // Franklin.20191215
- + //startDt = moment(`${startDate} ${startTime}`, 'DD/MM/YYYY HH:mm');
- + //endDt = moment(`${endDate} ${endTime}`, 'DD/MM/YYYY HH:mm');
- + startDt = moment(`${startDate} ${startTime}`, 'YYYY/MM/DD HH:mm');
- + endDt = moment(`${endDate} ${endTime}`, 'YYYY/MM/DD HH:mm');
- }
- }
- @@ -222,11 +225,16 @@ import {camelizeKeys} from 'indico/utils/case';
- const startTime = $('#event-creation-start_dt-time').val();
- const endDate = $('#event-creation-end_dt-date').val();
- const endTime = $('#event-creation-end_dt-time').val();
- - startDt = moment(`${startDate} ${startTime}`, 'DD/MM/YYYY HH:mm');
- - endDt = moment(`${endDate} ${endTime}`, 'DD/MM/YYYY HH:mm');
- + // Franklin.20191215
- + //startDt = moment(`${startDate} ${startTime}`, 'DD/MM/YYYY HH:mm');
- + //endDt = moment(`${endDate} ${endTime}`, 'DD/MM/YYYY HH:mm');
- + startDt = moment(`${startDate} ${startTime}`, 'YYYY/MM/DD HH:mm');
- + endDt = moment(`${endDate} ${endTime}`, 'YYYY/MM/DD HH:mm');
- // workaround for automatic end date update if start date is after end date
- if (endDt.isBefore(startDt)) {
- - endDt = moment(`${startDate} ${endTime}`, 'DD/MM/YYYY HH:mm');
- + // Franklin.20191215
- + //endDt = moment(`${startDate} ${endTime}`, 'DD/MM/YYYY HH:mm');
- + endDt = moment(`${startDate} ${endTime}`, 'YYYY/MM/DD HH:mm');
- }
- updateAvailability();
- });
- @@ -234,21 +242,27 @@ import {camelizeKeys} from 'indico/utils/case';
- $('#event-creation-start_dt-time').on('change', function() {
- const startDate = $('#event-creation-start_dt-date').val();
- const startTime = $('#event-creation-start_dt-time').val();
- - startDt = moment(`${startDate} ${startTime}`, 'DD/MM/YYYY HH:mm');
- + // Franklin.20191215
- + //startDt = moment(`${startDate} ${startTime}`, 'DD/MM/YYYY HH:mm');
- + startDt = moment(`${startDate} ${startTime}`, 'YYYY/MM/DD HH:mm');
- updateAvailability();
- });
- $('#event-creation-end_dt-date').on('change', function() {
- const endDate = $(this).val();
- const endTime = $('#event-creation-end_dt-time').val();
- - endDt = moment(`${endDate} ${endTime}`, 'DD/MM/YYYY HH:mm');
- + // Franklin.20191215
- + //endDt = moment(`${endDate} ${endTime}`, 'DD/MM/YYYY HH:mm');
- + endDt = moment(`${endDate} ${endTime}`, 'YYYY/MM/DD HH:mm');
- updateAvailability();
- });
- $('#event-creation-end_dt-time').on('change', function() {
- const endDate = $('#event-creation-end_dt-date').val();
- const endTime = $(this).val();
- - endDt = moment(`${endDate} ${endTime}`, 'DD/MM/YYYY HH:mm');
- + // Franklin.20191215
- + //endDt = moment(`${endDate} ${endTime}`, 'DD/MM/YYYY HH:mm');
- + endDt = moment(`${endDate} ${endTime}`, 'YYYY/MM/DD HH:mm');
- updateAvailability();
- });
- diff --git a/indico/modules/events/contributions/client/js/index.jsx b/indico/modules/events/contributions/client/js/index.jsx
- index a908692371..edd541b40a 100644
- --- a/indico/modules/events/contributions/client/js/index.jsx
- +++ b/indico/modules/events/contributions/client/js/index.jsx
- @@ -162,7 +162,9 @@ import {indicoAxios, handleAxiosError} from 'indico/utils/axios';
- oldLabelHtml
- .filter('.label')
- // eslint-disable-next-line prefer-template
- - .text(' ' + moment.utc(data.start_dt).format('DD/MM/YYYY HH:mm'));
- + // Franklin.20191215
- + //.text(' ' + moment.utc(data.start_dt).format('DD/MM/YYYY HH:mm'));
- + .text(' ' + moment.utc(data.start_dt).format('YYYY/MM/DD HH:mm'));
- startDateCol.html(oldLabelHtml);
- $this.itempicker('selectItem', oldSession ? oldSession.id : null);
- });
- diff --git a/indico/modules/events/management/templates/_management_frame.html b/indico/modules/events/management/templates/_management_frame.html
- index de0ce5184f..d75fcae404 100644
- --- a/indico/modules/events/management/templates/_management_frame.html
- +++ b/indico/modules/events/management/templates/_management_frame.html
- @@ -23,10 +23,10 @@
- {% endif %}
- {%- endmacro -%}
- -
- +<!-- Franklin.20191215: change from 'd MMM' to 'MMMd?' -->
- {% macro render_event_management_header_right(event, event_types) %}
- - {% set start_date = event.start_dt | format_date('d MMM', timezone=event.tzinfo) %}
- - {% set end_date = event.end_dt | format_date('d MMM', timezone=event.tzinfo) %}
- + {% set start_date = event.start_dt | format_date('MMMd?', timezone=event.tzinfo) %}
- + {% set end_date = event.end_dt | format_date('MMMd?', timezone=event.tzinfo) %}
- <div class="banner full-width">
- <div class="title">
- diff --git a/indico/modules/events/operations.py b/indico/modules/events/operations.py
- index bf9b0903dd..d76bfd9301 100644
- --- a/indico/modules/events/operations.py
- +++ b/indico/modules/events/operations.py
- @@ -94,7 +94,9 @@ def create_event(category, event_type, data, add_creator_as_manager=True, featur
- if booking:
- logger.info('Booking %r created for event %r', booking, event)
- log_data = {'Room': booking.room.full_name,
- - 'Date': booking.start_dt.strftime('%d/%m/%Y'),
- +# Franklin.20191214
- +# 'Date': booking.start_dt.strftime('%d/%m/%Y'),
- + 'Date': booking.start_dt.strftime('%Y/%m/%d'),
- 'Times': '%s - %s' % (booking.start_dt.strftime('%H:%M'), booking.end_dt.strftime('%H:%M'))}
- event.log(EventLogRealm.event, EventLogKind.positive, 'Event', 'Room booked for the event',
- session.user, data=log_data)
- diff --git a/indico/modules/events/registration/client/js/form/field.js b/indico/modules/events/registration/client/js/form/field.js
- index a6349bc4d8..828c91804f 100644
- --- a/indico/modules/events/registration/client/js/form/field.js
- +++ b/indico/modules/events/registration/client/js/form/field.js
- @@ -877,14 +877,20 @@ ndRegForm.directive('ndAccommodationField', function(url) {
- controller: function($scope) {
- $scope.tplInput = url.tpl('fields/accommodation.tpl.html');
- $scope.areArrivalDatesValid = function(data) {
- - return moment(data['arrivalDateTo'], 'DD/MM/YYYY').isSameOrAfter(
- - moment(data['arrivalDateFrom'], 'DD/MM/YYYY')
- + // Franklin.20191215
- + //return moment(data['arrivalDateTo'], 'DD/MM/YYYY').isSameOrAfter(
- + // moment(data['arrivalDateFrom'], 'DD/MM/YYYY')
- + return moment(data['arrivalDateTo'], 'YYYY/MM/DD').isSameOrAfter(
- + moment(data['arrivalDateFrom'], 'YYYY/MM/DD')
- );
- };
- $scope.areDepartureDatesValid = function(data) {
- - return moment(data['departureDateTo'], 'DD/MM/YYYY').isSameOrAfter(
- - moment(data['departureDateFrom'], 'DD/MM/YYYY')
- + // Franklin.20191215
- + //return moment(data['departureDateTo'], 'DD/MM/YYYY').isSameOrAfter(
- + // moment(data['departureDateFrom'], 'DD/MM/YYYY')
- + return moment(data['departureDateTo'], 'YYYY/MM/DD').isSameOrAfter(
- + moment(data['departureDateFrom'], 'YYYY/MM/DD')
- );
- };
- @@ -951,7 +957,9 @@ ndRegForm.directive('ndAccommodationField', function(url) {
- function formatDate(date) {
- if (date) {
- - return moment(date).format('DD/MM/YYYY');
- + // Franklin.20191215
- + //return moment(date).format('DD/MM/YYYY');
- + return moment(date).format('YYYY/MM/DD');
- }
- }
- @@ -963,19 +971,27 @@ ndRegForm.directive('ndAccommodationField', function(url) {
- formatDate(field.arrivalDateFrom) ||
- moment(eventStartDate)
- .subtract(2, 'days')
- - .format('DD/MM/YYYY');
- + //Franklin.20191215
- + //.format('DD/MM/YYYY');
- + .format('YYYY/MM/DD');
- formData.arrivalDateTo =
- - formatDate(field.arrivalDateTo) || moment(eventEndDate).format('DD/MM/YYYY');
- + // Franklin.20191215
- + //formatDate(field.arrivalDateTo) || moment(eventEndDate).format('DD/MM/YYYY');
- + formatDate(field.arrivalDateTo) || moment(eventEndDate).format('YYYY/MM/DD');
- formData.departureDateFrom =
- formatDate(field.departureDateFrom) ||
- moment(eventStartDate)
- .add(1, 'days')
- - .format('DD/MM/YYYY');
- + //Franklin.20191215
- + //.format('DD/MM/YYYY');
- + .format('YYYY/MM/DD');
- formData.departureDateTo =
- formatDate(field.departureDateTo) ||
- moment(eventEndDate)
- .add(3, 'days')
- - .format('DD/MM/YYYY');
- + //Franklin.20191215
- + //.format('DD/MM/YYYY');
- + .format('YYYY/MM/DD');
- _.each(field.choices, function(item, ind) {
- formData.choices[ind] = angular.copy(item);
- });
- diff --git a/indico/modules/events/registration/client/js/form/form.js b/indico/modules/events/registration/client/js/form/form.js
- index 59d2bb9fe2..5a4de78779 100644
- --- a/indico/modules/events/registration/client/js/form/form.js
- +++ b/indico/modules/events/registration/client/js/form/form.js
- @@ -43,6 +43,8 @@ ndRegForm.value('fieldDefaults', {
- defaultPrice: 0,
- defaultMinValue: 0,
- defaultPlacesLimit: 0,
- + //Franklin.20191214
- + //defaultDateFormat: '%d/%m/%Y',
- defaultDateFormat: '%d/%m/%Y',
- defaultPhoneSize: 30,
- });
- diff --git a/indico/modules/events/registration/client/js/form/section.js b/indico/modules/events/registration/client/js/form/section.js
- index 632f62d513..80ed4f4ae6 100644
- --- a/indico/modules/events/registration/client/js/form/section.js
- +++ b/indico/modules/events/registration/client/js/form/section.js
- @@ -308,10 +308,13 @@ ndRegForm.directive('ndSectionDialog', function(url) {
- ndRegForm.filter('possibleDeparture', function() {
- return function(departure, scope) {
- if (scope.accommodation.arrival !== undefined) {
- - var arrival = moment(scope.accommodation.arrival, 'DD/MM/YYY');
- + // Franklin.20191214
- + //var arrival = moment(scope.accommodation.arrival, 'DD/MM/YYY');
- + var arrival = moment(scope.accommodation.arrival, 'YYY/MM/DD');
- var possibleDepartures = {};
- _.each(scope.section.departureDates, function(value, key) {
- - var departure = moment(key, 'DD/MM/YYY');
- + //var departure = moment(key, 'DD/MM/YYY');
- + var departure = moment(key, 'YYY/MM/DD');
- if (arrival.isBefore(departure) || arrival.isSame(departure)) {
- possibleDepartures[key] = value;
- }
- diff --git a/indico/modules/events/registration/fields/choices.py b/indico/modules/events/registration/fields/choices.py
- index 601777b85b..4e1d225911 100644
- --- a/indico/modules/events/registration/fields/choices.py
- +++ b/indico/modules/events/registration/fields/choices.py
- @@ -296,7 +296,9 @@ class MultiChoiceField(ChoiceBaseField):
- def _to_machine_date(date):
- - return datetime.strptime(date, '%d/%m/%Y').strftime('%Y-%m-%d')
- + #Franklin.20191214
- + #return datetime.strptime(date, '%d/%m/%Y').strftime('%Y-%m-%d')
- + return datetime.strptime(date, '%Y/%m/%d').strftime('%Y-%m-%d')
- def _to_date(date):
- diff --git a/indico/modules/events/templates/display/conference/base.html b/indico/modules/events/templates/display/conference/base.html
- index 4fe044af4b..f8d7e920dc 100644
- --- a/indico/modules/events/templates/display/conference/base.html
- +++ b/indico/modules/events/templates/display/conference/base.html
- @@ -3,13 +3,14 @@
- {% from 'events/display/_event_header_message.html' import render_event_header_msg %}
- {% from 'events/layout/_menu.html' import menu_entry_display %}
- +<!-- Franklin.20191215 change from 'MMMM yyyy' to 'yyyy MMMM' -->
- {%- macro _format_event_date(event) -%}
- {% set start_dt = event.start_dt_display.astimezone(event.display_tzinfo) %}
- {% set end_dt = event.end_dt_display.astimezone(event.display_tzinfo) %}
- {% if start_dt.date() == end_dt.date() %}
- {{ start_dt | format_date('long') }}
- {% elif start_dt.year == end_dt.year and start_dt.month == end_dt.month %}
- - {{ start_dt.day }}-{{ end_dt.day }} {{ start_dt | format_date('MMMM yyyy') }}
- + {{ start_dt.day }}-{{ end_dt.day }} {{ start_dt | format_date('yyyy MMMM') }}
- {% else %}
- {% trans start=start_dt|format_date('long'), end=end_dt|format_date('long') -%}
- {{ start }} to {{ end }}
- diff --git a/indico/modules/events/timetable/templates/display/indico/meeting.html b/indico/modules/events/timetable/templates/display/indico/meeting.html
- index 08fd351640..fa47efc484 100644
- --- a/indico/modules/events/timetable/templates/display/indico/meeting.html
- +++ b/indico/modules/events/timetable/templates/display/indico/meeting.html
- @@ -23,7 +23,9 @@
- {% block day_header scoped %}
- <div class="day-header" style="width: 100%;">
- <div class="day-title" data-anchor="{{ anchor }}">
- - {{ item.start_dt | format_date(format='EEEE, d MMMM', timezone=timezone) }}
- + <!-- Franklin.20191214 -->
- + <!-- {{ item.start_dt | format_date(format='EEEE, d MMMM', timezone=timezone) }} -->
- + {{ item.start_dt | format_date(format='MMMMd??EEEE?', timezone=timezone) }}
- </div>
- {% if days %}
- <a class="js-go-to-day icon-calendar arrow js-dropdown" data-toggle="dropdown"></a>
- @@ -31,7 +33,9 @@
- {% for day, _ in days %}
- <li>
- <a href="#day-{{ day.isoformat() }}">
- - {{ day | format_date(format='EEE, d MMM', timezone=timezone) }}
- + <!-- Franklin.20191214 -->
- + <!-- {{ day | format_date(format='EEE, d MMM', timezone=timezone) }} -->
- + {{ day | format_date(format='MMMd??EEE?', timezone=timezone) }}
- </a>
- </li>
- {% endfor %}
- diff --git a/indico/modules/events/timetable/templates/move_entry.html b/indico/modules/events/timetable/templates/move_entry.html
- index 1258cb5e72..c66e2a25c2 100644
- --- a/indico/modules/events/timetable/templates/move_entry.html
- +++ b/indico/modules/events/timetable/templates/move_entry.html
- @@ -9,7 +9,9 @@
- {% for day, entries in top_level_entries.iteritems() | sort %}
- <button class="i-button big day {%- if day == current_day %} highlight{% endif %}"
- data-day="{{ day }}">
- - {{- day | format_date(format='EEE, d MMM') -}}
- + <!-- Franklin.20191214 -->
- + <!-- {{- day | format_date(format='EEE, d MMM') -}} -->
- + {{- day | format_date(format='MMMd??EEE?') -}}
- </button>
- {% endfor %}
- </div>
- diff --git a/indico/modules/rb/client/js/common/timeline/WeeklyTimelineContent.jsx b/indico/modules/rb/client/js/common/timeline/WeeklyTimelineContent.jsx
- index 66cad40575..929d1260d5 100644
- --- a/indico/modules/rb/client/js/common/timeline/WeeklyTimelineContent.jsx
- +++ b/indico/modules/rb/client/js/common/timeline/WeeklyTimelineContent.jsx
- @@ -109,6 +109,7 @@ export default class WeeklyTimelineContent extends DailyTimelineContent {
- renderHeader() {
- const {longLabel, selectable, setDate, setMode} = this.props;
- const labelWidth = longLabel ? 200 : 150;
- + // Franklin.20191214
- return (
- <div
- styleName="baseStyle.timeline-header"
- @@ -128,7 +129,7 @@ export default class WeeklyTimelineContent extends DailyTimelineContent {
- setMode('days');
- }}
- >
- - {toMoment(dt, 'YYYY-MM-DD').format('ddd D MMM')}
- + {toMoment(dt, 'YYYY-MM-DD').format('MMM D ?(ddd)')}
- </span>
- </div>
- ))}
- diff --git a/indico/modules/rb/templates/emails/reservations/creation_email_to_user.txt b/indico/modules/rb/templates/emails/reservations/creation_email_to_user.txt
- index ecc43baf80..da957d53b0 100644
- --- a/indico/modules/rb/templates/emails/reservations/creation_email_to_user.txt
- +++ b/indico/modules/rb/templates/emails/reservations/creation_email_to_user.txt
- @@ -3,12 +3,13 @@
- {% block body -%}
- {%- block booking_details -%}
- +
- The conference room {{ reservation.room.full_name }}
- has been {% block prebooked_prefix %}{% endblock %}booked for {{ reservation.booked_for_name }}
- {% if reservation.repeat_frequency == RepeatFrequency.NEVER -%}
- - on {{ reservation.start_dt | format_date('EEEE dd/MM/yyyy', locale='en_GB') }} from {{ reservation.start_dt | format_time(locale='en_GB') }} to {{ reservation.end_dt | format_time(locale='en_GB') }}.
- + on {{ reservation.start_dt | format_date('yyyy/MM/dd?EEEE?', locale='zh_TW') }} from {{ reservation.start_dt | format_time(locale='zh_TW') }} to {{ reservation.end_dt | format_time(locale='zh_TW') }}.
- {%- else -%}
- - {{ RepeatMapping.get_message(reservation.repeat_frequency, reservation.repeat_interval) }} from {{ reservation.start_dt | format_date('EEEE dd/MM/yyyy', locale='en_GB') }} to {{ reservation.end_dt | format_date('EEEE dd/MM/yyyy', locale='en_GB') }} between {{ reservation.start_dt | format_time(locale='en_GB') }} and {{ reservation.end_dt | format_time(locale='en_GB') }}.
- + {{ RepeatMapping.get_message(reservation.repeat_frequency, reservation.repeat_interval) }} from {{ reservation.start_dt | format_date('yyyy/MM/dd?EEEE?', locale='zh_TW') }} to {{ reservation.end_dt | format_date('yyyy/MM/dd?EEEE?', locale='zh_TW') }} between {{ reservation.start_dt | format_time(locale='zh_TW') }} and {{ reservation.end_dt | format_time(locale='zh_TW') }}.
- {%- endif %}
- Reason: {{ reservation.booking_reason }}
- {%- endblock -%}
- @@ -29,3 +30,5 @@ be instantly notified by e-mail.
- {%- block prebooking_warning %}{% endblock %}
- {%- endblock %}
- +
- +<!-- Franklin.20191214 -->
- diff --git a/indico/modules/rb/templates/emails/reservations/occurrence_cancellation_email_to_manager.txt b/indico/modules/rb/templates/emails/reservations/occurrence_cancellation_email_to_manager.txt
- index d116f1567e..92d6531841 100644
- --- a/indico/modules/rb/templates/emails/reservations/occurrence_cancellation_email_to_manager.txt
- +++ b/indico/modules/rb/templates/emails/reservations/occurrence_cancellation_email_to_manager.txt
- @@ -1,5 +1,5 @@
- {% extends 'rb/emails/reservations/base_email_to_manager.txt' %}
- {% block body -%}
- -The date {{ reservation.start_dt | format_date('EEEE dd/MM/yyyy', locale='en_GB') }} from a booking that concerns one of your rooms has been CANCELLED by the user.
- +The date {{ reservation.start_dt | format_date('yyyy/MM/dd ?EEEE?', locale='zh_TW') }} from a booking that concerns one of your rooms has been CANCELLED by the user.
- {%- endblock %}
- diff --git a/indico/modules/rb/templates/emails/reservations/occurrence_cancellation_email_to_user.txt b/indico/modules/rb/templates/emails/reservations/occurrence_cancellation_email_to_user.txt
- index 8032b1e4eb..4417f00b3d 100644
- --- a/indico/modules/rb/templates/emails/reservations/occurrence_cancellation_email_to_user.txt
- +++ b/indico/modules/rb/templates/emails/reservations/occurrence_cancellation_email_to_user.txt
- @@ -1,7 +1,7 @@
- {% extends 'rb/emails/reservations/base_email_to_user.txt' %}
- {% block body -%}
- -You have CANCELLED an occurrence of your booking on {{ occurrence.start_dt | format_date('EEEE dd/MM/yyyy', locale='en_GB') }}.
- +You have CANCELLED an occurrence of your booking on {{ occurrence.start_dt | format_date('yyyy/MM/dd?EEEE?', locale='zh_TW') }}.
- {% include 'rb/emails/reservations/reservation_info.txt' %}
- {%- endblock %}
- diff --git a/indico/modules/rb/templates/emails/reservations/occurrence_rejection_email_to_manager.txt b/indico/modules/rb/templates/emails/reservations/occurrence_rejection_email_to_manager.txt
- index 60f3d51068..be7554ef68 100644
- --- a/indico/modules/rb/templates/emails/reservations/occurrence_rejection_email_to_manager.txt
- +++ b/indico/modules/rb/templates/emails/reservations/occurrence_rejection_email_to_manager.txt
- @@ -1,7 +1,7 @@
- {% extends 'rb/emails/reservations/base_email_to_manager.txt' %}
- {% block body -%}
- -A booking has been REJECTED by the manager of the room '{{ reservation.room.full_name }}' for the {{ occurrence.start_dt | format_date('EEEE dd/MM/yyyy', locale='en_GB') }}.
- +A booking has been REJECTED by the manager of the room '{{ reservation.room.full_name }}' for the {{ occurrence.start_dt | format_date('yyyy/MM/dd?EEEE?', locale='zh_TW') }}.
- Rejection reason:
- {{ occurrence.rejection_reason }}
- diff --git a/indico/modules/rb/templates/emails/reservations/occurrence_rejection_email_to_user.txt b/indico/modules/rb/templates/emails/reservations/occurrence_rejection_email_to_user.txt
- index 5b8bf60be6..8c21884c87 100644
- --- a/indico/modules/rb/templates/emails/reservations/occurrence_rejection_email_to_user.txt
- +++ b/indico/modules/rb/templates/emails/reservations/occurrence_rejection_email_to_user.txt
- @@ -1,7 +1,7 @@
- {% extends 'rb/emails/reservations/base_email_to_user.txt' %}
- {% block body -%}
- -Your booking has been REJECTED by the manager of the room for the {{ occurrence.start_dt | format_date('EEEE dd/MM/yyyy', locale='en_GB') }}.
- +Your booking has been REJECTED by the manager of the room for the {{ occurrence.start_dt | format_date('yyyy/MM/dd?EEEE?', locale='zh_TW') }}.
- Rejection reason:
- {{ occurrence.rejection_reason }}
- diff --git a/indico/modules/rb/templates/emails/reservations/reminders/finishing_bookings.html b/indico/modules/rb/templates/emails/reservations/reminders/finishing_bookings.html
- index b56e07c702..da025c3b09 100644
- --- a/indico/modules/rb/templates/emails/reservations/reminders/finishing_bookings.html
- +++ b/indico/modules/rb/templates/emails/reservations/reminders/finishing_bookings.html
- @@ -29,7 +29,8 @@
- {% macro _render_dates(reservation) -%}
- - <strong>{{ reservation.start_dt|format_datetime('EEEE dd/MM/yyyy HH:mm', locale='en_GB') }}</strong> - <strong>{{ reservation.end_dt|format_datetime('EEEE dd/MM/yyyy HH:mm', locale='en_GB') }}</strong>
- + <!-- Franklin.20191214 -->
- + <strong>{{ reservation.start_dt|format_datetime('yyyy/MM/dd (EEEE) HH:mm', locale='zh_TW') }}</strong> - <strong>{{ reservation.end_dt|format_datetime('yyyy/MM/dd (EEEE) HH:mm', locale='zh_TW') }}</strong>
- {%- endmacro %}
- diff --git a/indico/modules/rb/templates/emails/reservations/reminders/upcoming_occurrence.html b/indico/modules/rb/templates/emails/reservations/reminders/upcoming_occurrence.html
- index 6a80ae4e26..85d397d9d3 100644
- --- a/indico/modules/rb/templates/emails/reservations/reminders/upcoming_occurrence.html
- +++ b/indico/modules/rb/templates/emails/reservations/reminders/upcoming_occurrence.html
- @@ -29,7 +29,8 @@
- {% macro _render_occurrence(occurrence) -%}
- {% set reservation = occurrence.reservation -%}
- - <strong>{{ occurrence.start_dt | format_date('EEEE dd/MM/yyyy', locale='en_GB') }}</strong> (<strong>{{ _render_time(occurrence) }}</strong>)<br>
- + <!-- Franklin.20191214 -->
- + <strong>{{ occurrence.start_dt | format_date('yyyy/MM/dd (EEEE)', locale='zh_TW') }}</strong> (<strong>{{ _render_time(occurrence) }}</strong>)<br>
- Room: <strong>{{ reservation.room.full_name }}</strong><br>
- Reason: <strong>{{ reservation.booking_reason }}</strong><br>
- <br>
- diff --git a/indico/modules/rb/templates/emails/reservations/reservation_info.txt b/indico/modules/rb/templates/emails/reservations/reservation_info.txt
- index dad3a0bb2e..518fc02c68 100644
- --- a/indico/modules/rb/templates/emails/reservations/reservation_info.txt
- +++ b/indico/modules/rb/templates/emails/reservations/reservation_info.txt
- @@ -1,5 +1,5 @@
- Room: {{ reservation.room.full_name }}
- For: {{ reservation.booked_for_name }}
- Reason: {{ reservation.booking_reason }}
- -Dates: {{ reservation.start_dt | format_date('EEEE dd/MM/yyyy', locale='en_GB') }} - {{ reservation.end_dt | format_date('EEEE dd/MM/yyyy', locale='en_GB') }}
- -Hours: {{ reservation.start_dt | format_time(locale='en_GB') }} - {{ reservation.end_dt | format_time(locale='en_GB') }}
- +Dates: {{ reservation.start_dt | format_date('yyyy/MM/dd?EEEE?', locale='zh_TW') }} - {{ reservation.end_dt | format_date('yyyy/MM/dd (EEEE)', locale='zh_TW') }}
- +Hours: {{ reservation.start_dt | format_time(locale='zh_TW') }} - {{ reservation.end_dt | format_time(locale='zh_TW') }}
- diff --git a/indico/util/date_time.py b/indico/util/date_time.py
- index 14e0205797..d1866d3d06 100644
- --- a/indico/util/date_time.py
- +++ b/indico/util/date_time.py
- @@ -98,7 +98,9 @@ def format_datetime(dt, format='medium', locale=None, timezone=None, as_unicode=
- """
- inject_unicode = True
- if format == 'code':
- - format = 'dd/MM/yyyy HH:mm'
- + # Franklin.20191214
- + #format = 'dd/MM/yyyy HH:mm'
- + format = 'yyyy/MM/dd HH:mm'
- inject_unicode = False
- if not locale:
- locale = get_current_locale()
- @@ -117,7 +119,9 @@ def format_date(d, format='medium', locale=None, timezone=None, as_unicode=False
- """
- inject_unicode = True
- if format == 'code':
- - format = 'dd/MM/yyyy'
- + # Franklin.20191214
- + #format = 'dd/MM/yyyy'
- + format = 'yyyy/MM/dd'
- inject_unicode = False
- if not locale:
- locale = get_current_locale()
- diff --git a/indico/web/client/js/jquery/utils/defaults.js b/indico/web/client/js/jquery/utils/defaults.js
- index 7f84eab97a..c6879cfe43 100644
- --- a/indico/web/client/js/jquery/utils/defaults.js
- +++ b/indico/web/client/js/jquery/utils/defaults.js
- @@ -14,7 +14,9 @@ import {$T} from '../../utils/i18n';
- $.datepicker.setDefaults({
- autoSize: true,
- buttonText: '',
- - dateFormat: 'dd/mm/yy',
- +// Franklin.20191211
- +// dateFormat: 'dd/mm/yy',
- + dateFormat: 'yy/mm/dd',
- firstDay: 1,
- nextText: $T('Next'),
- prevText: $T('Previous'),
- @@ -23,7 +25,9 @@ $.datepicker.setDefaults({
- $.extend(true, $.indico.daterange.prototype.options, {
- pickerOptions: {
- - dateFormat: 'dd/mm/yy',
- +// Franklin.20191211
- +// dateFormat: 'dd/mm/yy',
- + dateFormat: 'yy/mm/dd',
- },
- labelAttrs: {
- class: 'label titleCellFormat',
- diff --git a/indico/web/client/js/jquery/widgets/jinja/datetime_widget.js b/indico/web/client/js/jquery/widgets/jinja/datetime_widget.js
- index 211ba2653b..88c4bddf73 100644
- --- a/indico/web/client/js/jquery/widgets/jinja/datetime_widget.js
- +++ b/indico/web/client/js/jquery/widgets/jinja/datetime_widget.js
- @@ -160,7 +160,9 @@
- .push(updateMinTime);
- timeField.data('onChangeHandlers').push(function() {
- var selectedDate = moment(dateField.datepicker('getDate'));
- - updateMinTime(selectedDate.format('DD/MM/YYYY'));
- + // Franklin.20191214
- + //updateMinTime(selectedDate.format('DD/MM/YYYY'));
- + updateMinTime(selectedDate.format('YYYY/MM/DD'));
- });
- if (initialDate) {
- updateMinTime(initialDate);
- @@ -175,7 +177,9 @@
- .push(updateMaxTime);
- timeField.data('onChangeHandlers').push(function() {
- var selectedDate = moment(dateField.datepicker('getDate'));
- - updateMaxTime(selectedDate.format('DD/MM/YYYY'));
- + // Franklin.20191214
- + //updateMaxTime(selectedDate.format('DD/MM/YYYY'));
- + updateMaxTime(selectedDate.format('YYYY/MM/DD'));
- });
- if (initialDate) {
- updateMaxTime(initialDate);
- diff --git a/indico/web/client/js/legacy/libs/indico/Core/Data.js b/indico/web/client/js/legacy/libs/indico/Core/Data.js
- index 133a468f05..a234646cd5 100644
- --- a/indico/web/client/js/legacy/libs/indico/Core/Data.js
- +++ b/indico/web/client/js/legacy/libs/indico/Core/Data.js
- @@ -49,7 +49,9 @@ var Util = {
- considering formats (sourceFormat used for strings only) */
- formatDateTime: function(obj, format, sourceFormat) {
- // default value
- - format = format || '%d/%m/%Y %H:%M';
- + // Franklin.20191214
- + //format = format || '%d/%m/%Y %H:%M';
- + format = format || '%Y/%m/%d %H:%M';
- var m1 = null,
- m2 = null;
- @@ -206,7 +208,9 @@ Util.Validation = {
- };
- var IndicoDateTimeFormats = {
- - International: '%d/%m/%Y %H:%M',
- + //Franklin.20191214
- + //International: '%d/%m/%Y %H:%M',
- + International: '%Y/%m/%d %H:%M',
- ISO8601: '%Y/%m/%d %H:%M',
- Ordinal: '%Y%m%d',
- };
- diff --git a/indico/web/client/js/legacy/libs/timetable/Base.js b/indico/web/client/js/legacy/libs/timetable/Base.js
- index 64fe6baed6..295cb1cd2b 100644
- --- a/indico/web/client/js/legacy/libs/timetable/Base.js
- +++ b/indico/web/client/js/legacy/libs/timetable/Base.js
- @@ -485,7 +485,7 @@ type(
- var delements = parseDate(strDate);
- var nDate = new Date(delements[2], delements[1] - 1, delements[0]);
- - return Indico.Data.WeekDays[nDate.getDay()].substring(0, 3) + ' ' + day + '/' + month;
- + return Indico.Data.WeekDays[nDate.getDay()].substring(0, 3) + ' ' + month + '/' + day;
- },
- _parseDayInterval: function(hash) {
- diff --git a/indico/web/forms/fields/datetime.py b/indico/web/forms/fields/datetime.py
- index 4c8aae5b62..4f1fe630fd 100644
- --- a/indico/web/forms/fields/datetime.py
- +++ b/indico/web/forms/fields/datetime.py
- @@ -179,8 +179,11 @@ class IndicoDateField(DateField):
- widget = JinjaWidget('forms/date_widget.html', single_line=True, single_kwargs=True)
- def __init__(self, *args, **kwargs):
- +# Franklin.20191214
- +# super(IndicoDateField, self).__init__(*args, parse_kwargs={'dayfirst': True},
- +# display_format='%d/%m/%Y', **kwargs)
- super(IndicoDateField, self).__init__(*args, parse_kwargs={'dayfirst': True},
- - display_format='%d/%m/%Y', **kwargs)
- + display_format='%Y/%m/%d', **kwargs)
- class IndicoDateTimeField(DateTimeField):
- diff --git a/indico/web/templates/forms/date_widget.html b/indico/web/templates/forms/date_widget.html
- index 03231b45be..76558a961f 100644
- --- a/indico/web/templates/forms/date_widget.html
- +++ b/indico/web/templates/forms/date_widget.html
- @@ -1,8 +1,9 @@
- {% extends 'forms/base_widget.html' %}
- +<!-- Franklin.20191214 change placeholder from DD/MM/YYYY to YYYY/MM/DD -->
- {% block html %}
- <input type="text" id="{{ field.id }}" value="{{ field._value() }}" name="{{ field.name }}"
- - placeholder="DD/MM/YYYY" {{ input_args | html_params }}>
- + placeholder="YYYY/MM/DD" {{ input_args | html_params }}>
- {% endblock %}
- {% block javascript %}
- diff --git a/indico/web/templates/forms/datetime_widget.html b/indico/web/templates/forms/datetime_widget.html
- index f4093f9d8a..17c713e0e4 100644
- --- a/indico/web/templates/forms/datetime_widget.html
- +++ b/indico/web/templates/forms/datetime_widget.html
- @@ -4,7 +4,8 @@
- {% block html %}
- <div class="datetime-widget i-form-field-fixed-width">
- <input type="hidden" autofocus>
- - <input type="text" name="{{ field.name }}" id="{{ field.id }}-date" class="datepicker" placeholder="DD/MM/YYYY"
- + <!-- Franklin.20191214: change placeholder from DD/MM/YYYY to YYYY/MM/DD -->
- + <input type="text" name="{{ field.name }}" id="{{ field.id }}-date" class="datepicker" placeholder="YYYY/MM/DD"
- {% if field.data and not field.date_missing %}value="{{ field.data | format_date('code', timezone=field.timezone) }}"{% endif %}
- {% if required %}required{% endif %}
- {% if disabled %}disabled{% endif %}>{#--#}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement