jQuery(function() {

    /* When user click on "Request access change", pre-select the storage name in typeahead. */
    $('#modal-request-storage-access-change').on('show.bs.modal', function(event) {
        const button = $(event.relatedTarget); // Button that triggered the modal
        const modal = $(this);
        // Assign the storage name
        const value = button.data('storage-name');
        modal.find(".modal-body input[name='storage_name']").val(value);
    });

});
