<div id="newPublicProjectShareModal" class="modal" tabindex="-1">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <h5 class="modal-title">New Public Project Share</h5>
                <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
            </div>
            <form action="<?php echo URL_APP_ADMIN; ?>/src/new-public-project-share.php" method="POST" id="newPublicProjectShareForm">
                <div id="newPublicProjectShareModalBody" class="modal-body">
                    <div class="mx-1 mb-2" id="sharePublicProject">
                        <select id="newPublicProjectShareSelect" name="publicProjects[]" class="selectpicker my-1" multiple data-live-search="true" title="Select public projects" data-selected-text-format="count > 2" data-width="100%" data-actions-box="true" required>
                            <?php 
                                foreach ( $publicProjects as $publicProject ) : 
                            ?>
                                    <option value="<?php echo $publicProject['id']; ?>"><?php echo $publicProject['title'].' - '.$publicProject['city']; ?></option>
                            <?php
                                endforeach; 
                            ?>
                        </select>
                    </div>
                    <div class="form-floating mb-2">
                        <input type="text" name="note" class="form-control" id="note" required>
                        <label for="note">Note (e.g. "Jane at TN National")</label>
                    </div>
                    <!-- <div class="input-group mb-2">
                        <div class="form-floating">
                            <select id="shareLifetime" name="shareLifetime" class="form-select form-control" required>
                                <option value="">Select share lifetime...</option>
                                <option value="1 day">1 day</option>
                                <option value="3 days">3 days</option>
                                <option value="1 week">1 week</option>
                                <option value="2 weeks">2 weeks</option>
                                <option value="30 days">30 days</option>
                            </select>
                            <label for="shareLifetime">Share Lifetime</label>
                        </div>
                    </div> -->
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
                    <button type="submit" class="btn btn-danger btbAction" data-action="click" data-target="save share public project">Save</button>
                </div>
            </form>
        </div>
    </div>
</div>