Skip to content

Commit

Permalink
Merge pull request #17 from bwaidelich/16-fix-eel-helper-namespace
Browse files Browse the repository at this point in the history
BUGFIX: Use full package key as Eel helper namespace
  • Loading branch information
bwaidelich authored Apr 26, 2019
2 parents d7a9ffc + 5be59a8 commit 15ec6ab
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 21 deletions.
2 changes: 1 addition & 1 deletion Configuration/Settings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ Neos:

Fusion:
defaultContext:
'Neos.Form': 'Neos\Form\FusionRenderer\Eel\Helper\FormHelper'
'Neos.Form.FusionRenderer': 'Neos\Form\FusionRenderer\Eel\Helper\FormHelper'
8 changes: 4 additions & 4 deletions Resources/Private/Fusion/ContainerElements/PreviewPage.fusion
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ prototype(Neos.Form:PreviewPage) < prototype(Neos.Form.FusionRenderer:AbstractSe
content = Neos.Fusion:Array {
1 = Neos.Fusion:Tag {
tagName = 'th'
content = ${Neos.Form.translate(containerElement, 'forms.pages.labelTitle', 'Label')}
content = ${Neos.Form.FusionRenderer.translate(containerElement, 'forms.pages.labelTitle', 'Label')}
}
2 = Neos.Fusion:Tag {
tagName = 'th'
content = ${Neos.Form.translate(containerElement, 'forms.pages.valueTitle', 'Value')}
content = ${Neos.Form.FusionRenderer.translate(containerElement, 'forms.pages.valueTitle', 'Value')}
}
}
}
Expand Down Expand Up @@ -58,7 +58,7 @@ prototype(Neos.Form:PreviewPage.ElementRow) < prototype(Neos.Fusion:Tag) {
}

