Added a layout for the people create/edit form.
Implemented the edit view for people.
This commit is contained in:
@@ -0,0 +1,75 @@
|
|||||||
|
@extends('layout.master')
|
||||||
|
|
||||||
|
@section('content')
|
||||||
|
<h1>@yield('title')</h1>
|
||||||
|
<form action="/people/@if (!is_null($person->id)) {{ $person->id }} @endif" method='post'>
|
||||||
|
@if (!is_null($person->id))
|
||||||
|
{!! method_field('patch') !!}
|
||||||
|
@endif
|
||||||
|
<h3>Stammdaten</h3>
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<td>{{ Form::label('title', 'Anrede') }}</td>
|
||||||
|
<td>{{ Form::text('title', $person->title) }}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>{{ Form::label('name_or_company', 'Name / Firma') }}</td>
|
||||||
|
<td>{{ Form::text('name_or_company', $person->name_or_company) }}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>{{ Form::label('surname', 'Vorname') }}</td>
|
||||||
|
<td>{{ Form::text('surname', $person->surname) }}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>{{ Form::label('street', 'Straße + Hausnummer') }}</td>
|
||||||
|
<td>{{ Form::text('street', $person->street) }}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>{{ Form::label('postal_code', 'Postleitzahl') }}</td>
|
||||||
|
<td>{{ Form::text('postal_code', $person->postal_code) }}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>{{ Form::label('city', 'Stadt') }}</td>
|
||||||
|
<td>{{ Form::text('city', $person->city) }}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>{{ Form::label('email', 'E-Mail') }}</td>
|
||||||
|
<td>{{ Form::text('email', $person->email) }}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>{{ Form::label('mobile', 'Handy') }}</td>
|
||||||
|
<td>{{ Form::text('mobile', $person->mobile) }}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>{{ Form::label('phone', 'Telefon') }}</td>
|
||||||
|
<td>{{ Form::text('phone', $person->phone) }}</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
@if ($person->title != 'Firma')
|
||||||
|
<h3>Mitgliedsdaten</h3>
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<th>Eintrittsdatum</th>
|
||||||
|
<th>Austrittsdatum</th>
|
||||||
|
</tr>
|
||||||
|
@if ($person->wasMember())
|
||||||
|
@foreach ($person->memberStates as $memberState)
|
||||||
|
<tr>
|
||||||
|
<td>{{ Form::hidden('meberStateId[]', $memberState->id) }}
|
||||||
|
{{ Form::text('joining_date[]', $memberState->joining_date) }}</td>
|
||||||
|
<td>{{ Form::text('leaving_date[]', $memberState->leaving_date) }}</td>
|
||||||
|
</tr>
|
||||||
|
@endforeach
|
||||||
|
@else
|
||||||
|
<tr>
|
||||||
|
<td>{{ Form::text('joining_date[]', $memberState->joining_date) }}</td>
|
||||||
|
<td>{{ Form::text('leaving_date[]', $memberState->leaving_date) }}</td>
|
||||||
|
</tr>
|
||||||
|
@endif
|
||||||
|
</table>
|
||||||
|
@endif
|
||||||
|
|
||||||
|
<button type="submit" id="submit">Speichern</button>
|
||||||
|
</form>
|
||||||
|
@endsection
|
||||||
@@ -8,7 +8,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td valign='top'>
|
||||||
<div id='nav'>
|
<div id='nav'>
|
||||||
@include('layout.nav')
|
@include('layout.nav')
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -0,0 +1,4 @@
|
|||||||
|
@extends('layout.forms.person')
|
||||||
|
|
||||||
|
@section('title', 'Person bearbeiten')
|
||||||
|
@section('method', 'patch')
|
||||||
Reference in New Issue
Block a user