Files

59 lines
1.8 KiB
PHP

@extends('layout.master')
@section('subnav')
<a href='{{ url()->previous() }}' class='btn btn-outline-secondary'>Zurück</a>
@endsection
@section('content')
<h3>@yield('title')</h3>
@if (is_null($project->id))
<form action='/projects' method='post'>
@else
<form action='/projects/{{$project->id}}' method='post'>
@endif
@if (!is_null($project->id))
{{ method_field('patch') }}
@endif
{{ csrf_field() }}
<div class="error-list">
@foreach ($errors->all() as $error)
<div class="alert alert-danger">{{ $error }}</div>
@endforeach
</div>
<div class="form-group row">
{{ Form::label('name', 'Name', ['class' => 'col-sm-2 col-form-label']) }}
<div class="col-sm-10">
{{ Form::text('name', $project->name, ['class' => 'form-control']) }}
</div>
</div>
<div class="form-group row">
{{ Form::label('start_date', 'Beginn', ['class' => 'col-sm-2 col-form-label']) }}
<div class="col-sm-10">
{{ Form::date('start_date', $project->start_date, ['class' => 'form-control']) }}
</div>
</div>
<div class="form-group row">
{{ Form::label('end_date', 'Ende', ['class' => 'col-sm-2 col-form-label']) }}
<div class="col-sm-10">
{{ Form::date('end_date', $project->start_date, ['class' => 'form-control']) }}
</div>
</div>
<ul>
@foreach ($errors->all() as $error)
<li>{{ $error }}</li>
@endforeach
</ul>
<div class="form-group row">
<div class="col-sm-10">
<button class="btn btn-primary" type="submit" id="submit">Speichern</button>
</div>
</div>
</form>
@endsection