crisu83 / yiistrap

Twitter Bootstrap for the Yii PHP framework.
http://www.getyiistrap.com
BSD 3-Clause "New" or "Revised" License
286 stars 176 forks source link

Modal options "remote" does not work #116

Open mitrii opened 11 years ago

mitrii commented 11 years ago

I think, missed 3rd parameter in function TbArray::popValue on line 160

crisu83 commented 11 years ago

Please explain this issue and I'll see what I can do.

mitrii commented 11 years ago

For example:

    <?php $this->widget('bootstrap.widgets.TbModal', array(
        'id' => 'myModal',
        'header' => 'Modal Heading',
        'remote' => 'http://example.com',
        'footer' => array(
            TbHtml::button('Save Changes', array('data-dismiss' => 'modal', 'color' => TbHtml::BUTTON_COLOR_PRIMARY)),
            TbHtml::button('Close', array('data-dismiss' => 'modal')),
        ),
    )); ?>

Any value in option "remote" ignored, because in line 160 of TbModal.php missed 3rd parameter:

if ($remote = TbArray::popValue('remote', $this->options)) {

Must be:

if ($remote = TbArray::popValue('remote', $this->options, $this->remote)) {
crisu83 commented 11 years ago

I will fix this when add the new version of the modal widget. #148