Skip to content

Commit

Permalink
Default to by stop_id first
Browse files Browse the repository at this point in the history
  • Loading branch information
brendannee committed Nov 13, 2020
1 parent 688cc18 commit 15725af
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 14 deletions.
2 changes: 1 addition & 1 deletion public/js/transit-arrivals-widget.js
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ function setupTransitArrivalsWidget(routes, stops, gtfsRtTripupdatesUrl, refresh
},
minLength: 2,
autoselect: true,
placeholder: 'Enter a stop ID',
placeholder: 'Search by stop name or id',
showNoOptionsFound: false,
templates: {
inputValue: result => result && result.stop_code,
Expand Down
27 changes: 14 additions & 13 deletions views/widget/widget.pug
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,21 @@
h2 Realtime Arrivals
.form-group
.btn-group.btn-group-toggle(data-toggle="buttons")
label.btn.btn-primary.active
input(type="radio" name="arrival_type" value="route" checked)
span By Route
label.btn.btn-primary(title="Stop IDs are displayed on all bus stop signs")
input(type="radio" name="arrival_type" value="stop_id")
label.btn.btn-primary.active(title="Stop IDs are displayed on all bus stop signs")
input(type="radio" name="arrival_type" value="stop_id" checked)
span By Stop ID
form#route_form
label.btn.btn-primary
input(type="radio" name="arrival_type" value="route")
span By Route

form#stop_id_form
.form-group.text
#arrival_stop_code_container

.form-group
button.btn.btn-primary.btn-block(type="submit") Get Arrivals

form#route_form.hidden-form
.form-group.select
select.form-control#arrival_route(name="route")
option(value="") Choose a route
Expand All @@ -25,13 +33,6 @@
select.form-control#arrival_stop(name="stop" disabled)
option(value="") Choose a stop

form#stop_id_form.hidden-form
.form-group.text
#arrival_stop_code_container

.form-group
button.btn.btn-primary.btn-block(type="submit") Get Arrivals

#loading.loader Loading...

#arrival_results.arrival-results
Expand Down

0 comments on commit 15725af

Please sign in to comment.