<?php  
  $baseUrl = Yii::app()->baseUrl; 
  $cs = Yii::app()->getClientScript();
  $cs->registerScriptFile($baseUrl.'/js/ckeditor/ckeditor.js');
?>
<link href="<?php echo Yii::app()->baseUrl; ?>/css/bootstrap.css" rel="stylesheet">
<div class="innercontent_outerbox">
  <h1><?php echo $model->isNewRecord ? 'Registration' : 'Edit Profile'; ?></h1>
  <div class="row">
    <div class="span8">
      <?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'user-form',
	'enableAjaxValidation'=>false,
	'htmlOptions' => array(
        'enctype' => 'multipart/form-data',
		'class'=>'form-horizontal'
    ),
)); ?>
      <fieldset>
        <div class="control-group"> <?php echo $form->labelEx($model,'fullname',array('class'=>'control-label')); ?>
          <div class="controls"> <?php echo $form->textField($model,'fullname',array('class'=>'input-xlarge','rel'=>'popover')); ?> <?php echo $form->error($model,'fullname'); ?> </div>
        </div>
        <div class="control-group"> <?php echo $form->labelEx($model,'company_email_address',array('class'=>'control-label')); ?>
          <div class="controls"> <?php echo $form->textField($model,'company_email_address',array('class'=>'input-xlarge','rel'=>'popover')); ?> <?php echo $form->error($model,'company_email_address'); ?> </div>
        </div>
        
        <?php if($model->isNewRecord):?>
        <div class="control-group"> <?php echo $form->labelEx($model,'password',array('class'=>'control-label')); ?>
          <div class="controls"> <?php echo $form->passwordField($model,'password',array('class'=>'input-xlarge','rel'=>'popover')); ?> <?php echo $form->error($model,'password'); ?> </div>
        </div>
        
        <div class="control-group"> <?php echo $form->labelEx($model,'repeat_password',array('class'=>'control-label')); ?>
          <div class="controls"> <?php echo $form->passwordField($model,'repeat_password',array('class'=>'input-xlarge','rel'=>'popover')); ?> <?php echo $form->error($model,'repeat_password'); ?> </div>
        </div>
        <?php endif; ?>
        
        
        <div class="control-group"> <?php echo $form->labelEx($model,'personal_email',array('class'=>'control-label')); ?>
          <div class="controls"> <?php echo $form->textField($model,'personal_email',array('class'=>'input-xlarge','rel'=>'popover')); ?> <?php echo $form->error($model,'personal_email'); ?> </div>
        </div>
        <div class="control-group"> <?php echo $form->labelEx($model,'designation',array('class'=>'control-label')); ?>
          <div class="controls"> <?php echo $form->textField($model,'designation',array('class'=>'input-xlarge','rel'=>'popover')); ?> <?php echo $form->error($model,'designation'); ?> </div>
        </div>
        <div class="control-group"> <?php echo $form->labelEx($model,'company_name',array('class'=>'control-label')); ?>
          <div class="controls"> <?php echo $form->textField($model,'company_name',array('class'=>'input-xlarge','rel'=>'popover')); ?> <?php echo $form->error($model,'company_name'); ?> </div>
        </div>
        <div class="control-group"> <?php echo $form->labelEx($model,'sales_man',array('class'=>'control-label')); ?>
          <div class="controls"> <?php echo $form->textField($model,'sales_man',array('class'=>'input-xlarge','rel'=>'popover')); ?> <?php echo $form->error($model,'sales_man'); ?> </div>
        </div>
        <div class="control-group"> <?php echo $form->labelEx($model,'postal_address',array('class'=>'control-label')); ?>
          <div class="controls"> <?php echo $form->textArea($model,'postal_address',array('rows'=>4, 'cols'=>50)); ?> <?php echo $form->error($model,'postal_address'); ?> </div>
        </div>
        <div class="control-group"> <?php echo $form->labelEx($model,'zip',array('class'=>'control-label')); ?>
          <div class="controls"> <?php echo $form->textField($model,'zip',array('class'=>'input-xlarge','rel'=>'popover','size'=>15,'maxlength'=>15)); ?> <?php echo $form->error($model,'zip'); ?> </div>
        </div>
        <div class="control-group"> <?php echo $form->labelEx($model,'mobile_number',array('class'=>'control-label')); ?>
          <div class="controls"> <?php echo $form->textField($model,'mobile_number',array('class'=>'input-xlarge','rel'=>'popover','size'=>15,'maxlength'=>15)); ?> <?php echo $form->error($model,'mobile_number'); ?> </div>
        </div>
        <div class="control-group"> <?php echo $form->labelEx($model,'telephone',array('class'=>'control-label')); ?>
          <div class="controls"> <?php echo $form->textField($model,'telephone',array('class'=>'input-xlarge','rel'=>'popover','size'=>15,'maxlength'=>15)); ?> 
              <?php echo $form->error($model,'telephone'); ?> </div>
        </div>
        <div class="control-group"> <?php echo $form->labelEx($model,'country_id',array('class'=>'control-label')); ?>
          <div class="controls"> <?php echo $form->dropDownList($model,'country_id',Country::getCountry()); ?> <?php echo $form->error($model,'country_id'); ?> </div>
        </div>
        <div class="control-group"> <?php echo $form->labelEx($model,'city',array('class'=>'control-label')); ?>
          <div class="controls"> <?php echo $form->textField($model,'city',array('class'=>'input-xlarge','rel'=>'popover')); ?> <?php echo $form->error($model,'city'); ?> </div>
        </div>
        <div class="control-group"> <?php echo $form->labelEx($model,'industry_id',array('class'=>'control-label')); ?>
          <div class="controls"> <?php echo $form->dropDownList($model,'industry_id',Industry::getIndustry()); ?> <?php echo $form->error($model,'industry_id'); ?> </div>
        </div>
        



       <?php //if(CCaptcha::checkRequirements()): ?> 
       <!-- <div class="control-group"> <label class="control-label" for="input01"></label>
          <div class="controls"> <?php //$this->widget('CCaptcha'); ?>
		<?php //echo $form->textField($model,'verifyCode',array('class'=>'txt-style width-141')); ?><?php //echo $form->error($model,'verifyCode'); ?> <div class="hint">Please enter the letters as they are shown in the image above.
		<br/>Letters are not case-sensitive.</div> </div>
        </div>-->
        <?php //endif; ?>




        
        <div class="control-group">
          <label class="control-label" for="input01"></label>
          <div class="controls">
            <?php echo CHtml::submitButton($model->isNewRecord ? 'Register' : 'Save',array('class'=>'btn btn-success','rel'=>'tooltip' )); ?>
          </div>
        </div>
      </fieldset>
      <?php $this->endWidget(); ?>
    </div>
  </div>
</div>