南龙 2012-08-22 10:31:42 3949次浏览 0条回复 0 0 0
<?php $this->pageTitle=Yii::app()->name; ?>
    <div class="span7">
        <?php $this->widget('bootstrap.widgets.BootCarousel', array(
            'items'=>array(
                array('image'=>'images/01.jpg', 'label'=>'Family', 'caption'=>'Share with your family.'),
                array('image'=>'images/02.jpg', 'label'=>'Friends', 'caption'=>'Share with your friends.'),
                array('image'=>'images/03.jpg', 'label'=>'Mates', 'caption'=>'Share with your mates.'),
            ),
        )); ?>
    </div>
    <div class="span4">
        <?php $this->widget('bootstrap.widgets.BootTabbable', array(
        'type'=>'tabs',
        'placement'=>'below', // 'above', 'right', 'below' or 'left'
        'tabs'=>array(
            array('label'=>'注册', 'content'=>$this->renderPartial('_RegForm',array('regModel' => $regModel),true), 'active'=>true),//调用注册表单,AJAX注册按钮不起作用.直接就是return true;
            array('label'=>'登录', 'content'=>$this->renderPartial('_LoginForm',array('model' => $model),true)),
        ),
    )); ?>
    </div>

<?php
//这个表单
$regForm = $this->beginWidget('bootstrap.widgets.BootActiveForm', array(
    'id' => 'verticalForm',
    'htmlOptions' => array('class' => 'well'),
    'action' => array('/site/reg'),
    'method' => 'post',
    'enableAjaxValidation' => true,
    'enableClientValidation' => true,
    'clientOptions' => array(
        'validateOnSubmit' => true,
    )
));
echo $regForm->textFieldRow($regModel, 'username', array('class' => 'span3'));
echo $regForm->passwordFieldRow($regModel, 'password', array('class' => 'span3') );
echo $regForm->passwordFieldRow($regModel,'password2', array('class' => 'span3'));
echo $regForm->textFieldRow($regModel, 'email', array('class' => 'span3') );
echo $regForm->textFieldRow($regModel, 'verifyCode',array('class' => 'span3'));
$this->widget('CCaptcha', array(
    'buttonLabel' => '看不清楚,换一张',
    'imageOptions' => array(
        'id' => 'regCode',
    )

));
//这个为什么不经过AJAX验证上面的几个属性全部通过才起作用?
$regForm->widget('bootstrap.widgets.BootButton', array(
    'buttonType'=>'submit',
    'icon'=>'ok',
    'label'=>'注册',
));
$this->endwidget();
?>
    没有找到数据。
您需要登录后才可以回复。登录 | 立即注册