This commit is contained in:
simialbi 2023-07-24 10:15:56 +02:00
parent 5ea4bb6dc7
commit fbb568002a
No known key found for this signature in database
GPG Key ID: DBFA3B28F81D63A2
2 changed files with 2 additions and 4 deletions

View File

@ -92,10 +92,7 @@ trait BootstrapWidgetTrait
$view = $this->getView(); $view = $this->getView();
BootstrapPluginAsset::register($view); BootstrapPluginAsset::register($view);
// 'popover', 'toast' and 'tooltip' plugins not activates via data attributes // 'popover', 'toast' and 'tooltip' plugins not activates via data attributes
if ( if ($this->clientOptions !== false || in_array($name, ['popover', 'toast', 'tooltip'], true)) {
$this->clientOptions !== false
|| in_array($name, ['popover', 'toast', 'tooltip'], true)
) {
$name = ucfirst($name); $name = ucfirst($name);
$id = $this->options['id']; $id = $this->options['id'];
$options = empty($this->clientOptions) ? '{}' : Json::htmlEncode($this->clientOptions); $options = empty($this->clientOptions) ? '{}' : Json::htmlEncode($this->clientOptions);

View File

@ -59,6 +59,7 @@ class Button extends Widget
*/ */
public function run(): string public function run(): string
{ {
$this->registerPlugin('button');
return Html::tag( return Html::tag(
$this->tagName, $this->tagName,
$this->encodeLabel ? Html::encode($this->label) : $this->label, $this->encodeLabel ? Html::encode($this->label) : $this->label,