<div class="modal fade" tabindex="-1" id="enquiry_followup_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 Followup
        </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="enquiry" data-modal-id="enquiry_followup_add_modal" id="form_enquiry_followup_add" method="post" action="<?php echo base_url().'enquiries/create_followup'?>" 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_enquiry_followup_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">
            <?php if($page_name=='enquiries_profile'){?>
              <div class="col-lg-12">
                <div class="form-group m-form__group" >
                  <label for="user_name">
                    Enquiry
                  </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-edit"></i>
                      </span>
                    </div>
                    <input disabled type="text" value="<?php echo '#'.$enquiry_data->enquiry_id.' - '.$enquiry_data->customer_name.' ('.$enquiry_data->service_name.')'?>" class="form-control m-input form_enquiry_followup_add_fields" placeholder="Enquiry" aria-describedby="basic-addon1">
                    <input type="hidden" name="enquiry_id" value="<?php echo $enquiry_data->enquiry_id?>" >
                  </div>
                  <span class="m-form__help"></span>
                </div>
              </div>
            <?php }else{ ?>
              <div class="col-lg-12">
                <div class="form-group m-form__group" >
                  <label for="user_name">
                    Enquiry
                  </label>
                  <div class="m-select2 m-select2--air m-select2--pill ">
                    <select required style="width: 100%" class="form-control m-select2" id="enquiry_id_followup_add" name="enquiry_id">
                      <option selected disabled>Select Enquiry</option>
                    </select>
                  </div>
                  <span class="m-form__help"></span>
                </div>
              </div>
            <?php } ?>
            <div class="col-lg-12">
              <div class="form-group m-form__group" style="padding-right: 0px">
                <label for="user_name">
                  Followup Date
                </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="la la-calendar"></i>
                    </span>
                  </div>
                  <input required type="text" name="followup_date" id="followup_date_add"  class="form-control m-input form_enquiry_followup_add_fields" placeholder="Followup Date" aria-describedby="basic-addon1">
                </div>
                <span class="m-form__help"></span>
              </div>
            </div>
            <div class="col-lg-12">
              <div class="form-group m-form__group" >
                <label for="user_name">
                  Remarks
                </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="la la-edit"></i>
                    </span>
                  </div>
                  <textarea required type="text" name="remarks" class="form-control m-input form_enquiry_followup_add_fields" placeholder="Remarks" aria-describedby="basic-addon1"></textarea>
                </div>
                <span class="m-form__help"></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>
<div class="modal fade" tabindex="-1" id="enquiry_followup_edit_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" >
          Edit Followup
        </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="enquiry" data-modal-id="enquiry_followup_edit_modal" id="form_enquiry_followup_edit" method="post" action="<?php echo base_url().'enquiries/update_followup'?>" 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_enquiry_followup_edit_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">
              <div class="form-group m-form__group" >
                <label for="user_name">
                  Enquiry
                </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-edit"></i>
                    </span>
                  </div>
                  <input disabled type="text" id="enquiry_details_followup_edit" class="form-control m-input form_enquiry_followup_edit_fields" placeholder="Enquiry" aria-describedby="basic-addon1">
                </div>
                <span class="m-form__help"></span>
              </div>
            </div>
            <input type="hidden" name="followup_id" id="followup_id_edit" >
            <div class="col-lg-6">
              <div class="form-group m-form__group" style="padding-right: 0px">
                <label for="user_name">
                  Followup Date
                </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="la la-calendar"></i>
                    </span>
                  </div>
                  <input required type="text" name="followup_date" id="followup_date_edit"  class="form-control m-input form_enquiry_followup_edit_fields" placeholder="Followup Date" 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">
                  Status
                </label>
                <div class="m-select2 m-select2--air m-select2--pill">
                  <select required id="followup_status_edit" name="followup_status" style="width: 100%" class="form-control m-input form_enquiry_followup_edit_fields"  aria-describedby="basic-addon1">
                    <option selected disabled>Select Status</option>
                    <option value="0">Pending</option>
                    <option value="1">Processed</option>
                    <option value="2">Cancelled</option>
                  </select>
                </div>
                <span class="m-form__help"></span>
              </div>
            </div>
            <div class="col-lg-12">
              <div class="form-group m-form__group" >
                <label for="user_name">
                  Remarks
                </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="la la-edit"></i>
                    </span>
                  </div>
                  <textarea required type="text" name="remarks" id="remarks_followup_edit" class="form-control m-input form_enquiry_followup_edit_fields" placeholder="Remarks" aria-describedby="basic-addon1"></textarea>
                </div>
                <span class="m-form__help"></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>
<div class="modal fade" tabindex="-1" id="enquiry_followup_delete_modal" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
  <div class="modal-dialog " role="document" >
    <form autocomplete="off" data-modal-id="enquiry_followup_delete_modal" method="post" action="<?php echo base_url().'enquiries/delete_followup'?>" class="form-horizontal">
      <div class="modal-content">
        <div class="alert alert-danger" role="alert" style="margin-bottom: 0px">
          <button type="button" class="close" data-dismiss="modal"></button>
          <br/>
          <h4 class="alert-heading">Warning! Please Confirm Your Action</h4>
          <br/>
          <p> Are You Sure to Delete this Data ?. All the Associated Data will Lost. </p>
          <p>
            <button class="btn btn-danger form_submit_btn" type="submit" name="submit">Confirm & Delete</button>
            <button type="button" class="btn btn-primary modal-dismiss" data-dismiss="modal">Cancel</button>
          </p>
          <input type="hidden" name="followup_id" id="enquiry_followup_delete_id">
        </div>
      </div>
    </form>
  </div>
</div>
