Quantcast
Channel: Yii Framework Forum
Viewing all articles
Browse latest Browse all 18717

Inline Login Form

$
0
0
I my template i have to box on top of page for login,
after login this boxs must hide, and i have profile and logout link
I have also use yii-user for user management,

So,
I think i must use something like this:
<?php
$form = $this->beginWidget('bootstrap.widgets.TbActiveForm', array(
			'id'=>'inlineForm',
			'type'=>'inline',
			'action'=>'login',
			'htmlOptions'=>array('class'=>'well'),
		)); ?>
 
<?php echo $form->textFieldRow($model, 'textField', array('class'=>'input-small')); ?>
<?php echo $form->passwordFieldRow($model, 'password', array('class'=>'input-small')); ?>
<?php $this->widget('bootstrap.widgets.TbButton', array('buttonType'=>'submit', 'label'=>'Log in')); ?>
<?php $this->endWidget();

but in main page of site (sitecontroller), We dont have any $model!
what can i do?

Viewing all articles
Browse latest Browse all 18717