@extends('layout.master') @section('subnav') @endsection @section('content')

@yield('title')

@if (!is_null($person->id)) {{ method_field('patch') }} @endif {{ csrf_field() }}

Stammdaten

{{ Form::label('title', 'Anrede', ['class' => 'col-sm-2 col-form-label']) }}
@if (!is_null($person->id)) {{ Form::select('title', [ 'Herr' => 'Herr', 'Frau' => 'Frau', 'Firma' => 'Firma'], $person->title, ['class' => 'form-control']) }} @else {{ Form::select('title', [ 'Herr' => 'Herr', 'Frau' => 'Frau', 'Firma' => 'Firma'] , null, ['class' => 'form-control']) }} @endif
{{ Form::label('name_or_company', 'Name / Firma', ['class' => 'col-sm-2 col-form-label']) }}
{{ Form::text('name_or_company', $person->name_or_company, ['class' => 'form-control']) }}
{{ Form::label('surname', 'Vorname', ['class' => 'col-sm-2 col-form-label']) }}
{{ Form::text('surname', $person->surname, ['class' => 'form-control']) }}
{{ Form::label('street', 'Straße + Hausnummer', ['class' => 'col-sm-2 col-form-label']) }}
{{ Form::text('street', $person->street, ['class' => 'form-control']) }}
{{ Form::label('postal_code', 'Postleitzahl', ['class' => 'col-sm-2 col-form-label']) }}
{{ Form::text('postal_code', $person->postal_code, ['class' => 'form-control']) }}
{{ Form::label('city', 'Stadt', ['class' => 'col-sm-2 col-form-label']) }}
{{ Form::text('city', $person->city, ['class' => 'form-control']) }}
{{ Form::label('email', 'E-Mail', ['class' => 'col-sm-2 col-form-label']) }}
{{ Form::text('email', $person->email, ['class' => 'form-control']) }}
{{ Form::label('mobile', 'Handy', ['class' => 'col-sm-2 col-form-label']) }}
{{ Form::text('mobile', $person->mobile, ['class' => 'form-control']) }}
{{ Form::label('phone', 'Telefon', ['class' => 'col-sm-2 col-form-label']) }}
{{ Form::text('phone', $person->phone, ['class' => 'form-control']) }}
{{ Form::label('date_of_birth', 'Geburtsdatum', ['class' => 'col-sm-2 col-form-label']) }}
{{ Form::date('date_of_birth', $person->date_of_birth, ['class' => 'form-control']) }}
@if ($person->title != 'Firma')

Mitgliedsdaten

{{-- List all member states, which are already in the database --}} @if ($person->wasMember()) @foreach ($person->memberStates as $memberState) @endforeach @endif {{-- Create empty input field for a new member state record. --}} @if (!$person->isMember()) @endif
Eintrittsdatum Austrittsdatum
{{ Form::hidden('memberStateId[]', $memberState->id) }} {{ Form::date('joining_date[]', $memberState->joining_date) }} {{ Form::date('leaving_date[]', $memberState->leaving_date) }}
{{ Form::date('joining_date[]') }} {{ Form::date('leaving_date[]') }}
@endif
@endsection