From 536ee9240fa3fc73a4b38d862d317b1806a45911 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Mon, 28 Sep 2015 22:56:39 +0200 Subject: candidate foo --- templates/main.html.ep | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'templates') diff --git a/templates/main.html.ep b/templates/main.html.ep index 589f690..7ecc456 100644 --- a/templates/main.html.ep +++ b/templates/main.html.ep @@ -105,13 +105,25 @@ other German transit networks.
Stadt
- %= text_field 'city' + % if (stash('place_candidates') and @{ stash('place_candidates') } ) { + % my @candidates = map { [ $_, $_ ] } @{ stash('place_candidates') }; + %= select_field city => \@candidates + % } + % else { + %= text_field 'city' + % }
Haltestelle
- %= text_field 'stop' + % if (stash('name_candidates') and @{ stash('name_candidates') } ) { + % my @candidates = map { [ $_, $_ ] } @{ stash('name_candidates') }; + %= select_field stop => \@candidates + % } + % else { + %= text_field 'stop' + % } %= submit_button 'Display'
-- cgit v1.2.3