<?php
/* @var $this UserController */
/* @var $model User */
/* @var $form CActiveForm */
?>
<div style="height:525px; background-color:#f7eee1;" id="communicationsbox">
<div class="form_wrapper">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'user-form',
	'enableAjaxValidation'=>false,
)); ?>

	<div id="row">
  <fieldset id="current">
    <legend><strong><?php if($model->isNewRecord) echo "New User"; else echo "Update User"; ?></strong></legend>

<br>
  <table width="800" cellspacing="0" cellpadding="5" border="0">
    <tbody><tr>
      <td width="303" align="right"><?php echo $form->labelEx($model,'fullname'); ?><br>
       </td>
      <td width="485">&nbsp;&nbsp;
        
		<?php echo $form->textField($model,'fullname',array('size'=>20,'maxlength'=>255)); ?>
		<?php echo $form->error($model,'fullname'); ?></td>
    </tr>
    <tr>
      <td align="right"><?php echo $form->labelEx($model,'company_email_address'); ?></td>
      <td>&nbsp;&nbsp;
        
		<?php echo $form->textField($model,'company_email_address',array('size'=>20,'maxlength'=>255)); ?>
		<?php echo $form->error($model,'company_email_address'); ?></td>
    </tr>
    
    <?php if($model->isNewRecord) { ?>
    <tr>

      <td align="right"><?php echo $form->labelEx($model,'password'); ?></td>

      <td>&nbsp;&nbsp;    

		<?php echo $form->passwordField($model,'password',array('size'=>20,'maxlength'=>50,'value'=>'')); ?>
		<?php echo $form->error($model,'password'); ?></td>

    </tr>
    <?php } ?>
    <tr>
      <td align="right"><?php echo $form->labelEx($model,'designation'); ?></td>
      <td>&nbsp;&nbsp;
        
		<?php echo $form->textField($model,'designation',array('size'=>20,'maxlength'=>255)); ?>
		<?php echo $form->error($model,'designation'); ?>
        </td>
    </tr>
    <tr>
      <td align="right"><?php echo $form->labelEx($model,'company_name'); ?></td>
      <td>&nbsp;&nbsp;
        
		<?php echo $form->textField($model,'company_name',array('size'=>20,'maxlength'=>255)); ?>
		<?php echo $form->error($model,'company_name'); ?></td>
    </tr>
    <tr>
      <td align="right"><?php echo $form->labelEx($model,'mobile_number'); ?></td>
      <td>&nbsp;&nbsp;
        
		<?php echo $form->textField($model,'mobile_number',array('size'=>15,'maxlength'=>15)); ?>
		<?php echo $form->error($model,'mobile_number'); ?></td>
    </tr>
    <tr>
      <td align="right"><?php echo $form->labelEx($model,'country_id'); ?></td>
      <td>&nbsp;&nbsp;&nbsp;
        
		<?php echo $form->dropDownList($model,'country_id',Country::getCountry()); ?> 
		<?php echo $form->error($model,'country_id'); ?></td>
    </tr>
    <tr>
      <td align="right"><?php echo $form->labelEx($model,'city'); ?></td>
      <td>&nbsp;&nbsp;
        
		<?php echo $form->textField($model,'city',array('size'=>20,'maxlength'=>255)); ?>
		<?php echo $form->error($model,'city'); ?></td>
    </tr>
    <tr>
      <td align="right"><?php echo $form->labelEx($model,'industry_id'); ?></td>
      <td>&nbsp;&nbsp;&nbsp;
        
		<?php echo $form->dropDownList($model,'industry_id',Industry::getIndustry()); ?>
		<?php echo $form->error($model,'industry_id'); ?></td>
    </tr>
    <tr>
      <td align="right"><?php echo $form->labelEx($model,'user_type_id'); ?></td>
      <td>&nbsp;&nbsp;&nbsp;        
		<?php echo $form->dropDownList($model,'user_type_id',UserType::getUserTypes()); ?>
		<?php echo $form->error($model,'user_type_id'); ?></td>
    </tr>
   
    <tr>
      <td valign="top" align="right"><?php echo $form->labelEx($model,'postal_address'); ?></td>
      <td>&nbsp;&nbsp;&nbsp;
        
		<?php echo $form->textArea($model,'postal_address',array('rows'=>6, 'cols'=>50)); ?>
		<?php echo $form->error($model,'postal_address'); ?></td>
    </tr>
    <tr>
      <td align="right"><?php echo $form->labelEx($model,'zip'); ?></td>
      <td>&nbsp;&nbsp;&nbsp;
        
		<?php echo $form->textField($model,'zip',array('size'=>15,'maxlength'=>15)); ?>
		<?php echo $form->error($model,'zip'); ?></td>
    </tr>
    <tr>
      <td align="right">&nbsp;</td>
      <td>&nbsp;&nbsp;&nbsp;<?php echo CHtml::submitButton($model->isNewRecord ? 'Submit' : 'Save'); ?></td>
    </tr>
  </tbody></table>
  </fieldset>
</div>

<?php $this->endWidget(); ?>

</div><!-- form -->
</div>
