File tree Expand file tree Collapse file tree 3 files changed +8
-2
lines changed
public/main/inc/lib/formvalidator/Element
src/CoreBundle/DataFixtures Expand file tree Collapse file tree 3 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -101,13 +101,15 @@ private function getElementJS(): string
101
101
$ localeCode = $ this ->getLocaleCode ();
102
102
$ id = $ this ->getAttribute ('id ' );
103
103
104
+ $ altFormat = ($ localeCode === 'en ' ) ? 'F d, Y ' : 'd F, Y ' ;
105
+
104
106
return "<script>
105
107
document.addEventListener('DOMContentLoaded', function () {
106
108
function initializeFlatpickr() {
107
109
const fp = flatpickr('# {$ id }', {
108
110
locale: ' {$ localeCode }',
109
111
altInput: true,
110
- altFormat: ' " . get_lang ( ' F d, Y ' ). " ',
112
+ altFormat: ' { $ altFormat } ',
111
113
enableTime: false,
112
114
dateFormat: 'Y-m-d',
113
115
time_24hr: true,
Original file line number Diff line number Diff line change @@ -72,13 +72,15 @@ private function getElementJS(): string
72
72
$ localeCode = $ this ->getLocaleCode ();
73
73
$ id = $ this ->getAttribute ('id ' );
74
74
75
+ $ altFormat = ($ localeCode === 'en ' ) ? 'F d, Y - H:i ' : 'd F, Y - H:i ' ;
76
+
75
77
$ js = "<script>
76
78
document.addEventListener('DOMContentLoaded', function () {
77
79
function initializeFlatpickr() {
78
80
const fp = flatpickr('# {$ id }', {
79
81
locale: ' {$ localeCode }',
80
82
altInput: true,
81
- altFormat: ' " . get_lang ( ' F d, Y ' ). " " . get_lang ( ' at ' ). " H:i ',
83
+ altFormat: ' { $ altFormat } ',
82
84
enableTime: true,
83
85
dateFormat: 'Y-m-d H:i',
84
86
time_24hr: true,
Original file line number Diff line number Diff line change @@ -389,6 +389,8 @@ public static function getExtraFields(): array
389
389
'display_text ' => 'GDPR compliance ' ,
390
390
'item_type ' => ExtraField::USER_FIELD_TYPE ,
391
391
'value_type ' => ExtraField::FIELD_TYPE_CHECKBOX ,
392
+ 'visible_to_self ' => true ,
393
+ 'changeable ' => true ,
392
394
],
393
395
[
394
396
'variable ' => 'isFromNewLogin ' ,
You can’t perform that action at this time.
0 commit comments