From bd1dd44c1b518108357819ce1172d06350eb3bee Mon Sep 17 00:00:00 2001 From: Beppe Date: Fri, 3 Jun 2022 12:59:42 +0200 Subject: [PATCH] Correzione icon-after nei checkbox --- src/HTMLBuilder/Handler/ChoicesHandler.php | 24 ++++++++++------------ src/HTMLBuilder/Wrapper/HTMLWrapper.php | 6 +++++- 2 files changed, 16 insertions(+), 14 deletions(-) diff --git a/src/HTMLBuilder/Handler/ChoicesHandler.php b/src/HTMLBuilder/Handler/ChoicesHandler.php index a0be01ee9..045394dac 100755 --- a/src/HTMLBuilder/Handler/ChoicesHandler.php +++ b/src/HTMLBuilder/Handler/ChoicesHandler.php @@ -71,19 +71,17 @@ class ChoicesHandler implements HandlerInterface // Generazione del codice HTML // "+ this.checked" rende il valore booleano un numero $result = ' -
- - -
- - -
+ + +
+ +
'; return $result; diff --git a/src/HTMLBuilder/Wrapper/HTMLWrapper.php b/src/HTMLBuilder/Wrapper/HTMLWrapper.php index 985ad73a3..041d3059c 100755 --- a/src/HTMLBuilder/Wrapper/HTMLWrapper.php +++ b/src/HTMLBuilder/Wrapper/HTMLWrapper.php @@ -30,6 +30,10 @@ class HTMLWrapper implements WrapperInterface { $result = ''; + if( $values['type']=='checkbox' ){ + $values['class'] = 'checkbox-group'; + } + // Valori particolari $values['icon-before'] = isset($values['icon-before']) ? $this->parser($values, $extras, $values['icon-before']) : null; $values['icon-after'] = isset($values['icon-after']) ? $this->parser($values, $extras, $values['icon-after']) : null; @@ -37,7 +41,7 @@ class HTMLWrapper implements WrapperInterface // Generazione dell'etichetta if (!empty($values['label'])) { $result .= ' -
+
'; }