<div class="modal fade" id="clientModal" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="staticBackdropLabel" aria-hidden="true">
  <div class="modal-dialog modal-md">
    <div class="modal-content">
      <div class="modal-header border-0 alert-info p-2">
        <h5 class="modal-title fw-bold fs-6" id="staticBackdropLabel">Edit Client</h5>
        <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
      </div>
      <div class="modal-body">
        
        <!-- Form !-->
        <form method="POST" action="<?= base_url('administrator/redd/update-client') ?>" enctype="multipart/form-data">
            <?= csrf_field(); ?>
            <input type="hidden" name="id" >
            <div class="row">
                <div class="col-md-6 mb-3">
                    <label class="form-label  fw-bold mb-0">First Name*</label>
                    <input type="text" name="fname" class="form-control" required>
                </div>
                <div class="col-md-6 mb-3">
                    <label class="form-label  fw-bold mb-0">Last Name*</label>
                    <input type="text" name="lname" class="form-control" required>
                </div>

                <div class="col-md-12 mb-3">
                    <label class="form-label  fw-bold mb-0">Email*</label>
                    <input type="email" name="email" id="email" class="form-control" required>
                </div>
                <div class="col-md-6 mb-3">
                    <label class="form-label  fw-bold mb-0">Phone*</label>
                    <input type="text" name="phone" class="form-control" required>
                </div>
                <div class="col-md-6 mb-3">
                    <label class="form-label  fw-bold mb-0">Website</label>
                    <input type="text" name="website" class="form-control" >
                </div>
                <div class="col-md-6 mb-3">
                    <label class="form-label  fw-bold mb-0">Photo <small class="text-muted fw-normal">(Upload company logo)</small></label>
                    <input type="file" name="photo" class="form-control" accept="image/*">
                    <div id="currentPhoto"></div>
                </div>

                <div class="col-md-6 mb-3">
                    <label class="form-label  fw-bold mb-0">Address* <small class="text-muted fw-normal">(Offices)</small></label>
                    <input type="text" name="address" class="form-control" required>
                </div>

                <div class="col-md-12 mb-3">
                    <label class="form-label  fw-bold mb-0">Entity Type*</label>
                    <select name="entity_type_id" class="form-select" required>
                    <option value="">-- Select Entity Type --</option>
                    <?php foreach($entity_types as $et): ?>
                        <option value="<?= $et->id ?>"><?= esc($et->name) ?></option>
                    <?php endforeach; ?>
                    </select>
                </div>

                <div class="col-md-4 mb-3">
                    <label for="country_id" class="form-label  fw-bold mb-0">Country</label>
                    <select name="country_id" id="country_id" class="form-select" required>
                        <option value="">Select Country</option>
                        <?php foreach($countries as $c):?>
                            <option value="<?= $c->id; ?>"><?= $c->name;?></option>
                        <?php endforeach;?>
                    </select>
                </div>
                <div class="col-md-4 mb-3">
                    <label for="state_id" class="form-label  fw-bold mb-0">State</label>
                    <select name="state_id" id="state_id" class="form-select">
                        <option value="">Select ---</option>
                    </select>
                </div>
                <div class="col-md-4 mb-3">
                    <label for="city_id" class="form-label  fw-bold mb-0">City*</label>
                    <select name="city_id" id="city_id" class="form-select">
                        <option value="">Select ---</option>
                    </select>
                </div>
                <div class="col-md-12 mb-3">
                    <label class="form-label  fw-bold mb-0">Description</label>
                    <textarea name="description" rows="3" class="form-control"></textarea>
                </div>
            </div>
        <!-- End Form !-->
      </div>
      <div class="modal-footer border-0">
        <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
        <button type="submit" class="btn btn-danger sbtn">Save</button>
      </div>
      </form>
    </div>
  </div>
</div>