Proposition that allows to include modules from ar array. Works both on usual page + ajax page

This commit is contained in:
jf-cbd
2025-12-23 14:55:00 +01:00
parent a627f8a471
commit 35d3194e6c
11 changed files with 190 additions and 8 deletions

View File

@@ -15,6 +15,15 @@ class TurboForm extends UIContentBlock
// Overloaded constants
public const BLOCK_CODE = 'ibo-form';
public const DEFAULT_HTML_TEMPLATE_REL_PATH = 'base/components/turbo-form/layout';
public const DEFAULT_JS_MODULES_CONFIG = [
[
'sModuleName' => 'session',
'sJsModuleSrc' => '/node_modules/@hotwired/turbo/dist/turbo.es2017-esm.js',
'sModuleConfigJs' => <<<JS
session.drive = false;
JS
],
];
/** @var string|null */
protected ?string $sOnSubmitJsCode;