3
0
Fork 0
mirror of https://github.com/farmOS/farmOS.git synced 2024-02-23 11:37:38 +01:00

Add message if there are no contrib modules.

This commit is contained in:
Paul Weidner 2021-08-10 13:19:56 -07:00 committed by Michael Stenta
parent 220c816fb9
commit 23ebe88395

View file

@ -89,6 +89,16 @@ class FarmSettingsModulesForm extends FormBase {
// Build checkboxes for module options.
foreach ($modules as $type => $options) {
// Add message if there are no contrib modules.
if (empty($options['options'])) {
$form[$type]['modules'] = [
'#markup' => $this->t('No @type farmOS modules found.', ['@type' => $type]),
];
continue;
}
// Build checkboxes.
$form[$type]['modules'] = [
'#title' => $this->t('farmOS Modules'),
'#title_display' => 'invisible',