80 lines
4.6 KiB
PHP
80 lines
4.6 KiB
PHP
@extends('layouts.app')
|
|
|
|
@section('content')
|
|
<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
|
|
|
|
<input type="hidden" name="user_id" value="{{ Auth::user()->id }}">
|
|
|
|
<div class="form-group" style="display:flex;">
|
|
<!-- label class="ml-2 mt-4 col-form-label col-form-label-sm" style="width:150px; text-align:left;" for="name"><h4>Name:</h4></label> -->
|
|
<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="{{ 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="name">Start:</label>
|
|
<input class="mt-3 mr-2 form-control input-sm" type="text" id="start" name="start" value="{{ 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="{{ 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="name">Max Teilnehmer:</label>
|
|
<input class="mt-3 mr-2 form-control" type="text" id="max_participants" style="font-size:16px;" name="max_participants" value="{{ 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>
|
|
|
|
@if(file_exists (public_path ('img/tour/'.$tour->id.'.jpg')))
|
|
<!--File exists -->
|
|
<a href="/img/user/{{$tour->id}}_gross.jpg" data-lightbox="{{$tour->id}}_gross.jpg" data-title="{{ $tour->name }}">
|
|
<img src="/img/user/{{$tour->id}}.jpg" class="mt-3 ml-3" >
|
|
</a>
|
|
@else
|
|
<img src="/img/placeholder/tour128x100.jpg" class="mt-3 ml-3" >
|
|
@endif
|
|
|
|
<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="name">Storniert:</label>
|
|
<input class="mt-3 mr-2 form-control" type="checkbox" id="anmeldeschluss" style="font-size:10px;width:20px;" name="anmeldeschluss" value="{{ old('anmeldeschluss') ?? $tour->deadline }}" >
|
|
</div>
|
|
|
|
|
|
<div class="form-group">
|
|
<textarea class="col-12" name="beschreibung" rows="10" cols="50" >{{ $tour->beschreibung }}
|
|
</textarea>
|
|
</div>
|
|
|
|
|
|
<a href="/tour/{{$tour->id}}"><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>
|
|
@endsection
|