Skip to content
This repository was archived by the owner on May 3, 2020. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions src/Element/TemplateCollectionList.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,12 @@ public static function processTemplateCollectionList(&$element, FormStateInterfa
// Add empty checkboxes form item. This will ensure 'checkboxes' always
// exists in $form_state values. This is only an issue if there are no
// checkboxes rendered initially (list is empty).
$element['checkboxes'] = [
'#type' => 'checkboxes',
'#options' => NULL,
];
if (!$element['#checkboxes']) {
$element['checkboxes'] = [
'#type' => 'checkboxes',
'#options' => [],
];
}

if ($element['#checkboxes']) {
$element['template_collection_list']['#attributes']['class'][] = 'checkboxes';
Expand Down