2
我試圖把在yiibooster的小工具的嚮導形式的內容,但我不能使它發揮作用。這個想法是客戶有一個一步一步的形式,在每個內容中選擇一些數據。Yii的助推器嚮導表單控件內容
微件是這樣的:
$this->widget(
'bootstrap.widgets.TbWizard',
array(
'type' => 'tabs', // 'tabs' or 'pills'
'pagerContent' => '<div style="float:right">
<input type="button" class="btn button-next" name="next" value="Siguiente" />
</div>
<div style="float:left">
<input type="button" class="btn button-previous" name="previous" value="Atrás" />
</div>
<br /><br />',
'options' => array(
'nextSelector' => '.button-next',
'previousSelector' => '.button-previous',
'onTabShow' => 'js:function(tab, navigation, index) {
var $total = navigation.find("li").length;
var $current = index+1;
var $percent = ($current/$total) * 100;
$("#wizard-bar > .bar").css({width:$percent+"%"});
}',
'onTabClick' => 'js:function(tab, navigation, index) {alert("Tab Click Disabled");return false;}',
),
'tabs' => array(
array(
'label' => 'Arrendatarios',
'content' => 'Home Content',
'active' => true
),
array('label' => 'Inmuebles', 'content' => 'Profile Content'),
array('label' => 'Fecha', 'content' => 'Messages Content'),
),
)
);
的我想在每個「內容」選項卡是這樣的:
$this->widget('bootstrap.widgets.TbGridView',
array(
'id'=>'arrendatario',
'selectableRows'=>1,
'selectionChanged'=>'obtenerArrendatario',
'type'=>'striped bordered condensed',
'dataProvider'=>$arrendatarios->search(),
'filter' => $arrendatarios,
'template'=>"{items}\n{pager}",
'columns'=>array(
array('name'=>'arrendatario_id_personal', 'header'=>'DNI',),
array('name'=>'arrendatario_nombre', 'header'=>'Nombre'),
array('name'=>'arrendatario_email', 'header'=>'Email'),
),
));
誰能幫助我?
謝謝!
我要去嘗試:d –
確定不要讓我知道你嘗試之後。 –
完美!非常感謝! :d –