Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TbPanel with one single button #1017

Open
beatep opened this issue Mar 13, 2015 · 1 comment
Open

TbPanel with one single button #1017

beatep opened this issue Mar 13, 2015 · 1 comment
Labels

Comments

@beatep
Copy link

beatep commented Mar 13, 2015

Hi,
I tried to create a TbPanel with a single button with a url:

$this->beginWidget('booster.widgets.TbPanel',
    array(
        'title' => 'SomeTitle',
        'headerButtons' => array(
            array(
                'class' => 'booster.widgets.TbButton',
                'label' => 'Neu',
                'context' => 'primary',
                'size' => 'small',
                'url' => '/someurl',
            ),
        )
    )
)

With this code I get blue button, but w/o a link. If I add buttonType, I get a link, but it is no longer a blue button.

$this->beginWidget('booster.widgets.TbPanel',
    array(
        'title' => 'SomeTitle',
        'headerButtons' => array(
            array(
                'class' => 'booster.widgets.TbButton',
                'label' => 'Neu',
                'context' => 'primary',
                'size' => 'small',
                'buttonType' =>'link',
                'url' => '/someurl',
            ),
        )
    )
)

Is this a bug or a feature?

@beatep beatep changed the title TbPanel with one singe button TbPanel with one single button Mar 13, 2015
@cgonza85
Copy link

This is an old question but someone might have the same problem and find this answer helpful:

$this->beginWidget('booster.widgets.TbPanel',
    array(
        'title' => 'SomeTitle',
        'headerButtons' => array(
            array(
                'class' => 'booster.widgets.TbButton',
                'label' => 'Neu',
                'context' => 'primary',
                'size' => 'small',
                'htmlOptions'=>array(
                    'submit' => Yii::app()->createUrl('controller/action')
                )
            ),
        )
    )
)

@hijarian hijarian added the bug label Nov 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants