<style>
.btn-send-cache.waiting .set-cache { display: none; }
.btn-send-cache .wait-text { display: none; }
.btn-send-cache.waiting .wait-text { display: inline-block; }
</style>

<div class="modal fade" id="modal-cache-control" role="dialog" aria-labelledby="modal-cache-controlLabel" aria-hidden="true">
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header">
        <h5 id="modal-cache-controlLabel">Set Cache-Control for Object</h5>
        <button type="button" class="btn-close" data-bs-dismiss="modal" aria-hidden="true"></button>
      </div>
      <form action="#" id="form-cache-control">
        <div class="modal-body">
          <label for="host">max-age:</label><br>

          <input type="radio" id="minutes" name="unit" value="minutes">
          <label for="minutes">minutes</label>
          &nbsp;
          <input type="radio" id="hours" name="unit" value="hours">
          <label for="hours">hours</label>
          &nbsp;
          <input type="radio" id="days" name="unit" value="days">
          <label for="days">days</label>

          <input class="form-control" type="number" name="maxage" min="3" value="3">
        </div>
        <div class="modal-footer">
          <button class="btn-send-cache btn btn-primary">
            <span class="wait-text">
              <i class="fa fa-spinner fa-pulse fa-fw"></i>&nbsp;Loading...
            </span>
            <span class="set-cache">Set Cache-Control</span>
          </button>
          <button class="btn btn-light" data-bs-dismiss="modal" aria-hidden="true">Cancel</button>
        </div>
      </form>
    </div>
  </div>
</div>