prototype(Neos.Form:PreviewPage.ElementValue) < prototype(Neos.Fusion:Case) {
@context.elementValue = ${Neos.Form.elementValue(formRuntime, element)}
@context.elementValue = ${Neos.Form.FusionRenderer.elementValue(formRuntime, element)}
imageUpload {
renderer = Neos.Fusion:Tag {
tagName = 'a'
Expand Down Expand Up @@ -106,4 +106,4 @@ prototype(Neos.Form:PreviewPage.ElementValue) < prototype(Neos.Fusion:Case) {
}
condition = ${!Type.isObject(elementValue)}
}
}
}
4 changes: 2 additions & 2 deletions Resources/Private/Fusion/Core/AbstractSection.fusion
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ prototype(Neos.Form.FusionRenderer:AbstractSection) < prototype(Neos.Fusion:Tag)
content = Neos.Fusion:Array {
legend = Neos.Fusion:Tag {
tagName = 'legend'
content = ${Neos.Form.translateAndEscapeProperty(containerElement, 'label')}
content = ${Neos.Form.FusionRenderer.translateAndEscapeProperty(containerElement, 'label')}
@if.hasLabel = ${containerElement.label ? true : false}
}
elements = Neos.Fusion:Collection {
Expand All @@ -23,4 +23,4 @@ prototype(Neos.Form.FusionRenderer:AbstractSection) < prototype(Neos.Fusion:Tag)
formRuntime = ${formRuntime}
formElement = ${containerElement}
}
}
}
8 changes: 4 additions & 4 deletions Resources/Private/Fusion/Core/FormElement.fusion
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
prototype(Neos.Form.FusionRenderer:FormElement) < prototype(Neos.Fusion:Array) {
@context.elementName = ${'--' + formRuntime.identifier + '[' + element.identifier + ']'}
@context.elementValue = ${Neos.Form.elementValue(formRuntime, element)}
@context.elementValidationErrors = ${Neos.Form.validationErrors(formRuntime, element)}
@context.elementHasValidationErrors = ${Neos.Form.hasValidationErrors(formRuntime, element)}
@context.elementValue = ${Neos.Form.FusionRenderer.elementValue(formRuntime, element)}
@context.elementValidationErrors = ${Neos.Form.FusionRenderer.validationErrors(formRuntime, element)}
@context.elementHasValidationErrors = ${Neos.Form.FusionRenderer.hasValidationErrors(formRuntime, element)}

label = Neos.Form.FusionRenderer:FormElementLabel
fieldContainer = Neos.Form.FusionRenderer:FormElementFieldContainer
Expand All @@ -27,7 +27,7 @@ prototype(Neos.Form.FusionRenderer:FormElementLabel) < prototype(Neos.Fusion:Tag
for = ${element.uniqueIdentifier}
}
content = Neos.Fusion:Array {
value = ${Neos.Form.translateAndEscapeProperty(element, 'label')}
value = ${Neos.Form.FusionRenderer.translateAndEscapeProperty(element, 'label')}
requiredFlag = Neos.Form.FusionRenderer:RequiredFlag
requiredFlag.@if.isRequired = ${element.required}
}
Expand Down
8 changes: 4 additions & 4 deletions Resources/Private/Fusion/Core/FormNavigation.fusion
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,22 @@ prototype(Neos.Form.FusionRenderer:FormNavigation) < prototype(Neos.Fusion:Tag)
attributes.class = 'form-navigation'
content = Neos.Fusion:Array {
previousButton = Neos.Form.FusionRenderer:FormNavigationButton {
label = ${Neos.Form.translate(formRuntime, 'forms.navigation.previousPage', 'Previous page')}
label = ${Neos.Form.FusionRenderer.translate(formRuntime, 'forms.navigation.previousPage', 'Previous page')}
class = ${formRuntime.renderingOptions.previousButtonClassAttribute}
containerClass = 'previous'
fieldValue = ${formRuntime.previousPage.index}
attributes.formnovalidate = ${true}
@if.previousPageExists = ${formRuntime.previousPage ? true : false}
}
nextButton = Neos.Form.FusionRenderer:FormNavigationButton {
label = ${Neos.Form.translate(formRuntime, 'forms.navigation.nextPage', 'Next page')}
label = ${Neos.Form.FusionRenderer.translate(formRuntime, 'forms.navigation.nextPage', 'Next page')}
class = ${formRuntime.renderingOptions.nextButtonClassAttribute}
containerClass = 'next'
fieldValue = ${formRuntime.nextPage.index}
@if.nextPageExists = ${formRuntime.nextPage ? true : false}
}
submitButton = Neos.Form.FusionRenderer:FormNavigationButton {
label = ${formRuntime.renderingOptions.submitButtonLabel ? formRuntime.renderingOptions.submitButtonLabel : Neos.Form.translate(formRuntime, 'forms.navigation.submit', 'Submit')}
label = ${formRuntime.renderingOptions.submitButtonLabel ? formRuntime.renderingOptions.submitButtonLabel : Neos.Form.FusionRenderer.translate(formRuntime, 'forms.navigation.submit', 'Submit')}
class = ${formRuntime.renderingOptions.submitButtonClassAttribute}
containerClass = 'next submit'
fieldValue = ${Array.length(formRuntime.pages)}
Expand Down Expand Up @@ -57,4 +57,4 @@ prototype(Neos.Form.FusionRenderer:FormNavigationButton) < prototype(Neos.Fusion
attributes.class = ${containerClass}
content = ${value}
}
}
}
4 changes: 2 additions & 2 deletions Resources/Private/Fusion/Elements/FileUpload.fusion
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ prototype(Neos.Form:FileUpload) < prototype(Neos.Form.FusionRenderer:FormElement
attributes {
type = 'hidden'
name = ${elementName + '[originallySubmittedResource][__identity]'}
value = ${Neos.Form.identifier(elementValue)}
value = ${Neos.Form.FusionRenderer.identifier(elementValue)}
}
@if.hasUploadedResource = ${elementValue ? true : false}
}
Expand All @@ -30,4 +30,4 @@ prototype(Neos.Form:FileUpload) < prototype(Neos.Form.FusionRenderer:FormElement
}
}
}
}
}
4 changes: 2 additions & 2 deletions Resources/Private/Fusion/Elements/ImageUpload.fusion
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ prototype(Neos.Form:ImageUpload) < prototype(Neos.Form.FusionRenderer:FormElemen
attributes {
type = 'hidden'
name = ${elementName + '[resource][originallySubmittedResource][__identity]'}
value = ${Neos.Form.identifier(elementValue.resource)}
value = ${Neos.Form.FusionRenderer.identifier(elementValue.resource)}
}
@if.hasUploadedResource = ${elementValue ? true : false}
}
Expand All @@ -33,4 +33,4 @@ prototype(Neos.Form:ImageUpload) < prototype(Neos.Form.FusionRenderer:FormElemen
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ prototype(Neos.Form:PasswordWithConfirmation) < prototype(Neos.Form.FusionRender
confirmationLabel = Neos.Form.FusionRenderer:FormElementLabel {
@position = 'after field'
attributes.for = ${element.uniqueIdentifier + '-confirmation'}
content.value = ${Neos.Form.translateAndEscapeProperty(element, 'confirmationLabel')}
content.value = ${Neos.Form.FusionRenderer.translateAndEscapeProperty(element, 'confirmationLabel')}
}
confirmationField = Neos.Fusion:Tag {
@position = 'after confirmationLabel'
Expand All @@ -32,4 +32,4 @@ prototype(Neos.Form:PasswordWithConfirmation) < prototype(Neos.Form.FusionRender

}
}
}
}

0 comments on commit 15ec6ab

Please sign in to comment.