<?php $this->pageTitle=Yii::app()->name . ' - SIGN UP'; ?>
<style>
	.codesection code b { text-style: underline }
</style>
<div class="container">
	<?php $this->widget('Breadcrumbs', array('crumbs' => array('Sign up' => null))); ?>
	<div class="row form">

		<div class="col-sm-6">
			<h2>SIGN UP</h2>
			<hr />
			<?php $this->widget('Flash', array('flashes'=>Yii::app()->user->getFlashes())); ?>
			<div class="highlight">
			<br />
			<?php $form=$this->beginWidget('CActiveForm', array('id'=>'signup-form', 'enableClientValidation'=>true, 'clientOptions'=>array('validateOnSubmit'=>true,), 'htmlOptions'=>array( 'class'=>'form-signin form-horizontal', 'role'=>'form'))); ?>
	
				<div class="form-group">
					<?php echo $form->labelEx($account,'email_address', array('class'=>'col-sm-3 control-label')); ?>
					<div class="col-sm-9">
						<?php echo $form->textField($account,'email_address',array('class'=>'form-control')); ?>
						<?php echo $form->error($account,'email_address'); ?>
					</div>
				</div>
				<div class="form-group">
					<?php echo $form->labelEx($account,'username', array('class'=>'col-sm-3 control-label')); ?>
					<div class="col-sm-9">
						<?php echo $form->textField($account,'username',array('class'=>'form-control')); ?>
						<?php echo $form->error($account,'username'); ?>
					</div>
				</div>
				<div class="form-group">
					<?php echo $form->labelEx($account,'password', array('class'=>'col-sm-3 control-label')); ?>
					<div class="col-sm-9">
						<?php echo $form->passwordField($account,'password',array('class'=>'form-control')); ?>
						<?php echo $form->error($account,'password'); ?>
					</div>
				</div>
				<hr />
				<div class="form-group">
					<?php echo $form->labelEx($user,'first_name', array('class'=>'col-sm-3 control-label')); ?>
					<div class="col-sm-9">
						<?php echo $form->textField($user,'first_name',array('class'=>'form-control')); ?>
						<?php echo $form->error($user,'first_name'); ?>
					</div>
				</div>
				
				<div class="form-group">	
					<?php echo $form->labelEx($user,'last_name', array('class'=>'col-sm-3 control-label')); ?>
					<div class="col-sm-9">
						<?php echo $form->textField($user,'last_name',array('class'=>'form-control')); ?>
						<?php echo $form->error($user,'last_name'); ?>
					</div>
				</div>
				
				<div class="form-group">	
					<?php echo $form->labelEx($user,'middle_name', array('class'=>'col-sm-3 control-label')); ?>
					<div class="col-sm-9">
						<?php echo $form->textField($user,'middle_name',array('class'=>'form-control')); ?>
						<?php echo $form->error($user,'middle_name'); ?>
					</div>
				</div>

				<div class="form-group">
					<?php echo $form->labelEx($user,'designation', array('class'=>'col-sm-3 control-label')); ?>
					<div class="col-sm-9">
						<?php echo $form->textField($user,'designation',array('class'=>'form-control')); ?>
						<?php echo $form->error($user,'designation'); ?>
					</div>
				</div>
				
				<hr />
				<?php echo CHtml::submitButton($account->isNewRecord ? 'REGISTER' : 'UPDATE', array('name'=>'submit', 'class'=>'btn btn-primary pull-right')); ?>

				<br class="clear clearfix" />
			<?php $this->endWidget(); ?>
			</div>
		</div>
		<div class="col-sm-6 codesection">
			<h2>Form Widget</h2>
			<hr />
			
			<div class="panel panel-default">
				<div class="panel-body">
					<small><b>CODE : </b></small>
				</div>
				<div class="panel-footer">
					<small>Begin Form Widget</small><br />
						<code>
							$form = $this->beginWidget('CActiveForm', array(<br />
								<span class="tab"></span>'id' => '<b>register-form</b>', <br />
								<span class="tab"></span>'enableClientValidation' => true, <br />
								<span class="tab"></span>'clientOptions' => array( 'validateOnSubmit' => true, ), <br />
								<span class="tab"></span>'htmlOptions' => array( 'class' => <b>'form-horizontal' </b>, 'role'=><b> 'form' </b> ),<br />
							)); <br />
						</code>
					
					<hr />
					
					<small>Form Label</small><br />
						<code>
							$form->labelEx($model,'attributeName', <br />
								<span class="tab"></span>array('class'=>'control-label')<br />
							); <br />
						</code>
				</div>
			</div>
			
			
		</div>
		
	</div>
</div>
