<div class="modal fade" tabindex="-1" id="vehicle_add_modal" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
  <div class="modal-dialog " role="document" style="max-width: 800px">
    <div class="modal-content">
      <div class="modal-header" style="background-color: #36a3f7;border-radius: 4px">
        <h5 class="modal-title" id="exampleModalLabel" style="color: #ffffff" >
          Create New Vehicle  <?php if($this->config->item('app_module_vehicle_management')==1){ ?>(Rental)<?php } ?>
        </h5>
        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
          <span aria-hidden="true">
            &times;
          </span>
        </button>
      </div>
      <form autocomplete="off" data-form-type="vehicle_create" id="form_vehicle_add" data-modal-id="vehicle_add_modal" method="post" action="<?php echo base_url().'vehicles/create'?>" enctype="multipart/form-data" class="m-form m-form--fit m-form--state m-form--label-align-right " >
        <div class="modal-body">
          <div class="m-form__content">
            <div class="m-alert m-alert--icon alert alert-warning m--hide" role="alert" id="form_vehicle_add_msg">
              <div class="m-alert__icon">
                <i class="la la-warning"></i>
              </div>
              <div class="m-alert__text">
                Oh snap! Change a few things up and try submitting again.
              </div>
              <div class="m-alert__close">
                <button type="button" class="close" data-close="alert" aria-label="Close"></button>
              </div>
            </div>
          </div>
          <div class="row">
              <div class="col-lg-12" style="padding:20px">
            <?php if($this->config->item('app_module_vehicle_management')==1){ ?>
              <a style="padding-left:30%" href="<?php echo base_url()?>vehicles/add"><span class="m-badge m-badge--focus m-badge--wide"><i class="fa fa-plus-circle"></i> Click Here to Add Owned Vehicle</span></a>
            <?php } ?>
          </div>
            <div class="col-lg-6">
              <div class="form-group m-form__group">
                <label for="user_name">
                  Vehicle Name
                </label>
                <div class="input-group m-input-group m-input-group--pill m-input-group--air">
                  <div class="input-group-prepend">
                    <span class="input-group-text" id="basic-addon1">
                      <i class="fa fa-truck"></i>
                    </span>
                  </div>
                  <input style="text-transform: uppercase;" required placeholder="Eg: TATA TIPPER 1612" type="text" name="vehicle_name"  class="form-control form_vehicle_add_fields m-input" placeholder="Vehicle Name" aria-describedby="basic-addon1">
                </div>
                <span class="m-form__help"></span>
              </div>
            </div>
            <div class="col-lg-6">
              <div class="form-group m-form__group">
                <label for="user_name">
                  Vehicle Number
                </label>
                <div class="input-group m-input-group m-input-group--pill m-input-group--air">
                  <div class="input-group-prepend">
                    <span class="input-group-text" id="basic-addon1">
                      <i class="fa fa-address-card"></i>
                    </span>
                  </div>
                  <input style="text-transform: uppercase;" placeholder="Eg: KL-11-AA-1001" required type="text" name="vehicle_number"  class="form_vehicle_add_fields form-control m-input" placeholder="Vehicle Number" aria-describedby="basic-addon1">
                </div>
                <span class="m-form__help"></span>
              </div>
            </div>
          </div>
          <div class="row">
            <div class="col-lg-6">
              <div class="form-group m-form__group">
                <label for="user_name">
                  Consignee Name (Driver/Owner/Company)
                </label>
                <div class="input-group m-input-group m-input-group--pill">
                  <div class="input-group-prepend">
                    <a href="#consignee_add_modal"   data-toggle="modal" data-target="#consignee_add_modal" class="btn btn-focus">
                      <i class="fa fa-plus-circle"></i>
                    </a>
                  </div>
                  <select style="width: 80%"  class="form-control m-select2 m-select2-general form_vehicle_add_select" required id="consignee_add" name="consignee">

                  </select>
                </div>
                <span class="m-form__help"></span>
              </div>
            </div>
            <div class="col-lg-6">
              <div class="form-group m-form__group m-select2--pill">
                <label for="user_name">
                  Vehicle Type
                </label>
                <div class="m-select2 m-select2--air m-select2--pill">
                  <select style="width: 100%" class="form-control m-select2 m-select2-general" required id="vehicle_type" name="vehicle_type" data-placeholder="Select Vehicle Type">
                    <option disabled="" selected="">Select the Vehicle type</option>
                    <option value="rent">Rent/Hired</option>
                    <?php if($this->config->item('app_module_vehicle_management')!=1){ ?>
                      <option value="own">Own</option>
                    <?php } ?>
                  </select>
                </div>
                <span class="m-form__help"></span>
              </div>
            </div>
          </div>
          <div class="row">
            <div class="col-lg-6">
              <div class="form-group m-form__group">
                <label for="user_name">
                  Basic Charge
                </label>
                <div class="input-group m-input-group m-input-group--pill m-input-group--air">
                  <div class="input-group-prepend">
                    <span class="input-group-text" id="basic-addon1">
                      <i class="fa fa-users"></i>
                    </span>
                  </div>
                  <input required type="text" name="basic_charge"  class="form_vehicle_add_fields form-control m-input" placeholder="Basic Charge" aria-describedby="basic-addon1">
                </div>
                <span class="m-form__help"></span>
              </div>
            </div>
            <div class="col-lg-6">
              <div class="form-group m-form__group m-select2--pill">
                <label for="user_name">
                  Work Duration Type
                </label>
                <div class="m-select2 m-select2--air m-select2--pill">
                  <select style="width: 100%" class="form-control m-select2 m-select2-general" required id="work_duration_type" name="work_duration_type" data-placeholder="Select Vehicle Type">
                    <option disabled="" selected="">Select the Duration type</option>
                    <option value="Hour">Hour</option>
                    <option value="Trip">Trip</option>
                    <option value="Kilometer">Kilometer</option>
                    <option value="Day">Day</option>
                    <option value="Month">Month</option>
                  </select>
                </div>
                <span class="m-form__help"></span>
              </div>
            </div>
            <div class="col-xl-4">
              <div class="form-group m-form__group">
                <label>Loading Capacity (CFT):</label>
                <input type="text"  name="loading_capacity_cft" class="form-control m-input m-input--air m-input--pill" placeholder="Loading Capacity (CFT)" >
                <span class="m-form__help"></span>
              </div>
            </div>
            <div class="col-xl-4">
              <div class="form-group m-form__group">
                <label>Loading Capacity (TON):</label>
                <input type="text"  name="loading_capacity_ton" class="form-control m-input m-input--air m-input--pill" placeholder="Loading Capacity (TON)" >
                <span class="m-form__help"></span>
              </div>
            </div>
            <div class="col-xl-4">
              <div class="form-group m-form__group">
                <label>Opening Balance Payable:</label>
                <input type="text" value="0" required  name="op_balance" class="form-control m-input m-input--air m-input--pill" placeholder="OP Balance" >
                <span class="m-form__help">Outstanding Balance At the time of Creation</span>
              </div>
            </div>
          </div>
        </div>
        <div class="modal-footer">
          <button type="button" class="btn btn-secondary" data-dismiss="modal">
            Close
          </button>
          <button type="submit" class="btn btn-primary form_submit_btn">
            Submit
          </button>
        </div>
      </form>
    </div>
  </div>
</div>
