<?php
include getcwd() . "/codes/patient-details-by-get-id.php";
?>

<!-- Main Content -->
<div class="container">

  <div class="row">
    <!-- Widget Item -->
    <div class="col-md-12">
      <div class="widget-area-2 proclinic-box-shadow">
        <h3 class="widget-title">Edit Patient</h3>
        <form name="edit-patient-form" method="post" action="<?php echo path(); ?>codes/edit-patient-form.php"
              enctype="multipart/form-data">
          <div class="row justify-content-center">
            <div class="col-md-8">
              <div class="row">
                <div class="form-group col-md-6">
                  <label for="patientName">Fullname</label>
                  <input value="<?php echo $patient['patientId']; ?>" name="patientId" type="hidden">
                  <input value="<?php echo $patient['patientName']; ?>" name="patientName" type="text" required
                         class="form-control" placeholder="Patient name" id="patientName">
                </div>
                <div class="form-group col-md-6">
                  <label for="patientDob">Date Of Birth</label>
                  <input value="<?php echo $patient['patientDob']; ?>" name="patientDob" type="date" required
                         placeholder="Date of Birth" class="form-control" id="patientDob">
                </div>
                <div class="form-group col-md-6">
                  <label for="patientGender">Gender</label>
                  <select name="patientGender" required class="form-control" id="patientGender">
                    <option selected="selected"><?php echo $patient['patientGender']; ?></option>
                    <option>Male</option>
                    <option>Female</option>
                    <option>Other</option>
                  </select>
                </div>
                <div class="form-group col-md-6">
                  <label for="patientPhone">Phone</label>
                  <input value="<?php echo $patient['patientPhone']; ?>" name="patientPhone" type="text" required
                         placeholder="Phone" class="form-control" id="patientPhone">
                </div>
                <div class="form-group col-md-6">
                  <label for="patientEmail">Email</label>
                  <input value="<?php echo $patient['patientEmail']; ?>" name="patientEmail" type="email"
                         placeholder="Email" class="form-control" id="patientEmail">
                </div>
                <div class="form-group col-md-6">
                  <label for="patientCompanion">Name of Companion</label>
                  <input value="<?php echo $patient['patientCompanion']; ?>" name="patientCompanion" type="text"
                         required placeholder="Name of Companion" class="form-control" id="patientCompanion">
                </div>
                <div class="form-group col-md-12">
                  <label for="patientAddress">Address</label>
                  <textarea name="patientAddress" required placeholder="Address" class="form-control"
                            id="patientAddress"
                            rows="3"><?php echo $patient['patientAddress']; ?></textarea>
                </div>
                <div class="form-check col-md-12 mb-2">
                  <div class="text-left">
                    <div class="custom-control custom-checkbox">
                      <input class="custom-control-input" type="checkbox" id="ex-check-2" required>
                      <label class="custom-control-label" for="ex-check-2">Please Confirm</label>
                    </div>
                  </div>
                </div>
                <div class="form-group col-md-6 mb-3">
                  <button type="submit" class="btn btn-primary btn-lg">Submit</button>
                </div>
              </div>
            </div>
          </div>
        </form>
        <hr>
      </div>
    </div>

    <!-- /Widget Item -->
  </div>
</div>
<!-- /Main Content -->
