diff --git a/src/Form/UwSearchForm.php b/src/Form/UwSearchForm.php index c22d6aa72a112a10b1397d419b0e7c1643aaaa23..007828fd83f40659790caf918615c84851173e2a 100644 --- a/src/Form/UwSearchForm.php +++ b/src/Form/UwSearchForm.php @@ -43,6 +43,23 @@ class UwSearchForm extends FormBase { 'uw-input--checkboxform', ], ], + '#theme_wrappers' => [], + ]; + + // This is the label that is used for the "phone" view on + // the site search. We need to use form element label here + // by itself, since we use theme_wrappers as an empty array + // above in the input, which would normally give us the form + // label. + $form['label'] = [ + '#theme' => 'form_element_label', + '#title' => $this->t('<span class="uw-search--checkboxlabel--labeltext"></span>'), + '#title_display' => 'after', + '#required' => FALSE, + '#id' => 'edit-opentray', + '#attributes' => [ + 'class' => ['uw-search--checkboxlabel'], + ], ]; // The search text.