Skip to content

Commit afe611e

Browse files
committed
Fixed BoostCaeFormHelper
1 parent b13b9d3 commit afe611e

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
@@ -213,6 +213,10 @@ protected function _selectOptions($elements = array(), $parents = array(), $show
213213
$option = preg_replace('/<div.*?>/', '', $option);
214214
$option = preg_replace('/<\/div>/', '', $option);
215215
if (preg_match('/>(<label.*?>)/', $option, $match)) {
216+
if (preg_match('/.* class="(.*)".*/', $match[1], $classMatch)) {
217+
$attributes['class'] = $classMatch[1].' '.$attributes['class'];
218+
$match[1] = str_replace('class="'.$classMatch[1].'"', '', $match[1]);
219+
}
216220
$option = $match[1] . preg_replace('/<label.*?>/', ' ', $option);
217221
if (isset($attributes['class'])) {
218222
$option = preg_replace('/(<label.*?)(>)/', '$1 class="' . $attributes['class'] . '"$2', $option);

0 commit comments

Comments
 (0)