Feature: The scripts of the program list and finder can be switched off 

Description 

The Course List registers the module @fgtclb/academic-programs/frontend/program-list.js , from its template and from the three partials of its filter form, and the Course Finder registers @fgtclb/academic-programs/frontend/program-finder.js . An installation that brings its own scripts had to override every one of those files to leave them out.

Both modules are switchable now, together, per site:

Site setting and constant Default
plugin.tx_academicprograms.assets.js true

It is declared by the site set fgtclb/academic-programs, with every other setting of this extension:

config/sites/my-site/settings.yaml
plugin.tx_academicprograms.assets.js: false
Copied!

An installation that configures its frontend through sys_template records sets the TypoScript constant of the very same name, in Constants:

Constants of the root sys_template record
plugin.tx_academicprograms.assets.js = 0
Copied!

Every academic extension that loads a script has this switch, named assets.js below its own plugin namespace and switched on by default, after the switch of the study plan content element.

Impact 

Nothing changes for an installation that configures nothing: both elements load their scripts exactly as before.

Switched off, the page loads neither, and the markup is unchanged. Both elements keep working: the list reloads the page when its form is submitted with the button, and the finder submits to the list without narrowing its options first. See Load the script or bring your own.

A project that overrides Templates/Program/List.html, Templates/Program/Finder.html or one of the partials Program/SortingAndFilters.html, Program/DemandSorting.html and Program/DemandCategories.html keeps whatever its copy loads. The switch reaches it once it wraps its own <f:asset.module> in <f:if condition="{settings.assets.js}"> .