Unverified Commit 54547eb3 authored by Birte Kristina Friesel's avatar Birte Kristina Friesel
Browse files

manual station entry: HAFAS support

parent 379da61d
Loading
Loading
Loading
Loading
+11 −1
Original line number Diff line number Diff line
@@ -1095,8 +1095,18 @@ sub redirect_to_station {
	my ($self) = @_;
	my $station = $self->param('station');

	if ( my $s = $self->app->stations->search($station) ) {
		if ( $s->{hafas} ) {
			$self->redirect_to("/s/${station}?hafas=1");
		}
		else {
			$self->redirect_to("/s/${station}");
		}
	}
	else {
		$self->redirect_to("/s/${station}?hafas=1");
	}
}

sub cancelled {
	my ($self) = @_;
+1 −1
Original line number Diff line number Diff line
@@ -61,7 +61,7 @@
						%= form_for 'list_departures' => begin
							<div class="input-field">
								%= text_field 'station', id => 'station', class => 'autocomplete contrast-color-text', autocomplete => 'off', required => undef
								<label for="station">Manuelle Eingabe (Name oder DS100)</label>
								<label for="station">Manuelle Eingabe</label>
							</div>
							<div class="center-align">
								<button class="btn waves-effect waves-light btn-flat" type="submit" name="action" value="departures">