From 0e4caa2cdeb1b466009a4c5ac1156b1dd49f2fed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Buchmann?= <andy.schliesser@gmail.com> Date: Thu, 13 Apr 2023 16:26:38 +0200 Subject: [PATCH] [BUGFIX] Allow {__currentTimestamp} as form property Resolves: #100580 Releases: main, 11.5 Change-Id: I10e4b21908a1b4649d7ab4b02c467af381017b2b Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/78627 Tested-by: core-ci <typo3@b13.com> Tested-by: Christian Kuhn <lolli@schwarzbu.ch> Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch> --- .../Public/JavaScript/Backend/FormEditor/ViewModel.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/typo3/sysext/form/Resources/Public/JavaScript/Backend/FormEditor/ViewModel.js b/typo3/sysext/form/Resources/Public/JavaScript/Backend/FormEditor/ViewModel.js index ccdbce9ba6ca..2af983b90f88 100644 --- a/typo3/sysext/form/Resources/Public/JavaScript/Backend/FormEditor/ViewModel.js +++ b/typo3/sysext/form/Resources/Public/JavaScript/Backend/FormEditor/ViewModel.js @@ -249,7 +249,7 @@ define(['jquery', regex = /\{([a-z0-9-_]+)?\}/gi; match = regex.exec(formElement.get(propertyPath)); - if (match && ((match[1] && !getFormEditorApp().isFormElementIdentifierUsed(match[1])) || !match[1])) { + if (match && ((match[1] && match[1] !== '__currentTimestamp' && !getFormEditorApp().isFormElementIdentifierUsed(match[1])) || !match[1])) { return getFormEditorApp().getFormElementPropertyValidatorDefinition('FormElementIdentifierWithinCurlyBracesInclusive')['errorMessage'] || 'invalid value'; } }); @@ -263,7 +263,7 @@ define(['jquery', regex = /^\{([a-z0-9-_]+)?\}$/i; match = regex.exec(formElement.get(propertyPath)); - if (!match || ((match[1] && !getFormEditorApp().isFormElementIdentifierUsed(match[1])) || !match[1])) { + if (!match || ((match[1] && match[1] !== '__currentTimestamp' && !getFormEditorApp().isFormElementIdentifierUsed(match[1])) || !match[1])) { return getFormEditorApp().getFormElementPropertyValidatorDefinition('FormElementIdentifierWithinCurlyBracesInclusive')['errorMessage'] || 'invalid value'; } }); -- GitLab