summaryrefslogtreecommitdiff
path: root/templates/add_journey.html.ep
blob: e07f78f6b3110d42abbcc45b1854d670a9a70a02 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
<h1>Zugfahrt eingeben</h1>
% if ($error) {
	<div class="row">
		<div class="col s12">
			<div class="card red darken-4">
				<div class="card-content white-text">
					<span class="card-title">Ungültige Eingabe</span>
					<p><%= $error %></p>
				</div>
			</div>
		</div>
	</div>
% }
<div class="row">
	<div class="col s12">
		<ul>
			<li>Eingabe des Zugs als „Zug Typ Nummer“ oder „Zug Nummer“, z.B.
				„ICE 100“, „S 1 31133“ oder „ABR RE11 26720“</li>
			<li>Zeitangaben im Format DD.MM.YYYY HH:MM</li>
		</ul>
	</div>
</div>
%= form_for '/journey/add' => (method => 'POST') => begin
	%= csrf_field
	<div class="row">
		<div class="input-field col s12">
			%= text_field 'train', id => 'train', class => 'validate', required => undef, pattern => '[0-9a-zA-Z]+ +[0-9a-zA-Z]* *[0-9]+'
			<label for="train">Zug (Typ Linie Nummer)</label>
		</div>
	</div>
	<div class="row">
		<div class="input-field col s12">
			%= text_field 'dep_station', id => 'dep_station', class => 'autocomplete validate', required => undef
			<label for="dep_station">Startbahnhof (Name oder DS100)</label>
		</div>
		<div class="input-field col s12">
			%= 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]'
			<label for="sched_departure">Geplante Abfahrt</label>
		</div>
		<div class="input-field col s12">
			%= text_field 'rt_departure', id => 'rt_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]'
			<label for="rt_departure">Tatsächliche Abfahrt (optional)</label>
		</div>
	</div>
	<div class="row">
		<div class="input-field col s12">
			%= text_field 'arr_station', id => 'arr_station', class => 'autocomplete validate', required => undef
			<label for="arr_station">Zielbahnhof (Name oder DS100)</label>
		</div>
		<div class="input-field col s12">
			%= 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]'
			<label for="sched_arrival">Geplante Ankunft</label>
		</div>
		<div class="input-field col s12">
			%= text_field 'rt_arrival', id => 'rt_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]'
			<label for="rt_arrival">Tatsächliche Ankunft (optional)</label>
		</div>
	</div>
	<div class="row">
		<div class="col s3 m3 l3">
		</div>
		<div class="col s6 m6 l6 center-align">
			<button class="btn waves-effect waves-light" type="submit" name="action" value="save">
				Hinzufügen
				<i class="material-icons right">send</i>
			</button>
		</div>
		<div class="col s3 m3 l3">
		</div>
	</div>
%= end