<style>
.form-field {
  display: inline-block;
  margin-right: 20px;
}

.form-field:last-child {
  margin-right: 0;
}



</style>
 
<div class="container-fluid">
  <div class="col-xl-12 col-lg-12 col-md-12">
      <div class="card o-hidden border-0 shadow-lg my-5">
        <div class="card-body ">
            <h1 class="h4 text-center text-gray-900 mb-4" style="font-size: 50px;font-weight: bold">Kelola Ruangan</h1>
            <button type="button" class="btn btn-primary fa fa-plus btn-lg" data-toggle="modal" data-target="#addData" id="tambahmodal"> Tambah</button>
              <br>
              <br>
              <table class="table table-bordered" id="dataTable">
                <thead>
                  <tr class="table-infos">
                        <th style="width: 70px">NO</th>
                        <!-- <th colspan=""  class=" thLeftText">Id Poli</th> -->
                        <th colspan=""  class=" thLeftText">Nama Poli</th>
                        <th colspan=""  class=" thLeftText">Lantai</th>
                        <th colspan=""  class=" thLeftText">Ruangan</th>
                        <th colspan=""  class=" thLeftText">Kondisi Ruang</th>
                        <th colspan=""  class=" thLeftText">Action</th>
                  </tr>
                </thead>
                      <tbody id="tableruang" >
                      </tbody>
                  </table>
            
        </div>
      </div>
  </div>
</div>


<!-- Trigger the modal with a button -->

<!-- Modal -->
<div id="addData" class="modal fade" role="dialog">
  <div class="modal-dialog">

    <!-- Modal content-->
    <div class="modal-content">
      <div class="modal-header">
      <h4 class="modal-title">Tambah Data Ruang</h4>
        <button type="button" class="close" data-dismiss="modal">&times;</button>
      </div>
      <div class="modal-body">
      <form id="myForm" >

            <div class="form-group">
                <label>Nama Poli</label>
                <select name="nama_poli" id="poli"  class="form-control" >
                    <option disable selected> Pilih </option>
                </select> 
            </div>
            <div class="form-group">
                <label>Lantai</label>
                <input type="input" id="lantai" name="nama_ruang" class="form-control" placeholder="Lantai Ruangan" required /></input>
            </div>
            <div class="form-group">
                <label>Ruangan</label>
                <input type="input" id="nama_ruang" name="nama_ruang" class="form-control" placeholder="Nama Ruangan" required /></input>
            </div>
            <div class="modal-footer">
         <button type="button" class="btn btn-primary" id="tambah">Add</button>
         <button type="button" class="btn btn-danger" onclick="reset()">Reset</button>
        <button type="submit" class="btn btn-default" data-dismiss="modal">Close</button>
      </div>
    </form>
    </div>
    </div>
  </div>
</div>

<div id="Editdata" class="modal fade" role="dialog">
  <div class="modal-dialog">
    <!-- Modal content-->
    <div class="modal-content">
      <div class="modal-header">
        <h4 class="modal-title">Edit Ruangan</h4>
        <button type="button" class="close" data-dismiss="modal">&times;</button>
      </div>
      <div class="modal-body">
      <form id="myFormedt" >

          <input type="hidden" id="id_ruang"  class="form-control" /></input>

             <div class="form-group">
                <label>Nama Poli</label>
                <select name="nama_poli" id="poliedt"  class="form-control" >

                </select> 
            </div >
            <div class="form-group">
                <label>Lantai</label>
                <input type="input" id="lantaiedt" name="lantai" class="form-control" placeholder="Lantai Ruangan & Nama Ruangan" required /></input>
            </div>
            <div class="form-group">
                <label>Ruangan</label>
                <input type="input" id="nama_ruangedt" name="nama_ruang" class="form-control" placeholder="Lantai Ruangan & Nama Ruangan" required /></input>
            </div>
            <div class="form-group">
                <label>Kondisi</label>
                <select name="condition" id="condition"  class="form-control" >
                
                </select> 
           </div>
            <div class="modal-footer">
         <button  button type="button" class="btn btn-primary" id="edit">Edit</button>
         <button  button type="button" class="btn btn-danger" onclick="reset()">Reset</button>
        <button type="submit" class="btn btn-default" data-dismiss="modal">Close</button>
      </div>
      </form>
    </div>
  </div>
</div>



