chg: [helper:bootstrap] Added support of icon in confirm modal button

pull/121/head
Sami Mokaddem 2022-10-25 10:30:11 +02:00
parent 7ab3a5bfee
commit e98290fcba
No known key found for this signature in database
GPG Key ID: 164C473F627A06FA
1 changed files with 2 additions and 0 deletions

View File

@ -1069,6 +1069,7 @@ class BoostrapModal extends BootstrapGeneric
'bodyHtml' => false, 'bodyHtml' => false,
'footerHtml' => false, 'footerHtml' => false,
'confirmText' => 'Confirm', 'confirmText' => 'Confirm',
'confirmIcon' => false,
'cancelText' => 'Cancel', 'cancelText' => 'Cancel',
'modalClass' => [''], 'modalClass' => [''],
'headerClass' => [''], 'headerClass' => [''],
@ -1210,6 +1211,7 @@ class BoostrapModal extends BootstrapGeneric
$buttonConfirm = (new BoostrapButton([ $buttonConfirm = (new BoostrapButton([
'variant' => $variant, 'variant' => $variant,
'text' => h($this->options['confirmText']), 'text' => h($this->options['confirmText']),
'icon' => h($this->options['confirmIcon']),
'class' => 'modal-confirm-button', 'class' => 'modal-confirm-button',
'params' => [ 'params' => [
// 'data-bs-dismiss' => $this->options['confirmFunction'] ? '' : 'modal', // 'data-bs-dismiss' => $this->options['confirmFunction'] ? '' : 'modal',