Skip to content

Commit

Permalink
Merge pull request #6 from kinglozzer/fixes
Browse files Browse the repository at this point in the history
Fix dialog button not displaying correctly
  • Loading branch information
lekoala committed Mar 3, 2022
2 parents 8b71f90 + 2a52172 commit 7a75f02
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/PureModalAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ protected function getButtonTitle()
*/
protected function getDialogButtonTitle()
{
$title = $this->buttonTitle ?: $this->title;
$title = $this->dialogButtonTitle ?: $this->title;
if ($this->buttonIcon) {
$title = '<span class="font-icon-' . $this->buttonIcon . '"></span> ' . $title;
}
Expand All @@ -97,7 +97,7 @@ protected function getDialogButtonTitle()
*/
public function setDialogButtonTitle($value)
{
$this->buttonTitle = $value;
$this->dialogButtonTitle = $value;
return $this;
}

Expand Down
4 changes: 3 additions & 1 deletion templates/LeKoala/PureModal/PureModalAction.ss
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@
</div>
<% if $ShowDialogButton %>
<div class="toolbar toolbar--south">
<input type="submit" name="action_$Name" class="btn action btn btn-info custom-action" value="$ButtonTitle">
<button type="submit" name="action_$Name" class="action custom-action<% if $extraClass %> $extraClass<% end_if %>">
{$DialogButtonTitle.RAW}
</button>
</div>
<% end_if %>
</div>
Expand Down

0 comments on commit 7a75f02

Please sign in to comment.