<div class="content-wrapper">
 <section class="content-header">
  <h1>
    <?= $page_title ?>
    <small><?= $page_desc ?></small>
  </h1>
  <ol class="breadcrumb">
   <li><a href="<?= base_url() ?>"><i class="fa fa-star-o" aria-hidden="true"></i>Home</a></li>
   <li><?= $menu ?></li>
   <li class="active"><?= $sub_menu ?></li>
 </ol>
</section>
<section class="content">
  <div class="row">
     <div class="col-md-12">
      <?php if($this->session->flashdata('message')) { 
        $flashdata = $this->session->flashdata('message'); ?>
        <div class="alert alert-<?= $flashdata['class'] ?>">
         <button class="close" data-dismiss="alert" type="button">×</button>
         <?= $flashdata['message'] ?>
       </div>
     <?php } ?>
   </div>
   <div class="col-md-12">
    <div class="box box-warning">
     <div class="box-header with-border">
       <h3 class="box-title">Add User Details</h3>
     </div>
      <form role="form" action="<?= base_url('Company/update/'.encode_param($company_id)) ?>" method="post" class="validate" data-parsley-validate="" enctype="multipart/form-data">
        <div class="box-body">
          <div class="col-md-6">
           <div class="form-group has-feedback">
             <label for="exampleInputEmail1">Company Name</label>
             <input type="text" class="form-control required" data-parsley-trigger="change"  
             data-parsley-minlength="2"  data-parsley-pattern="^[a-zA-Z\ . ! @ # $ % ^ & * () + = , \/]+$" required="" name="company_name" value="<?= $company_data->company_name ?>" placeholder="Enter Company Name">
             <span class="glyphicon  form-control-feedback"></span>
           </div>
           <div class="form-group has-feedback">
             <label for="exampleInputEmail1">Email</label>
             <input type="email" class="form-control required" data-parsley-trigger="change"  
             data-parsley-minlength="2"  required="" name="email_id" placeholder="Enter email ID"  value="<?= $company_data->username ?>">
             <span class="glyphicon  form-control-feedback"></span>
           </div>  
          <div class="form-group has-feedback">
           <label for="exampleInputEmail1">Address</label>
           <textarea class="ip_reg_form_input form-control reset-form-custom required" placeholder="Enter Company Address" name="address" data-parsley-trigger="change" data-parsley-minlength="2" required=""><?= $company_data->company_name ?></textarea>
           <span class="glyphicon  form-control-feedback"></span>
         </div> 
         <div class="form-group has-feedback">
           <label for="exampleInputEmail1">Company Federal ID</label>
           <input type="text" class="form-control" data-parsley-trigger="change"  
           data-parsley-minlength="2" name="company_federal_id" placeholder="Enter Company Federal ID"  value="<?= $company_data->company_federal_id ?>">
           <span class="glyphicon  form-control-feedback"></span>
         </div>          
           <div class="col-md-12">          
            <div class="box-footer">
              <button type="submit" class="btn btn-primary">Submit</button>
            </div>        
          </div>     
        </div>
        <div class="col-md-6">
         <div class="form-group has-feedback">
           <label for="exampleInputEmail1">Fax</label>
           <input type="number" class="form-control required" data-parsley-trigger="change"  
             data-parsley-minlength="2"  required="" name="fax" placeholder="Enter Fax Number" value="<?= $company_data->fax ?>">
             <span class="glyphicon  form-control-feedback"></span> 
         </div>
         <div class="form-group has-feedback">
           <label for="exampleInputEmail1">Phone</label>
           <input type="number" class="form-control required" data-parsley-trigger="change"  
             data-parsley-minlength="2"  required="" name="phone" placeholder="Enter Phone Number"  value="<?= $company_data->phone ?>">
             <span class="glyphicon  form-control-feedback"></span> 
         </div>
         <div class="form-group has-feedback">
           <label for="exampleInputEmail1">Company Contact</label>
           <input type="number" class="form-control required" data-parsley-trigger="change"  
             data-parsley-minlength="2" required="" name="company_contact" placeholder="Enter Company Contact Number" value="<?= $company_data->company_contact ?>">
             <span class="glyphicon  form-control-feedback"></span> 
         </div>
         <div class="form-group has-feedback">
           <label for="exampleInputEmail1">Contact Person Information</label>
           <input type="text" class="form-control required" data-parsley-trigger="change"  
             data-parsley-minlength="2"  required="" name="company_info" placeholder="Enter Contact Person Info" value="<?= $company_data->company_info ?>">
             <span class="glyphicon  form-control-feedback"></span> 
         </div> 
          <div class="form-group has-feedback">
            <label for="exampleInputEmail1">Profile Picture</label>
            <div class="col-md-12">
              <div class="col-md-3">
                <img id="image_id" src="<?= base_url($company_data->profile_image) ?>" onerror="this.src='<?=base_url("assets/images/user_avatar.jpg")?>';" height="75" width="75" />
              </div>
              <div class="col-md-9" style="padding-top: 25px;">
                <input name="profile_image" type="file" accept="image/*" onchange="setImg(this,'image_id');" />
              </div>
            </div>
          </div>
        </div> 
      </form>
    </div>
  </section>
</div>