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

Commit

Permalink
Merge 2783350 into 74b5ed6
Browse files Browse the repository at this point in the history
  • Loading branch information
BreyndotEchse committed Apr 21, 2015
2 parents 74b5ed6 + 2783350 commit 4bf5928
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/TwbBundle/Form/View/Helper/TwbBundleFormButton.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,15 @@ public function render(ElementInterface $oElement, $sButtonContent = null)
*/
if (null === $sButtonContent) {
$sButtonContent = $oElement->getLabel();
if (
null === $sButtonContent &&
$oElement->hasAttribute('type') &&
'submit' === $oElement->getAttribute('type') &&
$oElement->hasAttribute('value')
) {
$sButtonContent = $oElement->getAttribute('value');
}

if (null === $sButtonContent && !$aIconOptions) {
throw new DomainException(sprintf(
'%s expects either button content as the second argument, ' .
Expand Down

0 comments on commit 4bf5928

Please sign in to comment.