Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion AjaxSubmitButton.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ class AjaxSubmitButton extends Widget
const ICON_POSITION_RIGHT = 'right';

public $ajaxOptions = [];
public $iconOptions = [];

/**
* @var array the HTML attributes for the widget container tag.
Expand Down Expand Up @@ -121,7 +122,7 @@ public function run()
$label = $this->encodeLabel ? Html::encode($this->label) : $this->label;

if ($this->icon !== null) {
$icon = Html::tag('i', '', ['class' => $this->icon]);
$icon = Html::tag('i', '', array_merge(['class' => $this->icon], $this->iconOptions));
$label = strcasecmp($this->iconPosition,
self::ICON_POSITION_LEFT) === 0 ? sprintf('%s %s', $icon,
$label) : sprintf('%s %s', $label, $icon);
Expand Down