Merge branch 'ui' into dev

This commit is contained in:
Lukas Halbritter
2018-10-16 10:53:48 +02:00
16 changed files with 379 additions and 260 deletions
+74 -49
View File
@@ -1,7 +1,9 @@
@extends('layout.master')
@section('subnav')
<a href='{{ url()->previous() }}'>Zurück</a>
<li class="nav-item">
<a href="{{ url()->previous() }}" class="btn btn-outline-primary">Zurück</a>
</li>
@endsection
@section('content')
@@ -12,62 +14,81 @@
@endif
{{ csrf_field() }}
<h3>Stammdaten</h3>
<table>
<tr>
<td>{{ Form::label('title', 'Anrede') }}</td>
<td>
<div class="form-group row">
{{ Form::label('title', 'Anrede', ['class' => 'col-sm-2 col-form-label']) }}
<div class="col-sm-10">
@if (!is_null($person->id))
{{ Form::select('title', [
'Herr' => 'Herr',
'Frau' => 'Frau',
'Firma' => 'Firma'],
$person->title) }}
$person->title, ['class' => 'form-control']) }}
@else
{{ Form::select('title', [
'Herr' => 'Herr',
'Frau' => 'Frau',
'Firma' => 'Firma']) }}
'Firma' => 'Firma']
, null, ['class' => 'form-control']) }}
@endif
</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>
<tr>
<td>{{ Form::label('date_of_birth', 'Geburtsdatum') }}</td>
<td>{{ Form::date('date_of_birth', $person->date_of_birth) }}</td>
</tr>
</table>
</div>
</div>
<div class="form-group row">
{{ Form::label('name_or_company', 'Name / Firma', ['class' => 'col-sm-2 col-form-label']) }}
<div class="col-sm-10">
{{ Form::text('name_or_company', $person->name_or_company, ['class' => 'form-control']) }}
</div>
</div>
<div class="form-group row">
{{ Form::label('surname', 'Vorname', ['class' => 'col-sm-2 col-form-label']) }}
<div class="col-sm-10">
{{ Form::text('surname', $person->surname, ['class' => 'form-control']) }}</div>
</div>
<div class="form-group row">
{{ Form::label('street', 'Straße + Hausnummer', ['class' => 'col-sm-2 col-form-label']) }}
<div class="col-sm-10">
{{ Form::text('street', $person->street, ['class' => 'form-control']) }}
</div>
</div>
<div class="form-group row">
{{ Form::label('postal_code', 'Postleitzahl', ['class' => 'col-sm-2 col-form-label']) }}
<div class="col-sm-10">
{{ Form::text('postal_code', $person->postal_code, ['class' => 'form-control']) }}
</div>
</div>
<div class="form-group row">
{{ Form::label('city', 'Stadt', ['class' => 'col-sm-2 col-form-label']) }}
<div class="col-sm-10">
{{ Form::text('city', $person->city, ['class' => 'form-control']) }}
</div>
</div>
<div class="form-group row">
{{ Form::label('email', 'E-Mail', ['class' => 'col-sm-2 col-form-label']) }}
<div class="col-sm-10">
{{ Form::text('email', $person->email, ['class' => 'form-control']) }}
</div>
</div>
<div class="form-group row">
{{ Form::label('mobile', 'Handy', ['class' => 'col-sm-2 col-form-label']) }}
<div class="col-sm-10">
{{ Form::text('mobile', $person->mobile, ['class' => 'form-control']) }}
</div>
</div>
<div class="form-group row">
{{ Form::label('phone', 'Telefon', ['class' => 'col-sm-2 col-form-label']) }}
<div class="col-sm-10">
{{ Form::text('phone', $person->phone, ['class' => 'form-control']) }}
</div>
</div>
<div class="form-group row">
{{ Form::label('date_of_birth', 'Geburtsdatum', ['class' => 'col-sm-2 col-form-label']) }}
<div class="col-sm-10">
{{ Form::date('date_of_birth', $person->date_of_birth, ['class' => 'form-control']) }}
</div>
</div>
@if ($person->title != 'Firma')
<h3>Mitgliedsdaten</h3>
<table>
@@ -108,7 +129,11 @@
@endif
</table>
@endif
<button type="submit" id="submit">Speichern</button>
<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
+32 -21
View File
@@ -11,27 +11,38 @@
{{ method_field('patch') }}
@endif
{{ csrf_field() }}
<table>
<tr>
<td>{{ Form::label('name', 'Name') }}</td>
<td>{{ Form::text('name', $project->name) }}</td>
</tr>
<tr>
<td>{{ Form::label('start_date', 'Beginn') }}</td>
<td>{{ Form::date('start_date', $project->start_date) }}</td>
</tr>
<tr>
<td>{{ Form::label('end_date', 'Ende') }}</td>
<td>{{ Form::date('end_date', $project->end_date) }}</td>
</tr>
</table>
<ul>
@foreach ($errors->all() as $error)
<li>{{ $error }}</li>
@endforeach
</ul>
<button type="submit" id="submit">Speichern</button>
<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>
<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