public function renderToggleButton($content, $options = []) { if (!isset($options['id'])) { $options['id'] = $this->getId() . '-button'; } $this->getView()->registerJs(' jQuery("#' . $options['id'] . '").on("click", function(event) { event.preventDefault(); jQuery("#' . $this->getId() . '").modal("show"); }); '); return Elements::button($content, $options); }