<?php
$this->pageTitle = Yii::app()->name . ' - ' . UserModule::t("Login");
$this->breadcrumbs = array(
    UserModule::t("Login"),
);
?>
<div id="login-box" class="login-box visible widget-box no-border">
    <div class="widget-body">
	<div class="widget-main">
	    <h4 class="header blue lighter bigger">
		<?php echo Yii::t('site', 'Login'); ?>
	    </h4>
	    <div class="space-6"></div>
	    <fieldset>
		<?php if (Yii::app()->user->hasFlash('loginMessage')): ?>
    		<div class="success">
			<?php echo Yii::app()->user->getFlash('loginMessage'); ?>
    		</div>
		<?php endif; ?>
		<?php echo CHtml::beginForm(); ?>
		<?php echo CHtml::errorSummary($model); ?>
		<label class="block clearfix required">
		    <span class="block input-icon input-icon-right">
			<?php echo CHtml::activeTextField($model, 'username', array('class' => 'form-control','autocomplete'=>'off', 'placeholder' => $model->getAttributeLabel('username'))); ?>
			<i class="icon-user"></i>
		    </span>
		</label>
		<label class="block clearfix required">
		    <span class="block input-icon input-icon-right">
			<?php echo CHtml::activePasswordField($model, 'password', array('class' => 'form-control','autocomplete'=>'off', 'placeholder' => $model->getAttributeLabel('password'))); ?>
			<i class="icon-lock"></i>
		    </span>
		</label>
		<div class="space"></div>
		<div class="clearfix">
		    <label class="inline">
			<?php echo CHtml::activeCheckBox($model, 'rememberMe',array('class'=>'ace')); ?>
			<span class="lbl"> <?php echo $model->getAttributeLabel('rememberMe'); ?></span>
		    </label>
		    <div class="row submit">
			<?php echo CHtml::submitButton(UserModule::t("Login"), array('class' => 'width-35 pull-right btn btn-sm btn-primary')); ?>
		    </div>
		</div>
	    </fieldset>
	    <?php echo CHtml::endForm(); ?>
	</div>
	<?php
	$form = new CForm(array(
	    'elements' => array(
		'username' => array(
		    'type' => 'text',
		    'maxlength' => 32,
		),
		'password' => array(
		    'type' => 'password',
		    'maxlength' => 32,
		),
		'rememberMe' => array(
		    'type' => 'checkbox',
		)
	    ),
	    'buttons' => array(
		'login' => array(
		    'type' => 'submit',
		    'label' => 'Login',
		),
	    ),
		), $model);
	?>
    </div>
</div><!-- /widget-body -->
</div><!-- /login-box -->