Skip to content

Commit 67a5a03

Browse files
committed
Merge pull request #43 from happyquality/fixMultipleCheckboxSpike
Fixed BoostCaeFormHelper
2 parents 3a0e3c5 + afe611e commit 67a5a03

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

View/Helper/BoostCakeFormHelper.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,10 @@ protected function _selectOptions($elements = array(), $parents = array(), $show
214214
$option = preg_replace('/<div.*?>/', '', $option);
215215
$option = preg_replace('/<\/div>/', '', $option);
216216
if (preg_match('/>(<label.*?>)/', $option, $match)) {
217+
if (preg_match('/.* class="(.*)".*/', $match[1], $classMatch)) {
218+
$attributes['class'] = $classMatch[1].' '.$attributes['class'];
219+
$match[1] = str_replace('class="'.$classMatch[1].'"', '', $match[1]);
220+
}
217221
$option = $match[1] . preg_replace('/<label.*?>/', ' ', $option);
218222
if (isset($attributes['class'])) {
219223
$option = preg_replace('/(<label.*?)(>)/', '$1 class="' . $attributes['class'] . '"$2', $option);

0 commit comments

Comments
 (0)