Skip to content

Commit

Permalink
Merge pull request #75 from dreistromland-tj/task/v13_compatibility
Browse files Browse the repository at this point in the history
[BUGFIX] Fix loading of backend JavaScript
  • Loading branch information
tritum authored Nov 21, 2024
2 parents fa6b0fe + 972e2f8 commit 80d3cb5
Show file tree
Hide file tree
Showing 7 changed files with 216 additions and 180 deletions.
8 changes: 8 additions & 0 deletions Configuration/JavaScriptModules.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?php

return [
'dependencies' => ['form'],
'imports' => [
'@tritum/form-element-linked-checkbox/' => 'EXT:form_element_linked_checkbox/Resources/Public/JavaScript/',
],
];
157 changes: 77 additions & 80 deletions Configuration/Yaml/FormSetup.yaml
Original file line number Diff line number Diff line change
@@ -1,83 +1,80 @@
TYPO3:
CMS:
Form:
prototypes:
standard:
formElementsDefinition:
Form:
renderingOptions:
partialRootPaths:
1505042806: 'EXT:form_element_linked_checkbox/Resources/Private/Frontend/Partials/'
prototypes:
standard:
formElementsDefinition:
Form:
renderingOptions:
partialRootPaths:
1505042806: 'EXT:form_element_linked_checkbox/Resources/Private/Frontend/Partials/'

LinkedCheckbox:
# inherit configuration from checkbox element
__inheritances:
10: 'TYPO3.CMS.Form.prototypes.standard.formElementsDefinition.Checkbox'
formEditor:
label: 'Linked checkbox'
groupSorting: 150
properties:
pageUid: ''
predefinedDefaults:
properties:
pageUid: ''
linkText: 'formEditor.elements.LinkedCheckbox.editor.linkText.predefinedDefaults'
additionalLinks: { }
# add new field which allows selection of a page (= link target)
editors:
200:
templateName: 'Inspector-TextareaEditor'
300:
identifier: 'pageUid'
templateName: 'Inspector-Typo3WinBrowserEditor'
label: 'formEditor.elements.LinkedCheckbox.pageUid.label'
buttonLabel: 'formEditor.elements.LinkedCheckbox.pageUid.buttonLabel'
browsableType: pages
iconIdentifier: apps-pagetree-page-default
# very important setting -> defines the written form definition
propertyPath: 'properties.pageUid'
propertyValidatorsMode: 'OR'
propertyValidators:
10: 'Integer'
20: 'FormElementIdentifierWithinCurlyBracesExclusive'
400:
identifier: 'linkText'
templateName: 'Inspector-TextEditor'
label: 'formEditor.elements.LinkedCheckbox.editor.label.linkText'
propertyPath: 'properties.linkText'
propertyValidators:
10: 'NotEmpty'
500:
identifier: 'additionalLinks'
templateName: 'Inspector-PropertyGridEditor'
label: 'formEditor.elements.LinkedCheckbox.editor.additionalLinks.label'
propertyPath: 'properties.additionalLinks'
fieldExplanationText: 'formEditor.elements.LinkedCheckbox.editor.additionalLinks.fieldExplanationText'
isSortable: true
enableAddRow: true
enableDeleteRow: true
useLabelAsFallbackValue: false
gridColumns:
- name: label
title: 'formEditor.elements.LinkedCheckbox.editor.additionalLinks.gridColumns.linkText.title'
- name: value
title: 'formEditor.elements.LinkedCheckbox.editor.additionalLinks.gridColumns.pageUid.title'
LinkedCheckbox:
# inherit configuration from checkbox element
__inheritances:
10: 'TYPO3.CMS.Form.prototypes.standard.formElementsDefinition.Checkbox'
formEditor:
label: 'Linked checkbox'
groupSorting: 150
properties:
pageUid: ''
predefinedDefaults:
properties:
pageUid: ''
linkText: 'formEditor.elements.LinkedCheckbox.editor.linkText.predefinedDefaults'
additionalLinks: { }
# add new field which allows selection of a page (= link target)
editors:
200:
templateName: 'Inspector-TextareaEditor'
300:
identifier: 'pageUid'
templateName: 'Inspector-Typo3WinBrowserEditor'
label: 'formEditor.elements.LinkedCheckbox.pageUid.label'
buttonLabel: 'formEditor.elements.LinkedCheckbox.pageUid.buttonLabel'
browsableType: pages
iconIdentifier: apps-pagetree-page-default
# very important setting -> defines the written form definition
propertyPath: 'properties.pageUid'
propertyValidatorsMode: 'OR'
propertyValidators:
10: 'Integer'
20: 'FormElementIdentifierWithinCurlyBracesExclusive'
400:
identifier: 'linkText'
templateName: 'Inspector-TextEditor'
label: 'formEditor.elements.LinkedCheckbox.editor.label.linkText'
propertyPath: 'properties.linkText'
propertyValidators:
10: 'NotEmpty'
500:
identifier: 'additionalLinks'
templateName: 'Inspector-PropertyGridEditor'
label: 'formEditor.elements.LinkedCheckbox.editor.additionalLinks.label'
propertyPath: 'properties.additionalLinks'
fieldExplanationText: 'formEditor.elements.LinkedCheckbox.editor.additionalLinks.fieldExplanationText'
isSortable: true
enableAddRow: true
enableDeleteRow: true
useLabelAsFallbackValue: false
gridColumns:
- name: label
title: 'formEditor.elements.LinkedCheckbox.editor.additionalLinks.gridColumns.linkText.title'
- name: value
title: 'formEditor.elements.LinkedCheckbox.editor.additionalLinks.gridColumns.pageUid.title'

