Bootstrap Button + Ajax + Modal

I have created a TbButton which works fine


$this->widget('bootstrap.widgets.TbButton',array(

        'buttonType' => 'ajaxLink',

        'id' => 'friendship',

        'type' => 'link',

        'label' => $relationship['cancel'],

        'size' => 'small',

        'url' => $this->createURL('/friendship/friendship/requests'),

        'disabled' => false,

        'ajaxOptions' => array(

                'type' => 'Post',

                'url' => $this->createURL('/friendship/friendship/requests'),

                'data' => Yii::app()->request->csrfTokenName."=".Yii::app()->request->getCsrfToken()."&action=cancel&user=".$model->username,

                'success'=>"js:function(vals){

                                $('#yt0').text('".Yii::t('profile','Add as a friend')."');

                                $('#yt0').attr('class','btn btn-warning btn-small');

                                $('#yt1').text('');

                       

                }",

                )

));

But how do I get the modal inside? I tried this:


$this->widget('bootstrap.widgets.TbButton',array(

	'buttonType' => 'ajaxLink',

	'id' => 'friendship',

	'type' => 'link',

	'label' => $relationship['cancel'],

	'size' => 'small',

	'url' => $this->createURL('/friendship/friendship/requests'),

	'disabled' => false,

	'htmlOptions'=>array(

        'data-toggle' => 'modal',

        'ajax' => array(

			'type' => 'Post',

			'url' => $this->createURL('/friendship/friendship/requests'),

			'data' => Yii::app()->request->csrfTokenName."=".Yii::app()->request->getCsrfToken()."&action=cancel&user=".$model->username,

            //'processData' => false,

			'success'=>"js:function(vals){ 

					$('#yt0').text('".Yii::t('profile','Add as a friend')."');

					$('#yt0').attr('class','btn btn-warning btn-small');

					$('#yt1').text('');

				

			}",

			),

        ),

));

but no success.

You probably should use 4-th parameter processOutput=true in renderPatrial in /friendship/friendship/requests