public function renderButton()
    {
        if (!empty($this->buttonOptions) && is_array($this->buttonOptions)) {
            TbArray::defaultValue('data-toggle', 'modal', $this->buttonOptions);

            if ($this->remote !== null) {
                $this->buttonOptions['data-remote'] = CHtml::normalizeUrl($this->remote);
            }

            $selector = '#' . $this->htmlOptions['id'];
            $label = TbArray::popValue('label', $this->buttonOptions, 'button');
            $attr = isset($this->buttonOptions['data-remote']) ? 'data-target' : 'href';
            TbArray::defaultValue($attr, $selector, $this->buttonOptions);
            echo TbHtml::button($label, $this->buttonOptions);
        }
    }