jQuery(function() {
    $('#modal-request-access').on('show.bs.modal', function(event) {
        const button = $(event.relatedTarget); // Button that triggered the modal
        const modal = $(this);
        // Assign the ressource
        const value = button.data('resource');
        modal.find(".modal-body input[name='resource']").val(value);
    });
});