Loading lib/DBInfoscreen/Controller/Static.pm +11 −5 Original line number Diff line number Diff line package DBInfoscreen::Controller::Static; # Copyright (C) 2011-2020 Daniel Friesel # # SPDX-License-Identifier: AGPL-3.0-or-later Loading @@ -12,10 +13,10 @@ my %default = ( sub redirect { my ($self) = @_; my $station = $self->param('station'); my $input = $self->param('input'); my $params = $self->req->params; $params->remove('station'); $params->remove('input'); for my $param (qw(platforms mode admode via)) { if ( Loading @@ -30,7 +31,12 @@ sub redirect { $params = $params->to_string; $self->redirect_to("/${station}?${params}"); if ( $input =~ m{ ^ [a-zA-Z]{1,5} \s+ \d+ $ }x ) { $self->redirect_to("/z/${input}?${params}"); } else { $self->redirect_to("/${input}?${params}"); } } sub geolocation { Loading templates/layouts/app.html.ep +4 −4 Original line number Diff line number Diff line Loading @@ -124,13 +124,13 @@ Bitte eine Station aus der Liste auswählen</div> <div class="desc">Bahnhof / Haltestelle</div> <div> % if (stash('stationlist')) { %= select_field station => stash('stationlist') %= select_field input => stash('stationlist') % } % elsif (stash('station')) { %= text_field 'station', class => 'station', placeholder => 'Name oder DS100-Kürzel', id => 'stationinput' % elsif (stash('input')) { %= text_field 'input', class => 'station', placeholder => 'Name oder DS100-Kürzel', id => 'stationinput' % } % else { %= text_field 'station', class => 'station', placeholder => 'Name oder DS100-Kürzel', id => 'stationinput', autofocus => 'autofocus' %= text_field 'input', class => 'station', placeholder => 'Name oder DS100-Kürzel', id => 'stationinput', autofocus => 'autofocus' % } </div> </div> Loading templates/layouts/legacy.html.ep +4 −4 Original line number Diff line number Diff line Loading @@ -83,13 +83,13 @@ Bitte eine Station aus der Liste auswählen</div> <div class="desc">Bahnhof / Haltestelle</div> <div> % if (stash('stationlist')) { %= select_field station => stash('stationlist') %= select_field input => stash('stationlist') % } % elsif (stash('station')) { %= text_field 'station', class => 'station', placeholder => 'Name oder DS100-Kürzel' % elsif (stash('input')) { %= text_field 'input', class => 'station', placeholder => 'Name oder DS100-Kürzel' % } % else { %= text_field 'station', class => 'station', placeholder => 'Name oder DS100-Kürzel', autofocus => 'autofocus' %= text_field 'input', class => 'station', placeholder => 'Name oder DS100-Kürzel', autofocus => 'autofocus' % } </div> </div> Loading Loading
lib/DBInfoscreen/Controller/Static.pm +11 −5 Original line number Diff line number Diff line package DBInfoscreen::Controller::Static; # Copyright (C) 2011-2020 Daniel Friesel # # SPDX-License-Identifier: AGPL-3.0-or-later Loading @@ -12,10 +13,10 @@ my %default = ( sub redirect { my ($self) = @_; my $station = $self->param('station'); my $input = $self->param('input'); my $params = $self->req->params; $params->remove('station'); $params->remove('input'); for my $param (qw(platforms mode admode via)) { if ( Loading @@ -30,7 +31,12 @@ sub redirect { $params = $params->to_string; $self->redirect_to("/${station}?${params}"); if ( $input =~ m{ ^ [a-zA-Z]{1,5} \s+ \d+ $ }x ) { $self->redirect_to("/z/${input}?${params}"); } else { $self->redirect_to("/${input}?${params}"); } } sub geolocation { Loading
templates/layouts/app.html.ep +4 −4 Original line number Diff line number Diff line Loading @@ -124,13 +124,13 @@ Bitte eine Station aus der Liste auswählen</div> <div class="desc">Bahnhof / Haltestelle</div> <div> % if (stash('stationlist')) { %= select_field station => stash('stationlist') %= select_field input => stash('stationlist') % } % elsif (stash('station')) { %= text_field 'station', class => 'station', placeholder => 'Name oder DS100-Kürzel', id => 'stationinput' % elsif (stash('input')) { %= text_field 'input', class => 'station', placeholder => 'Name oder DS100-Kürzel', id => 'stationinput' % } % else { %= text_field 'station', class => 'station', placeholder => 'Name oder DS100-Kürzel', id => 'stationinput', autofocus => 'autofocus' %= text_field 'input', class => 'station', placeholder => 'Name oder DS100-Kürzel', id => 'stationinput', autofocus => 'autofocus' % } </div> </div> Loading
templates/layouts/legacy.html.ep +4 −4 Original line number Diff line number Diff line Loading @@ -83,13 +83,13 @@ Bitte eine Station aus der Liste auswählen</div> <div class="desc">Bahnhof / Haltestelle</div> <div> % if (stash('stationlist')) { %= select_field station => stash('stationlist') %= select_field input => stash('stationlist') % } % elsif (stash('station')) { %= text_field 'station', class => 'station', placeholder => 'Name oder DS100-Kürzel' % elsif (stash('input')) { %= text_field 'input', class => 'station', placeholder => 'Name oder DS100-Kürzel' % } % else { %= text_field 'station', class => 'station', placeholder => 'Name oder DS100-Kürzel', autofocus => 'autofocus' %= text_field 'input', class => 'station', placeholder => 'Name oder DS100-Kürzel', autofocus => 'autofocus' % } </div> </div> Loading