<div class="modal fade" tabindex="-1" id="labour_assign_add_modal" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
  <div class="modal-dialog " role="document" style="max-width: 1022px">
    <div class="modal-content">
      <div class="modal-header" style="background-color: #36a3f7;border-radius: 4px">
        <h5 class="modal-title" id="exampleModalLabel" style="color: #ffffff" >
          Assign Labour
        </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="labour_assign" data-modal-id="labour_assign_add_modal" id="form_labour_assign" method="post" action="<?php echo base_url().'labours/assign_to_project'?>" enctype="multipart/form-data" class="form 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_user_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">
            <input type="hidden" name="unchecked_labours" id="unchecked_labours">
            <?php if($page_name!='work_profile'){?>
             <div class="col-lg-4">
              <div class="form-group m-form__group">
                <label for="user_name">
                  Project Name
                </label>
                <div class="m-select2 m-select2--air m-select2--pill">
                  <select required style="width: 100%" class="form-control m-select2 m-select2--solid m-input--solid m-input form_labour_assign_select" id="labour_work_view" name="work" data-placeholder="Select Work">
                    <option selected disabled>Select Work</option>
                    <?php
                    foreach($work_contracts as $row): ?>
                      <option data-work-status="<?php echo $row->work_status?>" value="<?php echo $row->work_id?>"><?php echo $row->work_name?></option>
                      <?php
                    endforeach;
                    ?>
                  </select>
                </div>
                <span class="m-form__help"></span>
              </div>
            </div>
          <?php } else{ ?>
            <input type="hidden" name="work" value="<?= $work_data->work_id?>">
          <?php } ?>


          <div class="col-lg-12">

            <div style="margin-top: 23px;display: none" id="labours_table_div">

              <label for="user_name">
                Labours
              </label>

              <div class="m-section">
                <!-- <h3 class="m-section__heading">Item Requirements</h3> -->
                <table style="width: 100%;max-width: 100%"  id="table_labour_assign_add" class="table order-list table-striped table-bordered table-advance table-hover">
                  <thead>
                    <tr>
                      <th style="width:6%"></th>
                      <th style="width:6%">Labour ID</th>
                      <th style="width:9%">Labour Name</th>
                      <th style="width:14%">Contact</th>
                      <th style="width:10%">Work Type</th>
                      <th style="width:7%">Fixed Wage</th>
                      <th style="width:10%">Wage Per Day</th>
                    </tr>
                  </thead>
                  <tbody id="table_body_labour_assign_add">

                  </tbody>

                </table>
              </div>
            </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>
