546 lines
32 KiB
PHP
546 lines
32 KiB
PHP
<div class="card mb-4">
|
|
<h5 class="card-header">
|
|
<div class="row">
|
|
<div class="col-xs-12 col-sm-6">
|
|
{{ __('account.invoice_address') }}
|
|
</div>
|
|
<div class="col-xs-12 col-sm-6">
|
|
<span class="text-tiny float-right">* {{__('register.required_fields')}}</span>
|
|
<span class="d-none d-lg-inline">{{ __('account.delivery_address') }}</span>
|
|
</div>
|
|
</div>
|
|
</h5>
|
|
|
|
<div class="card-body">
|
|
<input type="hidden" name="user_id" value="{{$user->id}}">
|
|
<div class="row">
|
|
<div class="col-12 col-lg-6">
|
|
<div class="form-row">
|
|
<div class="form-group col-md-12">
|
|
<label for="company" class="form-label">{{ __('Company name') }} ({{__('optional')}})</label>
|
|
{{ Form::text('company', $user->account->company, array('placeholder'=>__('Company name'), 'class'=>'form-control', 'id'=>'company', 'tabindex' => 1)) }}
|
|
</div>
|
|
</div>
|
|
<div class="form-row">
|
|
<div class="form-group col-md-6 {{ $errors->has('salutation') ? 'has-error' : '' }}">
|
|
<label class="form-label">{{ __('Salutation') }}*</label>
|
|
<select class="selectpicker" data-style="btn-light" name="salutation" id="salutation" required tabindex="2">
|
|
{!! HTMLHelper::getSalutation($user->account->salutation) !!}
|
|
</select>
|
|
@if ($errors->has('salutation'))
|
|
<span class="help-block">
|
|
<strong>{{ $errors->first('salutation') }}</strong>
|
|
</span>
|
|
@endif
|
|
</div>
|
|
</div>
|
|
<div class="form-row">
|
|
<div class="form-group col-md-6 {{ $errors->has('first_name') ? 'has-error' : '' }}">
|
|
<label class="form-label" for="first_name">{{ __('First name') }}*</label>
|
|
{{ Form::text('first_name', $user->account->first_name, array('placeholder'=>__('First name'), 'class'=>'form-control', 'id'=>'first_name', 'required'=>true, 'tabindex' => 4)) }}
|
|
@if ($errors->has('first_name'))
|
|
<span class="help-block">
|
|
<strong>{{ $errors->first('first_name') }}</strong>
|
|
</span>
|
|
@endif
|
|
|
|
</div>
|
|
<div class="form-group col-md-6 {{ $errors->has('last_name') ? 'has-error' : '' }}">
|
|
<label class="form-label" for="last_name">{{ __('Last name') }}*</label>
|
|
{{ Form::text('last_name', $user->account->last_name, array('placeholder'=>__('Last name'), 'class'=>'form-control', 'id'=>'last_name', 'required'=>true, 'tabindex' => 5)) }}
|
|
@if ($errors->has('last_name'))
|
|
<span class="help-block">
|
|
<strong>{{ $errors->first('last_name') }}</strong>
|
|
</span>
|
|
@endif
|
|
|
|
</div>
|
|
</div>
|
|
<div class="form-row">
|
|
<div class="form-group col-md-12 {{ $errors->has('address') ? 'has-error' : '' }}">
|
|
<label class="form-label" for="address">{{ __('Street') }} / {{ __('House number') }}*</label>
|
|
{{ Form::text('address', $user->account->address, array('placeholder'=>__('Street'), 'class'=>'form-control', 'required'=>true, 'id'=>'address', 'tabindex' => 6)) }}
|
|
@if ($errors->has('address'))
|
|
<span class="help-block">
|
|
<strong>{{ $errors->first('address') }}</strong>
|
|
</span>
|
|
@endif
|
|
</div>
|
|
</div>
|
|
<div class="form-row">
|
|
<div class="form-group col-md-12 {{ $errors->has('address_2') ? 'has-error' : '' }}">
|
|
<label class="form-label" for="address_2">{{ __('Flat Building optional') }}</label>
|
|
{{ Form::text('address_2', $user->account->address_2, array('placeholder'=>__('Flat Building optional'), 'class'=>'form-control', 'id'=>'address_2', 'tabindex' => 6)) }}
|
|
</div>
|
|
</div>
|
|
<div class="form-row">
|
|
<div class="form-group col-md-6 {{ $errors->has('zipcode') ? 'has-error' : '' }}">
|
|
<label class="form-label" for="zipcode">{{ __('Postcode') }}*</label>
|
|
{{ Form::text('zipcode', $user->account->zipcode, array('placeholder'=>__('Postcode'), 'class'=>'form-control', 'required'=>true, 'id'=>'zipcode', 'tabindex' => 7)) }}
|
|
@if ($errors->has('zipcode'))
|
|
<span class="help-block">
|
|
<strong>{{ $errors->first('zipcode') }}</strong>
|
|
</span>
|
|
@endif
|
|
</div>
|
|
<div class="form-group col-md-6 {{ $errors->has('city') ? 'has-error' : '' }}">
|
|
<label class="form-label" for="city">{{ __('City') }}*</label>
|
|
{{ Form::text('city', $user->account->city, array('placeholder'=>__('City'), 'class'=>'form-control', 'required'=>true, 'id'=>'city', 'tabindex' => 8)) }}
|
|
@if ($errors->has('city'))
|
|
<span class="help-block">
|
|
<strong>{{ $errors->first('city') }}</strong>
|
|
</span>
|
|
@endif
|
|
</div>
|
|
</div>
|
|
<div class="form-row">
|
|
<div class="form-group col-md-6 {{ $errors->has('country_id') ? 'has-error' : '' }}">
|
|
<label class="form-label">{{ __('Country') }}*</label>
|
|
<select class="selectpicker" name="country_id" id="country_id" data-style="btn-light" data-live-search="true" required tabindex="9">
|
|
{!! HTMLHelper::getContriesWithMore($user->account->country_id) !!}
|
|
</select>
|
|
@if ($errors->has('country_id'))
|
|
<span class="help-block">
|
|
<strong>{{ $errors->first('country_id') }}</strong>
|
|
</span>
|
|
@endif
|
|
</div>
|
|
<div class="form-group col-md-6">
|
|
<label class="form-label">{{ __('Date of birth') }}*</label>
|
|
{{ Form::text('birthday', $user->account->birthday, array('placeholder'=>Util::formatDate(), 'data-date-format'=>Util::formatDate(), 'data-start_view'=>2, 'required'=>true, 'class'=>'form-control datepicker-birthday')) }}
|
|
</div>
|
|
</div>
|
|
<div class="form-row">
|
|
<div class="form-group col-md-4">
|
|
<label class="form-label" for="pre_phone_id">{{ __('Country code') }}</label>
|
|
<select class="selectpicker" name="pre_phone_id" id="pre_phone_id" data-style="btn-light" data-live-search="true" tabindex="10">
|
|
{!! HTMLHelper::getContriesCodes($user->account->pre_phone_id) !!}
|
|
</select>
|
|
</div>
|
|
<div class="form-group col-md-8 {{ $errors->has('phone') ? 'has-error' : '' }}">
|
|
<label class="form-label" for="phone">{{ __('Phone') }}</label>
|
|
{{ Form::text('phone', $user->account->phone, array('placeholder'=>__('Phone'), 'class'=>'form-control', 'id'=>'phone', 'tabindex' => 11)) }}
|
|
</div>
|
|
</div>
|
|
<div class="form-row">
|
|
<div class="form-group col-md-4">
|
|
<label class="form-label" for="pre_mobil_id">{{ __('Country code') }}</label>
|
|
<select class="selectpicker" name="pre_mobil_id" id="pre_mobil_id" data-style="btn-light" data-live-search="true" tabindex="12">
|
|
{!! HTMLHelper::getContriesCodes($user->account->pre_mobil_id) !!}
|
|
</select>
|
|
</div>
|
|
<div class="form-group col-md-8 {{ $errors->has('mobil') ? 'has-error' : '' }}">
|
|
<label class="form-label" for="mobil">{{ __('Mobile Phone') }}</label>
|
|
{{ Form::text('mobil', $user->account->mobil, array('placeholder'=>__('Mobile Phone'), 'class'=>'form-control', 'id'=>'mobil', 'tabindex' => 13)) }}
|
|
</div>
|
|
<div class="form-group col-md-12">
|
|
@if($errors->has('phone') || $errors->has('mobil'))
|
|
<div class="alert badge-danger block p-2">{{ __('account.phone_need_error') }}</div>
|
|
@else
|
|
<div class="badge badge-default">{{ __('account.phone_need_note') }}</div>
|
|
@endif
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
<div class="col-12 col-lg-6">
|
|
<div class="d-md-block d-lg-none">
|
|
<hr>
|
|
<h5 class="mt-4">{{ __('account.delivery_address') }}</h5>
|
|
</div>
|
|
<div id="show_shipping_address" style="@if($user->account->same_as_billing) display:none @endif">
|
|
<div class="form-row">
|
|
<div class="form-group col-md-12">
|
|
<label for="shipping_company" class="form-label">{{ __('Company name') }} ({{__('optional')}})</label>
|
|
{{ Form::text('shipping_company', $user->account->shipping_company, array('placeholder'=>__('Company name'), 'class'=>'form-control', 'id'=>'shipping_company', 'tabindex' => 16)) }}
|
|
</div>
|
|
</div>
|
|
<div class="form-row">
|
|
<div class="form-group col-md-6 {{ $errors->has('shipping_salutation') ? 'has-error' : '' }}">
|
|
<label class="form-label">{{ __('Salutation') }}*</label>
|
|
<select class="selectpicker" data-style="btn-light" name="shipping_salutation" id="shipping_salutation" required tabindex="17">
|
|
{!! HTMLHelper::getSalutation($user->account->shipping_salutation) !!}
|
|
</select>
|
|
@if ($errors->has('shipping_salutation'))
|
|
<span class="help-block">
|
|
<strong>{{ $errors->first('shipping_salutation') }}</strong>
|
|
</span>
|
|
@endif
|
|
</div>
|
|
</div>
|
|
<div class="form-row">
|
|
<div class="form-group col-md-6 {{ $errors->has('shipping_firstname') ? 'has-error' : '' }}">
|
|
<label class="form-label" for="shipping_firstname">{{ __('First name') }}*</label>
|
|
{{ Form::text('shipping_firstname', $user->account->shipping_firstname, array('placeholder'=>__('First name'), 'class'=>'form-control', 'required'=>true, 'id'=>'shipping_firstname', 'tabindex' => 18)) }}
|
|
@if ($errors->has('shipping_firstname'))
|
|
<span class="help-block">
|
|
<strong>{{ $errors->first('shipping_firstname') }}</strong>
|
|
</span>
|
|
@endif
|
|
</div>
|
|
<div class="form-group col-md-6 {{ $errors->has('shipping_lastname') ? 'has-error' : '' }}">
|
|
<label class="form-label" for="shipping_lastname">{{ __('Last name') }}*</label>
|
|
{{ Form::text('shipping_lastname', $user->account->shipping_lastname, array('placeholder'=>__('Last name'), 'class'=>'form-control', 'required'=>true, 'id'=>'shipping_lastname', 'tabindex' => 19)) }}
|
|
@if ($errors->has('shipping_lastname'))
|
|
<span class="help-block">
|
|
<strong>{{ $errors->first('shipping_lastname') }}</strong>
|
|
</span>
|
|
@endif
|
|
|
|
</div>
|
|
</div>
|
|
<div class="form-row">
|
|
<div class="form-group col-md-12 {{ $errors->has('shipping_address') ? 'has-error' : '' }}">
|
|
<label class="form-label" for="shipping_address">{{ __('Street') }} / {{ __('House number') }}*</label>
|
|
{{ Form::text('shipping_address', $user->account->shipping_address, array('placeholder'=>__('Street'), 'class'=>'form-control', 'required'=>true, 'id'=>'shipping_address', 'tabindex' => 20)) }}
|
|
@if ($errors->has('shipping_address'))
|
|
<span class="help-block">
|
|
<strong>{{ $errors->first('shipping_address') }}</strong>
|
|
</span>
|
|
@endif
|
|
</div>
|
|
</div>
|
|
<div class="form-row">
|
|
<div class="form-group col-md-12 {{ $errors->has('shipping_address_2') ? 'has-error' : '' }}">
|
|
<label class="form-label" for="shipping_address_2">{{ __('Flat Building optional') }}</label>
|
|
{{ Form::text('shipping_address_2', $user->account->shipping_address_2, array('placeholder'=>__('Flat Building optional'), 'class'=>'form-control', 'id'=>'shipping_address_2', 'tabindex' => 21)) }}
|
|
@if ($errors->has('shipping_address_2'))
|
|
<span class="help-block">
|
|
<strong>{{ $errors->first('shipping_address_2') }}</strong>
|
|
</span>
|
|
@endif
|
|
</div>
|
|
</div>
|
|
<div class="form-row">
|
|
<div class="form-group col-md-6 {{ $errors->has('shipping_zipcode') ? 'has-error' : '' }}">
|
|
<label class="form-label" for="shipping_zipcode">{{ __('Postcode') }}*</label>
|
|
{{ Form::text('shipping_zipcode', $user->account->shipping_zipcode, array('placeholder'=>__('Postcode'), 'class'=>'form-control', 'required'=>true, 'id'=>'shipping_zipcode', 'tabindex' => 22)) }}
|
|
@if ($errors->has('shipping_zipcode'))
|
|
<span class="help-block">
|
|
<strong>{{ $errors->first('shipping_zipcode') }}</strong>
|
|
</span>
|
|
@endif
|
|
|
|
</div>
|
|
<div class="form-group col-md-6 {{ $errors->has('shipping_city') ? 'has-error' : '' }}">
|
|
<label class="form-label" for="shipping_city">{{ __('City') }}*</label>
|
|
{{ Form::text('shipping_city', $user->account->shipping_city, array('placeholder'=>__('City'), 'class'=>'form-control', 'required'=>true, 'id'=>'shipping_city', 'tabindex' => 23)) }}
|
|
@if ($errors->has('shipping_city'))
|
|
<span class="help-block">
|
|
<strong>{{ $errors->first('shipping_city') }}</strong>
|
|
</span>
|
|
@endif
|
|
</div>
|
|
</div>
|
|
<div class="form-row">
|
|
<div class="form-group col-md-12 {{ $errors->has('shipping_country_id') ? 'has-error' : '' }}">
|
|
<label class="form-label">{{ __('Country') }}*</label>
|
|
<select class="selectpicker" name="shipping_country_id" id="shipping_country_id" data-style="btn-light" data-live-search="true" required tabindex="24">
|
|
{!! HTMLHelper::getContriesWithMore($user->account->shipping_country_id) !!}
|
|
</select>
|
|
@if ($errors->has('shipping_country_id'))
|
|
<span class="help-block">
|
|
<strong>{{ $errors->first('shipping_country_id') }}</strong>
|
|
</span>
|
|
@endif
|
|
</div>
|
|
</div>
|
|
<div class="form-row">
|
|
<div class="form-group col-md-4">
|
|
<label class="form-label" for="shipping_pre_phone_id">{{ __('Country code') }}</label>
|
|
<select class="selectpicker" name="shipping_pre_phone_id" id="shipping_pre_phone_id" data-style="btn-light" data-live-search="true" tabindex="25">
|
|
{!! HTMLHelper::getContriesCodes($user->account->shipping_pre_phone_id) !!}
|
|
</select>
|
|
</div>
|
|
<div class="form-group col-md-8">
|
|
<label class="form-label" for="shipping_phone">{{ __('Phone') }}</label>
|
|
{{ Form::text('shipping_phone', $user->account->shipping_phone, array('placeholder'=>__('Phone'), 'class'=>'form-control', 'id'=>'shipping_phone', 'tabindex' => 26)) }}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<hr>
|
|
<div class="form-group">
|
|
<label class="custom-control custom-checkbox m-0">
|
|
<input type="checkbox" class="custom-control-input" name="same_as_billing" id="same_as_billing" @if($user->account->same_as_billing) checked="checked" @endif>
|
|
<span class="custom-control-label">{{__('Shipping to the same address')}}</span>
|
|
</label>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
@if(!isset($step))
|
|
<hr>
|
|
@if($user->email)
|
|
<div class="form-row">
|
|
<div class="form-group col-md-6">
|
|
<label class="form-label" for="email">{{ __('E-Mail Address') }}*</label>
|
|
{{ Form::text('email', $user->email, array('placeholder'=>'E-Mail', 'class'=>'form-control', 'id'=>'email', 'readonly'=>true, 'tabindex' => 14)) }}
|
|
</div>
|
|
<div class="form-group col-md-6">
|
|
<label class="form-label" for="email-confirm">{{ __('Confirm E-Mail') }}</label>
|
|
{{ Form::text('email-confirm', $user->email, array('placeholder'=>__('Confirm E-Mail'), 'class'=>'form-control', 'id'=>'email-confirm', 'readonly'=>true, 'tabindex' => 15)) }}
|
|
</div>
|
|
</div>
|
|
@if(isset($can_change_mail))
|
|
@if(count($user->user_update_email) > 0)
|
|
<p class="badge badge-primary" style=" color:#fff;">{{ $user->user_update_email->first()->email }} {{__('waiting for activation since')}} | {{ $user->user_update_email->first()->created_at->format('d.m.Y H:i') }}</p><br>
|
|
@endif
|
|
<a href="{{ route('admin_lead_change_mail', [$user->id]) }}" class="btn btn-default btn-sm"> {{ __('Contact') }} {{__('register.change_email')}}</a>
|
|
@else
|
|
<a href="{{ route('user_update_email', [$user->id]) }}" class="btn btn-default btn-sm">{{__('register.change_email')}}</a>
|
|
@endif
|
|
@else
|
|
<div class="form-row">
|
|
<div class="form-group col-md-6">
|
|
<label class="form-label" for="email">{{ __('E-Mail Address') }}*</label>
|
|
{{ Form::text('email', $user->email, array('placeholder'=>'E-Mail', 'class'=>'form-control', 'id'=>'email', 'tabindex' => 14)) }}
|
|
</div>
|
|
<div class="form-group col-md-6">
|
|
<label class="form-label" for="email-confirm">{{ __('Confirm E-Mail') }}</label>
|
|
{{ Form::text('email-confirm', $user->email, array('placeholder'=>__('Confirm E-Mail'), 'class'=>'form-control', 'id'=>'email-confirm', 'tabindex' => 15)) }}
|
|
</div>
|
|
</div>
|
|
@endif
|
|
@endif
|
|
</div>
|
|
</div>
|
|
|
|
<div class="card mb-4">
|
|
<h5 class="card-header">
|
|
{{ __('account.bank_data') }} <span class=" text-muted small">({{ __('account.required_for_commission_payments') }})</span>
|
|
</h5>
|
|
<div class="card-body">
|
|
<div class="form-row">
|
|
<div class="form-group col-md-12">
|
|
<label class="form-label" for="bank_owner">{{ __('account.account_holder') }}*</label>
|
|
{{ Form::text('bank_owner', $user->account->bank_owner, array('placeholder'=>__('account.firstname_lastname'), 'class'=>'form-control', 'id'=>'bank_owner', 'required'=>true)) }}
|
|
</div>
|
|
<div class="form-group col-md-6">
|
|
<label class="form-label" for="bank_iban">{{ __('account.IBAN') }}*</label>
|
|
{{ Form::text('bank_iban', $user->account->bank_iban, array('placeholder'=>__('account.IBAN'), 'class'=>'form-control', 'id'=>'bank_iban', 'required'=>true)) }}
|
|
</div>
|
|
<div class="form-group col-md-6">
|
|
<label class="form-label" for="bank_bic">{{ __('account.BIC') }}*</label>
|
|
{{ Form::text('bank_bic', $user->account->bank_bic, array('placeholder'=>__('account.BIC'), 'class'=>'form-control', 'id'=>'bank_bic', 'required'=>true)) }}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div class="card mb-4">
|
|
<h5 class="card-header">
|
|
<div class="row">
|
|
<div class="col-md-12">
|
|
{{ __('account.vat_data') }}
|
|
</div>
|
|
</div>
|
|
</h5>
|
|
<div class="card-body" id="user-vat-validation">
|
|
<div class="form-row">
|
|
<div class="form-group col-md-12">
|
|
<label class="form-label" for="taxable_sales">{{ __('account.VAT_liability') }} @if($user->account->getCountryAttrAs('taxable_sales'))* @endif</label>
|
|
<select class="selectpicker" name="taxable_sales" id="taxable_sales" data-style="btn-light" @if($user->account->getCountryAttrAs('taxable_sales')) required @endif>
|
|
{!! HTMLHelper::getTaxSaleOptions($user->account->taxable_sales) !!}
|
|
</select>
|
|
<p class="badge">{{ __('account.VAT_copy_1') }}</p>
|
|
</div>
|
|
|
|
<div class="form-group col-md-6 {{ $errors->has('tax_number') ? 'has-error' : '' }}">
|
|
<label class="form-label" for="tax_number">{{ __('account.tax_number') }} @if($user->account->getCountryAttrAs('tax_number'))* @endif</label>
|
|
{{ Form::text('tax_number', $user->account->tax_number, array('placeholder'=>__('account.tax_number'), 'class'=>'form-control', 'id'=>'tax_number', $user->account->getCountryAttrAs('tax_number','required'))) }}
|
|
@if ($errors->has('tax_number'))
|
|
<span class="help-block">
|
|
<strong>{{ $errors->first('tax_number') }}</strong>
|
|
</span>
|
|
@endif
|
|
</div>
|
|
@if($user->account->country_id && $user->account->country->eu_country)
|
|
<div class="col-sm-12">
|
|
<hr>
|
|
</div>
|
|
<div class="form-group col-md-6 {{ $errors->has('tax_identification_number') ? 'has-error' : '' }}">
|
|
<label class="form-label" for="tax_identification_number">{{ __('account.VAT_ID_number') }} @if($user->account->getCountryAttrAs('tax_id_number'))* @endif</label>
|
|
{{ Form::text('tax_identification_number', $user->account-> tax_identification_number, array('placeholder'=>__('account.VAT_ID_number'), 'class'=>'form-control', 'id'=>'tax_identification_number', $user->account->getCountryAttrAs('tax_id_number','required'), 'readonly')) }}
|
|
@if ($errors->has('tax_identification_number'))
|
|
<span class="help-block">
|
|
<strong>{{ $errors->first('tax_identification_number') }}</strong>
|
|
</span>
|
|
@endif
|
|
@if($user->account->reverse_charge_valid)
|
|
<div class="mt-3">
|
|
<div class="badge badge-primary">Aktiv seit: {{ $user->account->getReverseChargeValidFormat() }}</div>
|
|
<button type="submit" class="btn btn-xs btn-default" name="action" value="reverse_charge_delete"><i class="fa fa-trash"></i> {{ __('account.reverse_charge_action_1') }}</button>
|
|
</div>
|
|
@endif
|
|
|
|
{{-- ($user->account->reverse_charge_valid ? 'readonly' : '') --}}
|
|
@if(!$user->account->reverse_charge_valid)
|
|
<button type="button" class="btn btn-primary btn-sm mt-3" data-toggle="modal" data-target="#modal-user-vat-validation">
|
|
<span class="ion ion-md-add"></span> {{ __('account.reverse_charge_action_2') }}
|
|
</button>
|
|
@endif
|
|
</div>
|
|
@else
|
|
<div class="form-group col-md-6">
|
|
<label class="form-label" for="tax_identification_number">{{ __('account.VAT_ID_number') }} @if($user->account->getCountryAttrAs('tax_id_number'))* @endif</label>
|
|
{{ Form::text('tax_identification_number', $user->account-> tax_identification_number, array('placeholder'=>__('account.VAT_ID_number'), 'class'=>'form-control', 'id'=>'tax_identification_number', $user->account->getCountryAttrAs('tax_id_number','required'))) }}
|
|
</div>
|
|
@endif
|
|
</div>
|
|
|
|
<div class="row">
|
|
<div class="form-group col-md-12">
|
|
|
|
@if($errors->has('tax_identification_number_validated'))
|
|
<div class="alert badge-danger block p-2">
|
|
<ul>
|
|
@foreach ($errors->all() as $error)
|
|
<li>{{ $error }}</li>
|
|
@endforeach
|
|
</ul>
|
|
</div>
|
|
@else
|
|
@if(!$user->account-> tax_identification_number && !$user->account->tax_number)
|
|
<div class="badge badge-default">{{ __('account.info_vat_numbers') }}</div>
|
|
@endif
|
|
{{-- @if($errors->has('tax_number') || $errors->has('tax_identification_number'))
|
|
<div class="alert badge-danger block p-2">Fehler: Bitte {{ __('Steuernummer') }} und/oder {{ __('USt-ID Nummer') }} angeben!*</div>
|
|
@else
|
|
<div class="badge badge-default">Hinweis: Bitte {{ __('Steuernummer') }} und/oder {{ __('USt-ID Nummer') }} angeben!*</div>
|
|
@endif
|
|
--}}
|
|
@endif
|
|
</div>
|
|
</div>
|
|
<div class="form-row">
|
|
<div class="form-group col-md-12">
|
|
<hr>
|
|
<button type="submit" class=" float-right btn btn-sm btn-submit">{{ __('save') }}</button>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<script type="application/javascript">
|
|
|
|
$( document ).ready(function() {
|
|
// Shipping Address show|hide
|
|
$("#same_as_billing").on("change", function () {
|
|
$('#show_shipping_address').slideToggle(200, function () {
|
|
// scroll down to shipping area.
|
|
if ($('#show_shipping_address').is(":visible")) {
|
|
_scrollTo('#show_shipping_address', 20);
|
|
}
|
|
});
|
|
});
|
|
|
|
$.extend( $.validator.messages, {
|
|
required: "{{__('account.validator_required')}}",
|
|
maxlength: $.validator.format( "{{__('account.validator_maxlength')}}" ),
|
|
minlength: $.validator.format( "{{__('account.validator_minlength')}}" ),
|
|
rangelength: $.validator.format( "{{__('account.validator_rangelength')}}" ),
|
|
email: "{{__('account.validator_email')}}",
|
|
url: "{{__('account.validator_url')}}",
|
|
date: "{{__('account.validator_date')}}",
|
|
number: "{{__('account.validator_number')}}",
|
|
digits: "{{__('account.validator_digits')}}",
|
|
equalTo: "{{__('account.validator_equalTo')}}",
|
|
range: $.validator.format( "{{__('account.validator_range')}}" ),
|
|
max: $.validator.format( "{{__('account.validator_max')}}" ),
|
|
min: $.validator.format( "{{__('account.validator_min')}}" ),
|
|
creditcard: "{{__('account.validator_creditcard')}}"
|
|
});
|
|
// Set up validator
|
|
$('#lead-form-validation').validate({
|
|
rules: {
|
|
'email': {
|
|
required: true,
|
|
email: true,
|
|
remote:
|
|
{
|
|
url: "{{ route('user_check_mail') }}",
|
|
type: "post",
|
|
data:
|
|
{
|
|
user_id: function()
|
|
{
|
|
return $('#lead-form-validation :input[name="user_id"]').val();
|
|
},
|
|
email: function()
|
|
{
|
|
return $('#lead-form-validation :input[name="email"]').val();
|
|
}
|
|
},
|
|
encode: true,
|
|
headers: {
|
|
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
|
|
},
|
|
}
|
|
},
|
|
'email-confirm': {
|
|
required: true,
|
|
equalTo: "#email"
|
|
},
|
|
},
|
|
errorPlacement: function errorPlacement(error, element) {
|
|
$(element).parents('.form-group').append(
|
|
error.addClass('invalid-feedback small d-block')
|
|
)
|
|
},
|
|
highlight: function (element) {
|
|
if ($(element).hasClass('selectpicker')) {
|
|
$(element).parent().addClass('is-invalid');
|
|
}
|
|
$(element).addClass('is-invalid');
|
|
},
|
|
unhighlight: function (element) {
|
|
$(element).removeClass('is-invalid');
|
|
$(element).parents('.form-group').find('.is-invalid').removeClass('is-invalid');
|
|
},
|
|
messages : {
|
|
required: "{{__('This field is required.')}}",
|
|
country_id : {
|
|
required: "{{__('This field is required.')}}",
|
|
},
|
|
salutation : {
|
|
required: "{{__('please specify')}}",
|
|
},
|
|
first_name : {
|
|
required: "{{__('This field is required.')}}",
|
|
},
|
|
last_name : {
|
|
required: "{{__('This field is required.')}}",
|
|
},
|
|
zipcode : {
|
|
required: "{{__('This field is required.')}}",
|
|
},
|
|
address : {
|
|
required: "{{__('This field is required.')}}",
|
|
},
|
|
city : {
|
|
required: "{{__('This field is required.')}}",
|
|
},
|
|
birthday : {
|
|
required: "{{__('This field is required.')}}",
|
|
},
|
|
|
|
equalTo : "{{__('Please enter the same value again.')}}",
|
|
'email-confirm' : {
|
|
equalTo : "{{__('Please enter the same value again.')}}",
|
|
required: "{{__('This field is required.')}}",
|
|
},
|
|
email: {
|
|
required : "{{__('This field is required.')}}",
|
|
email: "{{ __('Please enter a valid email address.') }}",
|
|
remote : "{{ __('This E-mail is already in use.') }}"
|
|
},
|
|
},
|
|
onkeyup: false
|
|
});
|
|
|
|
});
|
|
</script>
|