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

Rewrite the modal widget #148

Open
crisu83 opened this issue Oct 28, 2013 · 2 comments
Open

Rewrite the modal widget #148

crisu83 opened this issue Oct 28, 2013 · 2 comments
Assignees

Comments

@crisu83
Copy link
Owner

crisu83 commented Oct 28, 2013

No description provided.

@sganz
Copy link

sganz commented May 27, 2014

I was just testing this out and found that it works only if you have 'buttonOptions' defined with an array. So it will only work IF you have a default button created with the buttonOptions.

<?php $this->widget('bootstrap.widgets.TbModal', array(
    'id' => 'myModal',
    'header' => 'Modal Heading',
    'buttonOptions' => array('label'=>'Click Me to Open'),
    'remote' =>'/',
    'footer' => array(
        TbHtml::button('Save Changes', array('data-dismiss' => 'modal', 'color' => TbHtml::BUTTON_COLOR_DANGER)),
        TbHtml::button('Close', array('data-dismiss' => 'modal')),
     ),
));  ?>

Seems like it should be OK to not have a button and still generate the correct code for remote content. In the code it looks like it will only adds the option "data-remote" in the renderButton() code but might need to removed from that and go into the $htmlOptions in the init() method. Maybe way off as I'm just poking around in the code, not totally sure how it was intended to work ;)

Thanks for a great extension as well!

Sandy

@crisu83
Copy link
Owner Author

crisu83 commented Jun 6, 2014

Alright, in that case this is a bug. I won't have time to look at it now but feel free to make a PR to fix this.

@crisu83 crisu83 added bug and removed enhancement labels Jun 6, 2014
@crisu83 crisu83 assigned crisu83 and unassigned crisu83 Feb 11, 2015
@crisu83 crisu83 removed this from the 1.3.0 milestone Apr 17, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants