{{ __('Warning:') }} {{ __("Saving those changes will edit also the user's record") }}
{!! Form::label('data[Order][extra][user][first_name]', t('First name')) !!} {!! Form::text( 'data[Order][extra][user][first_name]', ( isset($data->user_id) ? $data->User->first_name : ( isset($data->extra->user->first_name) ? $data->extra->user->first_name : null ) ), ['required'] ) !!}
{!! Form::label('data[Order][extra][user][last_name]', t('Last name')) !!} {!! Form::text( 'data[Order][extra][user][last_name]', ( isset($data->user_id) ? $data->User->last_name : ( isset($data->extra->user->last_name) ? $data->extra->user->last_name : null ) ), ['required'] ) !!}
{!! Form::label('data[Order][extra][user][email]', t('Email')) !!} {!! Form::email( 'data[Order][extra][user][email]', ( isset($data->user_id) ? $data->User->email : ( isset($data->extra->user->email) ? $data->extra->user->email : null ) ), [ 'required', ] ) !!}
{!! Form::label('data[Order][extra][user][birthday]', t('Birthday')) !!} {!! Form::text( 'data[Order][extra][user][birthday]', ( isset($data->user_id) ? (isset($data->User->birthday) ? $data->User->birthday : null) : ( isset($data->extra->user->birthday) ? $data->extra->user->birthday : null ) ), [ 'class' => 'form-control birthdaypicker' ] ) !!}
{!! Form::label('data[Order][extra][user][phone]', t('Phone')) !!} {!! Form::text( 'data[Order][extra][user][phone]', ( isset($data->user_id) ? $data->User->phone : ( isset($data->extra->user->phone) ? $data->extra->user->phone : null ) ) ) !!}
{!! Form::label('data[Order][extra][user][mobile]', t('Secondary Phone')) !!} {!! Form::text( 'data[Order][extra][user][mobile]', ( isset($data->user_id) ? $data->User->mobile : ( isset($data->extra->user->mobile) ? $data->extra->user->mobile : null ) ) ) !!}
{!! Form::hidden( 'data[Order][extra][user][promotions_venues]', 0 ) !!} {!! Form::checkbox( 'data[Order][extra][user][promotions_venues]', 1, ( isset($data->user_id) ? $data->User->promotions_venues : ( ( isset($data->extra->user->promotions_venues) ? $data->extra->user->promotions_venues : null ) ? true : false ) ) ) !!} {!! Form::label( 'data[Order][extra][promotions_venues]', 'The customer opting in for promotional messages' ) !!}

@if (isset($settings->content->custom_fields) && $settings->content->custom_fields)
{!! Form::label('data[Order][extra][user][company]', t('Company')) !!} {!! Form::text( 'data[Order][extra][user][company]', ( isset($data->user_id) && isset($data->User->company) && $data->User->company ? $data->User->company : null ) ) !!}
{!! Form::label('data[Order][extra][user][postcode]', t('Postcode')) !!} {!! Form::text( 'data[Order][extra][user][postcode]', ( isset($data->user_id) && isset($data->User->postcode) && $data->User->postcode ? $data->User->postcode : null ), [ 'data-url' => action('LocationsController@secure_get_address.json'), 'class' => 'form-control postcode-field', 'data-name' => 'postcode' ] ) !!}

{!! Form::label('data[Order][extra][user][address]', t('Address')) !!} {!! Form::text( 'data[Order][extra][user][address]', ( isset($data->user_id) && isset($data->User->address) && $data->User->address ? $data->User->address : null ), [ 'class' => 'form-control address-field', 'data-name' => 'address' ] ) !!}
{!! Form::label('data[Order][extra][user][town]', t('Town')) !!} {!! Form::text( 'data[Order][extra][user][town]', ( isset($data->user_id) && isset($data->User->town) && $data->User->town ? $data->User->town : null ), [ 'data-url' => action('LocationsController@secure_get_address.json'), 'class' => 'form-control town-field', 'data-name' => 'town' ] ) !!}
{!! Form::label('data[Order][extra][user][county]', t('County')) !!} {!! Form::text( 'data[Order][extra][user][county]', ( isset($data->user_id) && isset($data->User->county) && $data->User->county ? $data->User->county : null ), [ 'data-url' => action('LocationsController@secure_get_address.json'), 'class' => 'form-control county-field', 'data-name' => 'county' ] ) !!}
{!! Form::label('data[Order][extra][user][country]', t('Country')) !!} {!! Form::select( 'data[Order][extra][user][country]', countries(), ( isset($data->user_id) && isset($data->User->country) && $data->User->country ? $data->User->country : null ), [ 'class' => 'form-control address-field', 'data-name' => 'country', 'empty' => true, ] ) !!}
@else
{!! Form::label('data[Order][extra][user][address]', t('Address')) !!} {!! Form::text( 'data[Order][extra][user][address]', ( isset($data->user_id) && isset($data->User->address) && $data->User->address ? $data->User->address : null ), [ 'data-url' => action('LocationsController@secure_get_address.json'), 'class' => 'form-control address-field', 'data-name' => 'address' ] ) !!}
{!! Form::label('data[Order][extra][user][town]', t('Town')) !!} {!! Form::text( 'data[Order][extra][user][town]', ( isset($data->user_id) && isset($data->User->town) && $data->User->town ? $data->User->town : null ), [ 'data-url' => action('LocationsController@secure_get_address.json'), 'class' => 'form-control town-field', 'data-name' => 'town' ] ) !!}
{!! Form::label('data[Order][extra][user][county]', t('County')) !!} {!! Form::text( 'data[Order][extra][user][county]', ( isset($data->user_id) && isset($data->User->county) && $data->User->county ? $data->User->county : null ), [ 'data-url' => action('LocationsController@secure_get_address.json'), 'class' => 'form-control county-field', 'data-name' => 'county' ] ) !!}
{!! Form::label('data[Order][extra][user][postcode]', t('Postcode')) !!} {!! Form::text( 'data[Order][extra][user][postcode]', ( isset($data->user_id) && isset($data->User->postcode) && $data->User->postcode ? $data->User->postcode : null ), [ 'data-url' => action('LocationsController@secure_get_address.json'), 'class' => 'form-control postcode-field', 'data-name' => 'postcode' ] ) !!}
{!! Form::label('data[Order][extra][user][country]', t('Country')) !!} {!! Form::select( 'data[Order][extra][user][country]', countries(), ( isset($data->user_id) && isset($data->User->country) && $data->User->country ? $data->User->country : null ), [ 'empty' => true, 'class' => 'form-control address-field', 'data-name' => 'country' ] ) !!}
@endif