  <div id="div_ip_error" style="color: red;text-align:center;"></div>
   <?php
            $form = $this->beginWidget('CActiveForm', array(
                'id' => 'ip-form',
                'enableAjaxValidation' => false,
                'enableClientValidation' => false,
            ));
            ?>
    <?php
      $modelCompany = new MasCompany();
      $ip = "";
      $modelCompany = $modelCompany->findByPk((int)Yii::app()->user->master_user_company_id);
      if(!empty($modelCompany))
        $ip = $modelCompany->ip_address;

    ?>
    <ul class="row clearfix form-ul material">
    <li class="col-sm-4">   
    <?php echo CHtml::textField('ip_address',$ip,array('data-label'=>'Ip Address','onkeypress' => 'return isPositiveNumber(event)')); ?>

                <!-- <input type="text" name="ip_address" id="ip_address" value="<?php echo $ip; ?>" onkeypress= 'return isPositiveNumber(event)' > -->
        </li>
    </ul>     
     <div class="modal-footer">
            <button type="button" class="btn btn-danger" id="mas_close" data-dismiss="modal">Close</button>
                 <?php echo CHtml::ajaxSubmitButton('Update ', Yii::app()->createUrl('site/UpdateIpAddress'), array(
                            'dataType' => 'json',
                            'type' => 'post',
                            'success' => 'function(data) {
                             $("#loader").hide();
                                if(data.status=="success"){
                               t8.success(" Changed Successfully","success");
                               $("#mas_close").click();
                                } 
                               else
                               {
                               t8.error(" Updation Failed");
                                 }
                                
                            }',
			                'beforeSend' => 'function(){
                             $("#loader").show();
                                        $("#ip-form .maintenance-save-btn").prop("disabled", true);
                                         $(".toast").hide();
                             
                        }',
		 
		), array('id' => 'mybtn' . rand(), 'class' => 'maintenance-save-btn btn btn-primary')); ?>
		
                              </div>           
 <?php $this->endWidget(); ?>    
</ul>   