diff --git a/templates/job-order/form.onestep.html.twig b/templates/job-order/form.onestep.html.twig index 9a00f9b8..86c44a81 100644 --- a/templates/job-order/form.onestep.html.twig +++ b/templates/job-order/form.onestep.html.twig @@ -930,13 +930,13 @@ $(function() { } }); - $(function(){ + $(function() { var selectedHub = ""; - $("#hubs-table").on('click', 'tr', function() { + $('#hubs-table').on('click', 'tr', function() { var id = $(this).data('id'); // highlight this row - $("#hubs-table").find('.m-table__row--primary').removeClass('m-table__row--primary'); + $('#hubs-table').find('.m-table__row--primary').removeClass('m-table__row--primary'); $(this).addClass('m-table__row--primary'); @@ -965,6 +965,21 @@ $(function() { }); }); + $(function() { + var selectedRider = ""; + $('#riders-table').on('click', 'tr', function() { + var id = $(this).data('id'); + + // highlight this row + $('#riders-table').find('.m-table__row--primary').removeClass('m-table__row--primary'); + + $(this).addClass('m-table__row--primary'); + + // set rider + selectedRider = id; + }); + }); + {% if mode in ['update-processing', 'update-reassign-hub'] %} // display hub map // OSM code