finishersDefinition:
EmailToReceiver:
options:
templateRootPaths:
1505042806: 'EXT:form_element_linked_checkbox/Resources/Private/Frontend/Templates/Finishers/Email/'
EmailToSender:
options:
templateRootPaths:
1505042806: 'EXT:form_element_linked_checkbox/Resources/Private/Frontend/Templates/Finishers/Email/'
finishersDefinition:
EmailToReceiver:
options:
templateRootPaths:
1505042806: 'EXT:form_element_linked_checkbox/Resources/Private/Frontend/Templates/Finishers/Email/'
EmailToSender:
options:
templateRootPaths:
1505042806: 'EXT:form_element_linked_checkbox/Resources/Private/Frontend/Templates/Finishers/Email/'

formEditor:
translationFiles:
1687159009: 'EXT:form_element_linked_checkbox/Resources/Private/Language/Database.xlf'
dynamicRequireJsModules:
additionalViewModelModules:
1687159242: 'TYPO3/CMS/FormElementLinkedCheckbox/Backend/FormEditor/ViewModel'
formEditorPartials:
FormElement-LinkedCheckbox: 'Stage/SimpleTemplate'
formEditor:
translationFiles:
1687159009: 'EXT:form_element_linked_checkbox/Resources/Private/Language/Database.xlf'
dynamicJavaScriptModules:
additionalViewModelModules:
1505042806: '@tritum/form-element-linked-checkbox/backend/form-editor/view-model.js'
formEditorPartials:
FormElement-LinkedCheckbox: 'Stage/SimpleTemplate'
25 changes: 13 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ use this template.

## Preferred Installation

#. Require the extension via composer.
#. Add the site set `tritum/form-element-linked-checkbox` to the dependencies
of your site packages site set (TYPO3 v13 and above).
#. Or add the static TypoScript configuration to your TypoScript template
(TYPO3 v12 and below).
1. Require the extension via composer.
2. Add the site set `tritum/form-element-linked-checkbox` to the dependencies
of your site packages site set (TYPO3 v13).
Or add the static TypoScript configuration to your TypoScript template
(TYPO3 v12 and TYPO3 v13).

## Customization

Expand Down Expand Up @@ -135,13 +135,14 @@ the element registration.

## Versions

| News | TYPO3 | PHP | Notes |
|--------|---------|-----------|---------------------------------------|
| master | 11 - 12 | 7.4 - 8.2 | |
| 4.x | 11 - 12 | 7.4 - 8.2 | Breaking changes. See comments below. |
| 3.x | 9 - 11 | 7.2 - 8.1 | Breaking changes. See comments below. |
| 2.x | 9 - 11 | | |
| 1.x | 8 - 9 | | |
| News | TYPO3 | PHP | Notes |
|--------|---------|-----------|-------------------------------------------|
| master | 12 - 13 | 8.1 - 8.3 | |
| 5.x | 12 - 13 | 8.1 - 8.3 | [!!!]Breaking: Drop support for TYPO3 v11 |
| 4.x | 11 - 12 | 7.4 - 8.2 | Breaking changes. See comments below. |
| 3.x | 9 - 11 | 7.2 - 8.1 | Breaking changes. See comments below. |
| 2.x | 9 - 11 | | |
| 1.x | 8 - 9 | | |

### Breaking changes version 4.x

Expand Down
81 changes: 0 additions & 81 deletions Resources/Public/JavaScript/Backend/FormEditor/ViewModel.js

This file was deleted.

Loading

0 comments on commit 80d3cb5

Please sign in to comment.