Split user language (UI translation) from locale (formatted values) (#4595)
This commit is contained in:
@@ -139,6 +139,7 @@
|
||||
{%- endblock date_widget %}
|
||||
|
||||
{% block time_widget -%}
|
||||
{%- set user_format = format -%}
|
||||
{%- set format = locale_format('time') -%}
|
||||
{%- set jsFormat = format|js_format -%}
|
||||
{%- set attr = attr|merge({'pattern': format|pattern, 'autocomplete': 'off', 'data-timepicker': 'on', 'data-format': jsFormat, 'placeholder': jsFormat}) -%}
|
||||
@@ -155,7 +156,7 @@
|
||||
{% for index in [0, 1, 2, 3] %}
|
||||
<div class="dropdown-menu-column" style="min-width: 4rem">
|
||||
{% for value in time_presets %}
|
||||
{% set value = value|time %}
|
||||
{% set value = value|date_format(user_format) %}
|
||||
{% if loop.index0 % 4 == index %}
|
||||
<a class="dropdown-item justify-content-center" href="#" data-form-widget="copy-data" data-target="#{{ form.vars.id }}" data-value="{{ value }}" data-event="change">{{ value }}</a>
|
||||
{% endif %}
|
||||
|
||||
Reference in New Issue
Block a user