<div class="content-wrapper">
  <section class="content-header">
    <h1>
       <?= $pTitle ?>
        <small><?= $pDescription ?></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"><?= $smenu ?></li>
    </ol>
  </section>
  <section class="content">
    <div class="row">
      <div class="col-md-12">
        <?php 
        $url = (!isset($import_id) || empty($import_id))?'ImportData/importCsvData':'';
        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>
            <div><?= $flashdata['message'] ?></div>
          </div>
        <?php } ?>
      </div>
      <div class="col-md-12">
        <div class="box box-warning">
          <div class="box-body">
            <form role="form" action="<?= base_url($url) ?>" method="post" 
              class="validate" data-parsley-validate="" enctype="multipart/form-data">
              <div class="col-md-12">
                <div class="col-md-6">
                  <div class="form-group">
                    <label>Select Import Type</label>
                    <select name="import_id" id="import_id" class="form-control required" placeholder="Select Brand" required="">
                      <option selected disabled>Uploaded Type</option>
                      <option value = "1">Mechanic Details</option>
                      <option value = "2">Customer Details</option>
                      <option value = "3">Product Details</option>
                    </select> 
                  </div> 
                </div>
                <div class="col-md-6 hide" id="import_file">
                  <div class="form-group">
                    <label>Import File</label>
                    <div class="col-md-12" style="padding-bottom:10px;">
                      <div class="col-md-9" style="padding-top: 5px;">
                        <input name="file" type="file" accept=".csv,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel" 
                          onchange="setImg(this,'brand_image');" />
                      </div>
                    </div>
                  </div> 
                </div>
              </div>
              <div class="col-md-12">      
                <div class="box-footer textCenterAlign">
                  <button type="submit" class="btn btn-primary">Submit</button>
                  <a href="<?= base_url('Brand/viewbrands') ?>" class="btn btn-primary">Cancel</a>
                </div>        
              </div>        
            </form>
          </div>
        </div>
      </div>
    </div>
  </section>
</div>