Fix checkbox per PHP8.0

This commit is contained in:
loviuz 2022-07-13 22:39:47 +02:00
parent fbc043feb7
commit 89293ce744
1 changed files with 3 additions and 2 deletions

View File

@ -29,9 +29,10 @@ class HTMLWrapper implements WrapperInterface
public function before(&$values, &$extras)
{
$result = '';
$extra_class = '';
if( $values['type']=='checkbox' ){
$values['class'] .= ' checkbox-group';
$extra_class = 'checkbox-group';
}
// Valori particolari
@ -41,7 +42,7 @@ class HTMLWrapper implements WrapperInterface
// Generazione dell'etichetta
if (!empty($values['label'])) {
$result .= '
<div class="form-group '.$values['class'].'">
<div class="form-group '.$extra_class.'">
<label for="'.prepareToField($values['id']).'">'.(empty($values['help']) ? $values['label'] : '<span class="tip" title="'.prepareToField($values['help']).'">'.$values['label'].' <i class="fa fa-question-circle-o"></i></span>').'</label>';
}