<div id="modal_table">
    <div style="padding:0 30px;">
        <?= createTableFromApiResponse($data, $type) ?>
    </div>
</div>

<script>
    $('#modal_table').closest('.modal-body').after(
        '<div class="modal-footer">\n' +
        '        <button class="btn btn-large btnCancel" type="button" data-dismiss="modal">Close</button>\n' +
        '    </div>'
    )

    replacePinElements();
</script>
