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

Commit

Permalink
readd icon to bootstrap submit button (fixed #56)
Browse files Browse the repository at this point in the history
  • Loading branch information
dmolineus committed Jun 30, 2014
1 parent c3a86a1 commit 6aa8014
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/Netzmacht/Bootstrap/Form/Subscriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,17 @@ public function buildElement(BuildElementEvent $event)
->addClass($widget->class ?: 'btn-default');
}

if($widget->bootstrap_addIcon) {
$icon = Icons::generateIcon($widget->bootstrap_icon);

if($widget->bootstrap_iconPosition == 'left') {
$element->addChild($icon . ' ', Node::POSITION_FIRST);
}
else {
$element->addChild(' ' . $icon);
}
}

$event->setElement($element);
}
}
Expand Down

0 comments on commit 6aa8014

Please sign in to comment.