50 lines
2.3 KiB
PHP
50 lines
2.3 KiB
PHP
|
<x-layout>
|
||
|
<div class="container">
|
||
|
<div class="card rounded shadow mt-2 mr-5 ml-5">
|
||
|
<div class="card-body">
|
||
|
<h2>Opret Opslag</h2>
|
||
|
<form action="/create-post" method="post" enctype="multipart/form-data">
|
||
|
@csrf
|
||
|
<div class="mb-3">
|
||
|
<label for="title" class="form-label">Titel</label>
|
||
|
<input type="text" class="form-control" id="title" name="title" required>
|
||
|
</div>
|
||
|
<div class="mb-3">
|
||
|
<label for="occupation" class="form-label">Stilling</label>
|
||
|
<select id="occupation" class="form-control" name="occupation_id">
|
||
|
@foreach($occupations as $occupation)
|
||
|
<option value="{{ $occupation->id }}">{{ $occupation->name }}</option>
|
||
|
@endforeach
|
||
|
</select>
|
||
|
</div>
|
||
|
<div class="mb-3">
|
||
|
<label for="text">Beskrivelse</label>
|
||
|
<textarea name="text" id="text" style="width: 100%; height: 150px;"></textarea>
|
||
|
</div>
|
||
|
<div class="mb-3">
|
||
|
<label for="file">Upload (valgfri)</label>
|
||
|
<input type="file" class="form-control" id="file" name="file">
|
||
|
</div>
|
||
|
<div class="row mb-3">
|
||
|
<div class="col">
|
||
|
<label for="time">Tid</label>
|
||
|
<input type="number" class="form-control" id="time" name="time" required>
|
||
|
</div>
|
||
|
|
||
|
<div class="col">
|
||
|
<label for="format">Format</label>
|
||
|
<select id="format" class="form-control" name="time_period_id">
|
||
|
@foreach($formats as $format)
|
||
|
<option value="{{ $format->id }}">{{ $format->name }}</option>
|
||
|
@endforeach
|
||
|
</select>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<button type="submit" class="btn btn-primary">Opret</button>
|
||
|
</form>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</x-layout>
|