File: D:/HostingSpaces/Eurotools/euro-tools.nl/resources/views/site/auth/edit.blade.php
@extends('site.master')
@section('content')
<div class="breadcrumb">
<ol itemscope itemtype="http://schema.org/BreadcrumbList">
<li itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem">
<a itemprop="item" href="/"><span itemprop="name">{{\Config::get('business.company_name')}}</span></a>
<meta itemprop="position" content="1"/>
</li>
<span class="seperator"> > </span>
<li itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem">
<a itemprop="item" href="">
<span itemprop="name">
Klant
</span>
</a>
<meta itemprop="position" content="2"/>
</li>
<span class="seperator"> > </span>
<li itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem">
<a itemprop="item" href="">
<span itemprop="name">
@lang('auth.edit_profile')
</span>
</a>
<meta itemprop="position" content="3"/>
</li>
</ol>
</div>
<div class="grid-row profile">
<form class="form-horizontal form" method="POST" novalidate>
<div class="grid-col profile-header">
<h1>@lang('auth.edit_profile')</h1>
<label>
@if(isset($stored))
<span id="flash-message">@lang('site/global.data_is_saved')</span>
@endif
<a class="button yellow arrow">
@lang('auth.save')
</a>
<button type="submit" class="button yellow arrow"></button>
</label>
</div>
<div class="grid-col profile-content">
<div class="grid-row">
{{ csrf_field() }}
<div class="content-block">
<h4>@lang('kms/orderOverview.invoice_address')</h4>
<hr>
<div class="form-group{{ $errors->has('company_name') || $errors->has('chamber_of_commerce') ? ' has-error' : '' }}">
<div class="grid-col col-md-6">
<label for="company_name"
class="grid-col col-md-4 control-label">@lang('site/form.company.label')</label>
<input id="company_name" type="text" class="form-control" name="company_name"
value="{{ old('company_name', $user->company_name) }}"
placeholder="@lang('site/form.company.placeholder')"
required autofocus>
@if ($errors->has('company_name'))
<span class="help-block">
<strong>{{ $errors->first('company_name') }}</strong>
</span>
@endif
</div>
<div class="grid-col col-md-6">
<label for="chamber_of_commerce"
class="grid-col col-md-4 control-label">@lang('site/form.chamber_of_commerce.label')</label>
<input id="chamber_of_commerce" type="text" pattern="\d*" class="form-control"
name="chamber_of_commerce"
value="{{ old('chamber_of_commerce', $user->chamber_of_commerce) }}"
placeholder="@lang('site/form.chamber_of_commerce.placeholder')"
required
autofocus>
@if ($errors->has('chamber_of_commerce'))
<span class="help-block">
<strong>{{ $errors->first('chamber_of_commerce') }}</strong>
</span>
@endif
</div>
</div>
<div class="form-group{{ $errors->has('company_street') || $errors->has('company_house_number') ? ' has-error' : '' }}">
<div class="grid-col col-md-6">
<label for="company_street"
class="grid-col col-md-4 control-label">@lang('site/form.company_street.label')</label>
<input id="company_street" type="text" class="form-control" name="company_street"
value="{{ old('company_street', $user->company_street) }}"
placeholder="@lang('site/form.company_street.placeholder')"
required autofocus>
@if ($errors->has('company_street'))
<span class="help-block">
<strong>{{ $errors->first('company_street') }}</strong>
</span>
@endif
</div>
<div class="grid-col col-md-6">
<label for="company_house_number"
class="grid-col col-md-4 control-label">@lang('site/form.company_house_number.label')</label>
<input id="company_house_number" type="text" pattern="\d*" class="form-control"
name="company_house_number"
value="{{ old('company_house_number', $user->company_house_number) }}"
placeholder="@lang('site/form.company_house_number.placeholder')"
required
autofocus>
@if ($errors->has('company_house_number'))
<span class="help-block">
<strong>{{ $errors->first('company_house_number') }}</strong>
</span>
@endif
</div>
</div>
<div class="form-group{{ $errors->has('company_zip_code') || $errors->has('company_city') ? ' has-error' : '' }}">
<div class="grid-col col-md-6">
<label for="company_zip_code"
class="grid-col col-md-4 control-label">@lang('site/form.company_zip_code.label')</label>
<input id="company_zip_code" type="text" class="form-control" name="company_zip_code"
value="{{ old('company_zip_code', $user->company_zip_code) }}"
placeholder="@lang('site/form.company_zip_code.placeholder')"
required
autofocus>
@if ($errors->has('company_zip_code'))
<span class="help-block">
<strong>{{ $errors->first('company_zip_code') }}</strong>
</span>
@endif
</div>
<div class="grid-col col-md-6">
<label for="company_city"
class="grid-col col-md-4 control-label">@lang('site/form.company_city.label')</label>
<input id="company_city" type="text" class="form-control" name="company_city"
value="{{ old('company_city', $user->company_city) }}"
placeholder="@lang('site/form.company_city.placeholder')"
required autofocus>
@if ($errors->has('company_city'))
<span class="help-block">
<strong>{{ $errors->first('company_city') }}</strong>
</span>
@endif
</div>
</div>
<div class="form-group{{ $errors->has('company_country') || $errors->has('company_vat_number') ? ' has-error' : '' }}">
<div class="grid-col col-md-6">
<label for="company_country"
class="grid-col col-md-4 control-label">@lang('site/form.company_country.label')</label>
<select name="company_country" id="company_country">
@foreach($countries as $isoCode => $country)
<option value="{{ $isoCode }}" {{ $isoCode == old('company_country', \Illuminate\Support\Facades\Auth::user()->company_country) ? "selected" : '' }}> {{ $country }} </option>
@endforeach
</select>
@if ($errors->has('company_country'))
<span class="help-block">
<strong>{{ $errors->first('company_country') }}</strong>
</span>
@endif
</div>
<div class="grid-col col-md-6">
<label for="company_vat_number"
class="grid-col col-md-4 control-label">@lang('site/form.vat_number.label')</label>
<input id="company_vat_number" type="text" class="form-control"
name="company_vat_number"
value="{{ old('company_vat_number', $user->company_vat_number) }}"
placeholder="@lang('site/form.vat_number.placeholder')"
required autofocus>
@if ($errors->has('company_vat_number'))
<span class="help-block">
<strong>{{ $errors->first('company_vat_number') }}</strong>
</span>
@endif
</div>
</div>
</div>
<div class="content-block shipping-address {{$user->differentShippingAddress ? 'open' : ''}}">
<h4>@lang('kms/orderOverview.shipping_address')
<label class="shippingToggle" for="differentShippingAddress">
<input type="checkbox"
name="differentShippingAddress" {{$user->differentShippingAddress ? 'checked':''}}>
@lang('site/form.different_shipping_address')
<span class="checkmark"></span>
</label>
</h4>
<div class="shipping-block">
<hr>
<div class="form-group{{ $errors->has('shipping_street') || $errors->has('shipping_house_number') ? ' has-error' : '' }}">
<div class="grid-col col-md-6">
<label for="shipping_street"
class="grid-col col-md-4 control-label">@lang('site/form.company_street.label')</label>
<input id="shipping_street" type="text" class="form-control" name="shipping_street"
value="{{ old('shipping_street', $user->shipping_street) }}" required
placeholder="@lang('site/form.company_street.placeholder')"
autofocus>
@if ($errors->has('shipping_street'))
<span class="help-block">
<strong>{{ $errors->first('shipping_street') }}</strong>
</span>
@endif
</div>
<div class="grid-col col-md-6">
<label for="shipping_house_number"
class="grid-col col-md-4 control-label">@lang('site/form.company_house_number.label')</label>
<input id="shipping_house_number" type="number" class="form-control"
name="shipping_house_number"
value="{{ old('shipping_house_number', $user->shipping_house_number) }}"
placeholder="@lang('site/form.company_house_number.placeholder')"
required
autofocus>
@if ($errors->has('shipping_house_number'))
<span class="help-block">
<strong>{{ $errors->first('shipping_house_number') }}</strong>
</span>
@endif
</div>
</div>
<div class="form-group{{ $errors->has('shipping_zip_code') || $errors->has('shipping_city') ? ' has-error' : '' }}">
<div class="grid-col col-md-6">
<label for="shipping_zip_code"
class="grid-col col-md-4 control-label">@lang('site/form.company_zip_code.label')</label>
<input id="shipping_zip_code" type="text" class="form-control"
name="shipping_zip_code"
value="{{ old('shipping_zip_code', $user->shipping_zip_code) }}" required
placeholder="@lang('site/form.company_zip_code.placeholder')"
autofocus>
@if ($errors->has('shipping_zip_code'))
<span class="help-block">
<strong>{{ $errors->first('shipping_zip_code') }}</strong>
</span>
@endif
</div>
<div class="grid-col col-md-6">
<label for="shipping_city"
class="grid-col col-md-4 control-label">@lang('site/form.company_city.label')</label>
<input id="shipping_city" type="text" class="form-control" name="shipping_city"
value="{{ old('shipping_city', $user->shipping_city) }}"
placeholder="@lang('site/form.company_city.placeholder')"
required autofocus>
@if ($errors->has('shipping_city'))
<span class="help-block">
<strong>{{ $errors->first('shipping_city') }}</strong>
</span>
@endif
</div>
</div>
<div class="form-group{{ $errors->has('shipping_country') ? ' has-error' : '' }}">
<div class="grid-col col-md-6">
<label for="shipping_country"
class="grid-col col-md-4 control-label">@lang('site/form.company_country.label')</label>
{{\Form::select('shipping_country', array($countries), old('shipping_country', $user->shipping_country) )}}
{{--<input id="shipping_country" type="text" class="form-control" name="shipping_country" value="{{ old('shipping_country', $user->shipping_country) }}" required autofocus> --}}
@if ($errors->has('shipping_country'))
<span class="help-block">
<strong>{{ $errors->first('shipping_country') }}</strong>
</span>
@endif
</div>
</div>
</div>
</div>
<div class="content-block">
<h4>@lang('site/global.contactHeader')</h4>
<hr>
<div class="form-group{{ $errors->has('first_name') || $errors->has('last_name') ? ' has-error' : '' }}">
<div class="grid-col col-md-5">
<label for="first_name"
class="grid-col grid-col col-md-4 control-label">@lang('site/form.first_name.label')</label>
<input id="first_name" type="text" class="form-control" name="first_name"
placeholder="@lang('site/form.first_name.placeholder')"
value="{{ old('first_name', $user->first_name) }}">
@if ($errors->has('first_name'))
<span class="help-block">
<strong>{{ $errors->first('first_name') }}</strong>
</span>
@endif
</div>
<div class="grid-col col-md-5">
<label for="last_name"
class="grid-col grid-col col-md-4 control-label">@lang('site/form.last_name.label')</label>
<input id="last_name" type="text" class="form-control" name="last_name"
placeholder="@lang('site/form.last_name.placeholder')"
value="{{ old('last_name', $user->last_name) }}" required autofocus>
@if ($errors->has('last_name'))
<span class="help-block">
<strong>{{ $errors->first('last_name') }}</strong>
</span>
@endif
</div>
</div>
<div class="form-group{{ $errors->has('email') || $errors->has('telephone') ? ' has-error' : '' }}">
<div class="grid-col col-md-6">
<label for="email"
class="grid-col col-md-4 control-label">@lang('site/form.email.label')</label>
<input id="email" type="email" class="form-control" name="email"
value="{{ old('email', $user->email) }}"
placeholder="@lang('site/form.email.placeholder')"
required>
@if ($errors->has('email'))
<span class="help-block">
<strong>{{ $errors->first('email') }}</strong>
</span>
@endif
</div>
<div class="grid-col col-md-6">
<label for="telephone"
class="grid-col col-md-4 control-label">@lang('site/form.phone.label')</label>
<input id="telephone" type="tel" class="form-control" name="telephone"
value="{{ old('telephone', $user->telephone) }}"
placeholder="@lang('site/form.phone.placeholder')"
required autofocus>
@if ($errors->has('telephone'))
<span class="help-block">
<strong>{{ $errors->first('telephone') }}</strong>
</span>
@endif
</div>
</div>
<div class="form-group{{ $errors->has('gender') ? ' has-error' : '' }}">
<div class="grid-col col-md-3 gender">
<label for="gender" class="grid-col grid-col col-md-4 control-label">
<p>@lang('site/form.gender')</p>
<input id="gender" type="checkbox" class="form-control" name="gender" value="female" {{old('gender', $user->gender) == 'female' ? 'checked' : ''}}>
<span class="toggle">
<div class="male">M</div>
<div class="female">V</div>
</span>
@if ($errors->has('gender'))
<span class="help-block">
<strong>{{ $errors->first('gender') }}</strong>
</span>
@endif
</label>
</div>
</div>
</div>
</div>
</div>
<div class="grid-col profile-header">
<h1> </h1>
<label>
<a class="button yellow arrow">
@lang('kms/global.save')
</a>
<button type="submit" class="button yellow arrow"></button>
</label>
</div>
</form>
</div>
@endsection