From beb17acb8440bb44f1070c2fb3b2e6cf7521f800 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Sun, 7 Apr 2019 20:20:37 +0200 Subject: Prepare forms for manual journey entry and editing --- templates/edit_journey.html.ep | 94 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100644 templates/edit_journey.html.ep (limited to 'templates/edit_journey.html.ep') diff --git a/templates/edit_journey.html.ep b/templates/edit_journey.html.ep new file mode 100644 index 0000000..8fdc5b6 --- /dev/null +++ b/templates/edit_journey.html.ep @@ -0,0 +1,94 @@ +% if ($error and $error eq 'notfound') { +
+
+
+
+ Fehler +

Zugfahrt nicht gefunden.

+
+
+
+
+% } +% else { + % if ($error) { +
+
+
+
+ Ungültige Eingabe +

<%= $error %>

+
+
+
+
+ % } + %= form_for '/journey/edit' => (method => 'POST') => begin + %= csrf_field +
+
+

+ Fahrt von + <%= $journey->{from_name} %> + nach + <%= $journey->{to_name} %> + am + <%= $journey->{sched_departure}->strftime('%d.%m.%Y') %> +

+ + + + + + + + + + + + + + + + + + + + + + + + + +
Zug + <%= $journey->{type} %> <%= $journey->{no} %> + % if ($journey->{line}) { + (Linie <%= $journey->{line} %>) + % } +
Geplante Abfahrt + %= text_field 'sched_departure', id => 'sched_departure', class => 'validate', required => undef, pattern => '[0-9][0-9]?[.][0-9][0-9]?[.][0-9][0-9][0-9][0-9] +[0-9][0-9]:[0-9][0-9]' +
Tatsächliche Abfahrt + %= text_field 'rt_departure', id => 'real_departure', class => 'validate', pattern => '[0-9][0-9]?[.][0-9][0-9]?[.][0-9][0-9][0-9][0-9] +[0-9][0-9]:[0-9][0-9]' +
Geplante Ankunft + %= text_field 'sched_arrival', id => 'sched_arrival', class => 'validate', required => undef, pattern => '[0-9][0-9]?[.][0-9][0-9]?[.][0-9][0-9][0-9][0-9] +[0-9][0-9]:[0-9][0-9]' +
Tatsächliche Ankunft + %= text_field 'rt_arrival', id => 'real_arrival', class => 'validate', pattern => '[0-9][0-9]?[.][0-9][0-9]?[.][0-9][0-9][0-9][0-9] +[0-9][0-9]:[0-9][0-9]' +
Route + %= text_area 'route', id => 'route', cols => 40, rows => 20 +
+
+
+
+
+
+
+ +
+
+
+
+ %= end +% } -- cgit v1.2.3