Unverified Commit b33bfcaf authored by Cassidy Dingenskirchen's avatar Cassidy Dingenskirchen
Browse files

/checkin/add: datetime inputs, change intermediate stop input format to ISO8601

parent 7ac6d22b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2617,7 +2617,7 @@ sub add_intransit_form {

	if ( $self->param('action') and $self->param('action') eq 'save' ) {
		my $parser = DateTime::Format::Strptime->new(
			pattern   => '%d.%m.%Y %H:%M',
			pattern   => '%FT%H:%M',
			locale    => 'de_DE',
			time_zone => 'Europe/Berlin'
		);
+5 −5
Original line number Diff line number Diff line
@@ -21,7 +21,7 @@
			<li>Eingabe der Fahrt als „Typ Linie Nummer“ oder „Typ Nummer“, z.B.
				„ICE 100“, „S 1 31133“ oder „ABR RE11 26720“</li>
			<li>Wenn Nummer nicht bekannt oder vorhanden: einen beliebigen Integer eintragen, z.B. „S 5X 0“ oder „U 11 0“</li>	
			<li>Zeitangaben im Format DD.MM.YYYY HH:MM</li>
			<li>Zeitangaben im Format YYYY-MM-DDTHH:MM.</li>
			<li>Das ausgewählte Backend bestimmt die verfügbaren Halte für Start, Ziel und Route. Siehe auch <a href="/static/stops.csv">stops.csv</a></li>
		</ul>
	</div>
@@ -50,8 +50,8 @@
			<label for="dep_station">Start (Name oder ID)</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>
			%= datetime_field 'sched_departure', id => 'sched_departure', class => 'validate', required => undef
			<label for="sched_departure" class="active">Geplante Abfahrt</label>
		</div>
	</div>
	<div class="row">
@@ -60,8 +60,8 @@
			<label for="arr_station">Ziel (Name oder ID)</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>
			%= datetime_field 'sched_arrival', id => 'sched_arrival', class => 'validate', required => undef
			<label for="sched_arrival" class="active">Geplante Ankunft</label>
		</div>
	</div>
	<div class="row">