Skip to content
This repository has been archived by the owner on Jul 10, 2020. It is now read-only.

Commit

Permalink
A button group should be rendered exactly 1 time and not n-1 times fo…
Browse files Browse the repository at this point in the history
…r n buttons in group.
  • Loading branch information
Andrej Sinicyn committed Apr 11, 2017
1 parent 8799d13 commit 798e9d0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/TwbBundle/Form/View/Helper/TwbBundleForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,9 @@ protected function renderElements(FormInterface $oForm, $sFormLayout = self::LAY
$sButtonGroupKey = $aOptions['button-group'];
if (isset($aButtonGroups[$sButtonGroupKey])) {
$aButtonGroups[$sButtonGroupKey][] = $oElement;
$aElementsRendering[$iKey] = $sButtonGroupKey;
} else {
$aButtonGroups[$sButtonGroupKey] = array($oElement);
$aElementsRendering[$iKey] = $sButtonGroupKey;
}
if (!empty($aOptions['column-size']) && !isset($aButtonGroupsColumnSize[$sButtonGroupKey])) {
// Only the first occured column-size will be set, other are ignored.
Expand Down

0 comments on commit 798e9d0

Please sign in to comment.