Skip to content

Commit

Permalink
[TASK] Load ES6 module only when needed (#12)
Browse files Browse the repository at this point in the history
  • Loading branch information
sebkln committed Feb 9, 2024
1 parent 67403c1 commit cbdaea0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
4 changes: 4 additions & 0 deletions Classes/Form/Element/TermsInputElement.php
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,10 @@ public function render():array
$html[] = '</div>';
$resultArray['html'] = implode(LF, $html);

$resultArray['javaScriptModules'][] = JavaScriptModuleInstruction::create(
'@mfc/picturecredits-mandatory-evaluation'
);

return $resultArray;
}
}
5 changes: 0 additions & 5 deletions Configuration/Services.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,3 @@ services:
exclude:
- '../Classes/Domain/Model/'
- '../Classes/Domain/Types/'
Mfc\Picturecredits\EventListener\AddMandatoryEvaluation:
tags:
- name: event.listener
identifier: 'mandatory-eval'
event: TYPO3\CMS\Backend\Controller\Event\AfterFormEnginePageInitializedEvent

0 comments on commit cbdaea0

Please sign in to comment.