diff options
| author | Teddy Wing | 2018-02-01 11:52:48 +0100 | 
|---|---|---|
| committer | Teddy Wing | 2018-02-01 15:42:04 +0100 | 
| commit | c99847eb430a6f98c019f71f4f5e05831f3e054d (patch) | |
| tree | 734240e2502ccdcbbca316b615fa506a31414666 | |
| parent | 79d9e1bf24a0786bedec7966b5d0c500f91a1727 (diff) | |
| download | chouette-core-c99847eb430a6f98c019f71f4f5e05831f3e054d.tar.bz2 | |
ReferentialVehicleJourneys#index: Pre-fill line select filter
Pre-fill this box with the value from `params[:q]` so users can see
their selected line after filtering.
For some reason Select2 wants to keep it selected even after clicking
"Effacer". Not sure what that's about, but the HTML `<select>` clearly
doesn't have a `selected` attribute/option.
Refs #5576
| -rw-r--r-- | app/views/referential_vehicle_journeys/_filters.html.slim | 1 | 
1 files changed, 1 insertions, 0 deletions
| diff --git a/app/views/referential_vehicle_journeys/_filters.html.slim b/app/views/referential_vehicle_journeys/_filters.html.slim index 077c40de7..53084017b 100644 --- a/app/views/referential_vehicle_journeys/_filters.html.slim +++ b/app/views/referential_vehicle_journeys/_filters.html.slim @@ -24,6 +24,7 @@          = f.input :line_id,              as: :select,              collection: @vehicle_journeys.lines, +            selected: params[:q] && params[:q][:line_id],              input_html: { \                'data-select2ed': 'true',                'data-select2ed-placeholder': t('referentials.filters.line') \ | 
