Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for TYPO3 v11 LTS #33

Merged
merged 1 commit into from
Dec 1, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions Classes/Service/Image.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
}

$yamlLoader = new YamlFileLoader();
$formConfiguration = $yamlLoader->load($flexFormArray['data']['sDEF']['lDEF']['settings.persistenceIdentifier']['vDEF']);
$formConfiguration = $yamlLoader->load($file->getPublicUrl());
$captchaProperties = null;

foreach ($formConfiguration['renderables'] as $renderable) {
Expand All @@ -100,8 +100,6 @@
}
}



if ($captchaProperties === null) {
throw ElemenIdentifierNotFoundInForm::make('Unable to find a form element with the given identifier: ' . htmlspecialchars($_GET['identifier']));
}
Expand Down
13 changes: 13 additions & 0 deletions Configuration/Yaml/FormEditorSetup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,19 @@ TYPO3:
EasyCaptchaMixin:
formEditor:
editors:
100:
identifier: header
templateName: Inspector-FormElementHeaderEditor
200:
identifier: label
templateName: Inspector-TextEditor
label: formEditor.elements.FormElement.editor.label.label
propertyPath: label
230:
identifier: elementDescription
templateName: Inspector-TextEditor
label: formEditor.elements.FormElement.editor.elementDescription.label
propertyPath: properties.elementDescription
900:
identifier: 'validators'
templateName: 'Inspector-ValidatorsEditor'
Expand Down
6 changes: 3 additions & 3 deletions Resources/Public/JavaScript/Frontend/Easycaptcha.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,10 @@
throw new Error('HTTP error [' + response.status + '] for captcha tts request');
}

return response.json().word;
return response.json();
})
.then(function (word) {
var utterance = new SpeechSynthesisUtterance(word);
.then(function (data) {
var utterance = new SpeechSynthesisUtterance(data.word);
utterance.rate = 0.8;
utterance.pitch = 1;
speechSynthesis.speak(utterance);
Expand Down