motorradig2027/views/tour/create.php

58 lines
3.7 KiB
PHP
Raw Normal View History

2026-10-09 09:07:18 +02:00
<div class="container">
<div class="row justify-content-center">
<div class="col-md-8">
<div class="card mt-4">
<div class="card-header"><h4>Tour anlegen</h4></div>
<div class="card-body">
<form style="background-color: #fff;" class="text-dark" method="post" action="/tour/store" enctype="multipart/form-data">
<?= csrf_field() ?>
<input type="hidden" name="user_id" value="<?= e(user()->id) ?>">
<div class="form-group" style="display:flex;">
<label class="ml-2 mt-3 col-form-label col-form-label-sm" style="width:180px; text-align:left;font-size:18px;" for="name">Name:</label>
<input class="mt-3 mr-2 form-control input-sm" type="text" id="name" name="name" value="<?= e(old('name') ?? $tour->name) ?>" required>
</div>
<div class="form-group" style="display:flex;">
<label class="ml-2 mt-3" style="width:180px; text-align:left;font-size:18px;" for="start">Start:</label>
<input class="mt-3 mr-2 form-control input-sm" type="text" id="start" name="start" value="<?= e(old('start') ?? $tour->start) ?>" required>
</div>
<div class="form-group" style="display:flex;">
<label class="ml-2 mt-4" style="width:180px; text-align:left;font-size:18px;" for="deadline">Anmeldeschluss:</label>
<input class="mt-3 mr-2 form-control" type="text" id="deadline" style="font-size:16px;" name="deadline" value="<?= e(old('deadline') ?? $tour->deadline) ?>" required>
</div>
<div class="form-group" style="display:flex;">
<label class="ml-2 mt-4" style="width:180px; text-align:left;font-size:18px;" for="max_participants">Max Teilnehmer:</label>
<input class="mt-3 mr-2 form-control" type="text" id="max_participants" style="font-size:16px;" name="max_participants" value="<?= e(old('max_participants') ?? $tour->max_participants) ?>" required>
</div>
<div class="form-group" style="display:flex;">
<label class="ml-2 mt-4" style="width:150px; text-align:left;" for="bild"><h4>Bild:</h4></label>
<img src="/img/placeholder/tour128x100.jpg" class="mt-3 ml-3">
<input type="file" class="mt-3 mr-2 form-control" id="bild" style="font-size:20px;" name="bild" value="">
</div>
<div class="form-group" style="display:flex;">
<label class="ml-2 mt-3" style="width:140px; text-align:left;font-size:18px;" for="is_cancelled">Storniert:</label>
<input class="mt-3 mr-2 form-control" type="checkbox" id="is_cancelled" style="font-size:10px;width:20px;" name="is_cancelled" <?= input('is_cancelled') ? 'checked' : '' ?>>
</div>
<div class="form-group">
<textarea class="col-12" name="beschreibung" rows="10" cols="50"><?= e($tour->beschreibung) ?></textarea>
</div>
<a href="/tour"><div type="submit" class="btn btn-success col-2 mb-2 float-right mr-2">Abbrechen</div></a>
<button type="submit" class="btn btn-danger col-2 mb-2 float-right mr-2">Speichern</button>
</form>
</div>
</div>
</div>
</div>
</div>