checkout, register, payment,
checkout correction, register wizard, payment packege,
This commit is contained in:
parent
6e3adac4d7
commit
446bc4561b
48 changed files with 2580 additions and 1493 deletions
|
|
@ -66,3 +66,95 @@
|
|||
{!! Form::close() !!}
|
||||
|
||||
</div>
|
||||
|
||||
<script type="application/javascript">
|
||||
|
||||
$( document ).ready(function() {
|
||||
$.extend($.validator.messages, {
|
||||
required: "Dieses Feld ist ein Pflichtfeld.",
|
||||
maxlength: $.validator.format("Geben Sie bitte maximal {0} Zeichen ein."),
|
||||
minlength: $.validator.format("Geben Sie bitte mindestens {0} Zeichen ein."),
|
||||
rangelength: $.validator.format("Geben Sie bitte mindestens {0} und maximal {1} Zeichen ein."),
|
||||
email: "Geben Sie bitte eine gültige E-Mail Adresse ein.",
|
||||
url: "Geben Sie bitte eine gültige URL ein.",
|
||||
date: "Bitte geben Sie ein gültiges Datum ein.",
|
||||
number: "Geben Sie bitte eine Nummer ein.",
|
||||
digits: "Geben Sie bitte nur Ziffern ein.",
|
||||
equalTo: "Bitte denselben Wert wiederholen.",
|
||||
range: $.validator.format("Geben Sie bitte einen Wert zwischen {0} und {1} ein."),
|
||||
max: $.validator.format("Geben Sie bitte einen Wert kleiner oder gleich {0} ein."),
|
||||
min: $.validator.format("Geben Sie bitte einen Wert größer oder gleich {0} ein."),
|
||||
creditcard: "Geben Sie bitte eine gültige Kreditkarten-Nummer ein."
|
||||
});
|
||||
|
||||
// Set up validator
|
||||
var message = 'Default error message';
|
||||
$('#data-shop-form-validations').validate({
|
||||
rules: {
|
||||
'user_shop_name': {
|
||||
required: true,
|
||||
remote:
|
||||
{
|
||||
url: "{{ route('user_shop_name_check') }}",
|
||||
type: "post",
|
||||
data:
|
||||
{
|
||||
user_shop_name: function()
|
||||
{
|
||||
return $('#data-shop-form-validations :input[name="user_shop_name"]').val();
|
||||
}
|
||||
},
|
||||
encode: true,
|
||||
headers: {
|
||||
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
|
||||
},
|
||||
dataFilter: function(response) {
|
||||
response = $.parseJSON(response);
|
||||
console.log(response);
|
||||
|
||||
if (response.success === true) return true;
|
||||
else {
|
||||
message = response.errors.user_shop_name;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
errorPlacement: function errorPlacement(error, element) {
|
||||
$(element).parents('.form-group').find('.input-group').after(
|
||||
error.addClass('invalid-feedback d-block font-weight-bold')
|
||||
)
|
||||
},
|
||||
highlight: function (element) {
|
||||
|
||||
$(element).parent().find('button').removeClass('btn-success');
|
||||
$(element).parent().find('button').addClass('btn-danger');
|
||||
$(element).parent().find('button i').removeClass('fa-check');
|
||||
$(element).parent().find('button i').addClass('fa-times');
|
||||
|
||||
$(element).removeClass('is-valid');
|
||||
$(element).addClass('is-invalid');
|
||||
},
|
||||
unhighlight: function (element) {
|
||||
$(element).removeClass('is-invalid');
|
||||
$(element).addClass('is-valid');
|
||||
|
||||
$(element).parent().find('button').removeClass('btn-danger');
|
||||
$(element).parent().find('button').addClass('btn-success');
|
||||
$(element).parent().find('button i').removeClass('fa-times');
|
||||
$(element).parent().find('button i').addClass('fa-check');
|
||||
|
||||
$(element).parents('.form-group').find('.is-invalid').removeClass('is-invalid');
|
||||
},
|
||||
messages : {
|
||||
required: "{{__('This field is required.')}}",
|
||||
user_shop_name: {
|
||||
email: "{{ __('Please enter a valid email address.') }}",
|
||||
remote : function(){ return message; }
|
||||
},
|
||||
},
|
||||
onkeyup: function(element) {$(element).valid()},
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -5,16 +5,62 @@
|
|||
<div class="card-body">
|
||||
<div class="form-group">
|
||||
<label class="custom-control custom-checkbox m-0">
|
||||
<input type="checkbox" class="custom-control-input" name="accepted_data_protection" id="accepted_data_protection" required>
|
||||
<input type="checkbox" class="custom-control-input" name="accepted_data_protection" id="accepted_data_protection" @if($user->account && $user->account->data_protection) checked="checked" @endif>
|
||||
<span class="custom-control-label">{!! __('I have read the :link and accept it.*', ['link' => '<a href="#" class="update_modal_data_load" data-url="'.route('loading_modal').'" data-data="data_protection" data-target="#modal-loading">'.__('data protection').'</a>']) !!}</span>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="custom-control custom-checkbox m-0">
|
||||
<input type="checkbox" class="custom-control-input" name="accepted_active" id="accepted_active" required>
|
||||
<input type="checkbox" class="custom-control-input" name="accepted_active" id="accepted_active" @if($user->agreement) checked="checked" @endif required>
|
||||
<span class="custom-control-label">{!! __('Declaration of consent') !!}</span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="application/javascript">
|
||||
$( document ).ready(function() {
|
||||
|
||||
// Set up validator
|
||||
$('#lead-form-validation-confirm').validate({
|
||||
rules: {
|
||||
'accepted_data_protection': {
|
||||
required: true
|
||||
},
|
||||
'accepted_active': {
|
||||
required: true
|
||||
},
|
||||
},
|
||||
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.')}}",
|
||||
accepted_data_protection : {
|
||||
required: "{{__('This field is required.')}}",
|
||||
},
|
||||
accepted_active : {
|
||||
required: "{{__('This field is required.')}}",
|
||||
},
|
||||
|
||||
},
|
||||
onkeyup: false
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
<div class="card mb-4">
|
||||
<h5 class="card-header">
|
||||
{{ __('Kontakt verifizieren') }}
|
||||
{{ __('Berater einladen') }}
|
||||
</h5>
|
||||
<div class="card-body">
|
||||
<div class="form-group">
|
||||
<label class="custom-control custom-checkbox m-0">
|
||||
<input type="checkbox" class="custom-control-input" name="contact_verify" id="contact_verify" checked>
|
||||
<span class="custom-control-label"> {{ __('Kontakt anlegen und dem Kontakt eine E-Mail zur Verifizierung senden!') }}</span>
|
||||
<span class="custom-control-label"> {{ __('Berater erstellen und eine E-Mail zur Einladung senden!') }}</span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -20,11 +20,9 @@
|
|||
{{ __('Your Data') }}
|
||||
</h4>
|
||||
|
||||
|
||||
{!! Form::open(['url' => route('user_edit'), 'class' => 'form-horizontal', 'id'=>'lead-form-validation']) !!}
|
||||
|
||||
<input type="hidden" name="user_id" id="user_id" value="@if($user->id>0){{$user->id}}@else new @endif">
|
||||
@include('user.form')
|
||||
@include('user.form')
|
||||
|
||||
<div class="text-left mt-3">
|
||||
<button type="submit" class="btn btn-secondary">{{ __('save changes') }}</button>
|
||||
|
|
|
|||
|
|
@ -1,89 +1,11 @@
|
|||
<div class="card mb-4">
|
||||
<h5 class="card-header">
|
||||
{{ __('use') }}
|
||||
</h5>
|
||||
<div class="card-body">
|
||||
<div class="form-group">
|
||||
<label class="form-label">{{ __('business or private') }}*</label>
|
||||
<select class="selectpicker" name="company" id="company" data-style="btn-light" data-live-search="false" required, tabindex="0">
|
||||
{!! HTMLHelper::getCompanyOptions($user->account->company) !!}
|
||||
</select>
|
||||
@if ($errors->has('company'))
|
||||
<span class="help-block">
|
||||
<strong>{{ $errors->first('company') }}</strong>
|
||||
</span>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card mb-4 show_company_holder">
|
||||
<h5 class="card-header">
|
||||
{{ __('Company data') }}
|
||||
</h5>
|
||||
<div class="card-body">
|
||||
<div class="form-group">
|
||||
<label for="company_name" class="form-label">{{ __('Company name') }}*</label>
|
||||
{{ Form::text('company_name', $user->account->company_name, array('placeholder'=>__('Company name'), 'class'=>'form-control', 'id'=>'company_name', 'required' => true, 'tabindex' => 1)) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="form-label" for="company_street">{{ __('Street') }} / {{ __('House number') }}</label>
|
||||
{{ Form::text('company_street', $user->account->company_street, array('placeholder'=>__('Street'), 'class'=>'form-control', 'id'=>'company_street', 'tabindex' => 2)) }}
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-2">
|
||||
<label class="form-label" for="company_postal_code">{{ __('Postcode') }}</label>
|
||||
{{ Form::text('company_postal_code', $user->account->company_postal_code, array('placeholder'=>__('Postcode'), 'class'=>'form-control', 'id'=>'company_postal_code', 'tabindex' => 3)) }}
|
||||
|
||||
</div>
|
||||
<div class="form-group col-md-6">
|
||||
<label class="form-label" for="company_city">{{ __('City') }}</label>
|
||||
{{ Form::text('company_city', $user->account->company_city, array('placeholder'=>__('City'), 'class'=>'form-control', 'id'=>'company_city', 'tabindex' => 4)) }}
|
||||
|
||||
</div>
|
||||
<div class="form-group col-md-4 {{ $errors->has('company_country_id') ? 'has-error' : '' }}">
|
||||
<label class="form-label">{{ __('Country') }}*</label>
|
||||
<select class="selectpicker" name="company_country_id" id="company_country_id" data-style="btn-light" data-live-search="true" required tabindex="5">
|
||||
{!! HTMLHelper::getContriesWithMore($user->account->company_country_id) !!}
|
||||
</select>
|
||||
@if ($errors->has('company_country_id'))
|
||||
<span class="help-block">
|
||||
<strong>{{ $errors->first('company_country_id') }}</strong>
|
||||
</span>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-4">
|
||||
<label class="form-label" for="company_pre_phone_id">{{ __('Country code') }}</label>
|
||||
<select class="selectpicker" name="company_pre_phone_id" id="company_pre_phone_id" data-style="btn-light" data-live-search="true" tabindex="19">
|
||||
{!! HTMLHelper::getContriesCodes($user->account->company_pre_phone_id) !!}
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-8">
|
||||
<label class="form-label" for="company_phone">{{ __('Phone') }}</label>
|
||||
{{ Form::text('company_phone', $user->account->company_phone, array('placeholder'=>__('Phone'), 'class'=>'form-control', 'id'=>'company_phone', 'tabindex' => 7)) }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="form-label" for="company_homepage">{{ __('Homepage') }}</label>
|
||||
{{ Form::text('company_homepage', $user->account->company_homepage, array('placeholder'=>__('Homepage'), 'class'=>'form-control', 'id'=>'company_homepage', 'tabindex' => 8)) }}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="card mb-4">
|
||||
<h5 class="card-header">
|
||||
{{ __('Personal Data') }}
|
||||
{{ __('Rechnungsdaten') }}
|
||||
</h5>
|
||||
<div class="card-body">
|
||||
<div class="form-row">
|
||||
|
||||
|
||||
<div class="form-group col-md-4">
|
||||
<label class="form-label">{{ __('Salutation') }}*</label>
|
||||
<select class="selectpicker" data-style="btn-light" name="salutation" id="salutation" required tabindex="10">
|
||||
|
|
@ -100,8 +22,8 @@
|
|||
<div class="form-row">
|
||||
|
||||
<div class="form-group col-md-6">
|
||||
<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', 'tabindex' => 12)) }}
|
||||
<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' => 12)) }}
|
||||
|
||||
</div>
|
||||
<div class="form-group col-md-6">
|
||||
|
|
@ -173,8 +95,8 @@
|
|||
</div>
|
||||
|
||||
<hr>
|
||||
@if(!isset($step))
|
||||
@if($user->email)
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-6">
|
||||
<label class="form-label" for="email">{{ __('E-Mail Address') }}*</label>
|
||||
|
|
@ -190,13 +112,9 @@
|
|||
<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') }} {{__('Change E-Mail')}}</a>
|
||||
|
||||
|
||||
@else
|
||||
<a href="{{ route('user_update_email', [$user->id]) }}" class="btn btn-default btn-sm">{{__('Change E-Mail')}}</a>
|
||||
@endif
|
||||
|
||||
|
||||
@else
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-6">
|
||||
|
|
@ -210,10 +128,91 @@
|
|||
</div>
|
||||
|
||||
@endif
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card mb-4">
|
||||
<h5 class="card-header">
|
||||
{{ __('use') }}
|
||||
</h5>
|
||||
<div class="card-body">
|
||||
<div class="form-group">
|
||||
<label class="form-label">{{ __('business or private') }}*</label>
|
||||
<select class="selectpicker" name="company" id="company" data-style="btn-light" data-live-search="false" required tabindex="0">
|
||||
{!! HTMLHelper::getCompanyOptions($user->account->company) !!}
|
||||
</select>
|
||||
@if ($errors->has('company'))
|
||||
<span class="help-block">
|
||||
<strong>{{ $errors->first('company') }}</strong>
|
||||
</span>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card mb-4 show_company_holder">
|
||||
<h5 class="card-header">
|
||||
{{ __('Company data') }}
|
||||
</h5>
|
||||
<div class="card-body">
|
||||
<div class="form-group">
|
||||
<label for="company_name" class="form-label">{{ __('Company name') }}*</label>
|
||||
{{ Form::text('company_name', $user->account->company_name, array('placeholder'=>__('Company name'), 'class'=>'form-control', 'id'=>'company_name', 'required' => true, 'tabindex' => 1)) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="form-label" for="company_street">{{ __('Street') }} / {{ __('House number') }}</label>
|
||||
{{ Form::text('company_street', $user->account->company_street, array('placeholder'=>__('Street'), 'class'=>'form-control', 'id'=>'company_street', 'tabindex' => 2)) }}
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-2">
|
||||
<label class="form-label" for="company_postal_code">{{ __('Postcode') }}</label>
|
||||
{{ Form::text('company_postal_code', $user->account->company_postal_code, array('placeholder'=>__('Postcode'), 'class'=>'form-control', 'id'=>'company_postal_code', 'tabindex' => 3)) }}
|
||||
|
||||
</div>
|
||||
<div class="form-group col-md-6">
|
||||
<label class="form-label" for="company_city">{{ __('City') }}</label>
|
||||
{{ Form::text('company_city', $user->account->company_city, array('placeholder'=>__('City'), 'class'=>'form-control', 'id'=>'company_city', 'tabindex' => 4)) }}
|
||||
|
||||
</div>
|
||||
<div class="form-group col-md-4 {{ $errors->has('company_country_id') ? 'has-error' : '' }}">
|
||||
<label class="form-label">{{ __('Country') }}*</label>
|
||||
<select class="selectpicker" name="company_country_id" id="company_country_id" data-style="btn-light" data-live-search="true" required tabindex="5">
|
||||
{!! HTMLHelper::getContriesWithMore($user->account->company_country_id) !!}
|
||||
</select>
|
||||
@if ($errors->has('company_country_id'))
|
||||
<span class="help-block">
|
||||
<strong>{{ $errors->first('company_country_id') }}</strong>
|
||||
</span>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-4">
|
||||
<label class="form-label" for="company_pre_phone_id">{{ __('Country code') }}</label>
|
||||
<select class="selectpicker" name="company_pre_phone_id" id="company_pre_phone_id" data-style="btn-light" data-live-search="true" tabindex="19">
|
||||
{!! HTMLHelper::getContriesCodes($user->account->company_pre_phone_id) !!}
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-8">
|
||||
<label class="form-label" for="company_phone">{{ __('Phone') }}</label>
|
||||
{{ Form::text('company_phone', $user->account->company_phone, array('placeholder'=>__('Phone'), 'class'=>'form-control', 'id'=>'company_phone', 'tabindex' => 7)) }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="form-label" for="company_homepage">{{ __('Homepage') }}</label>
|
||||
{{ Form::text('company_homepage', $user->account->company_homepage, array('placeholder'=>__('Homepage'), 'class'=>'form-control', 'id'=>'company_homepage', 'tabindex' => 8)) }}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card mb-4">
|
||||
<h5 class="card-header">
|
||||
{{ __('weiteres') }}
|
||||
</h5>
|
||||
|
|
@ -222,17 +221,17 @@
|
|||
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-4">
|
||||
<label for="birthday" class="form-label">{{ __('birthday') }}</label>
|
||||
<label for="birthday" class="form-label">{{ __('Geburtstag') }}</label>
|
||||
{{ Form::text('birthday', $user->account->birthday, array('placeholder'=>Util::formatDate(), 'data-date-format'=>Util::formatDate(), 'data-start_view'=>2, 'class'=>'form-control datepicker-birthday')) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-4">
|
||||
<label class="form-label" for="website">{{ __('website') }}</label>
|
||||
<label class="form-label" for="website">{{ __('Webseite') }}</label>
|
||||
{{ Form::text('website', $user->account->website, array('placeholder'=>__('website'), 'class'=>'form-control', 'id'=>'website')) }}
|
||||
|
||||
</div>
|
||||
<div class="form-group col-md-4">
|
||||
<label class="form-label" for="instagram">{{ __('instagram') }}</label>
|
||||
<label class="form-label" for="instagram">{{ __('Instagram') }}</label>
|
||||
{{ Form::text('instagram', $user->account->instagram, array('placeholder'=>__('instagram'), 'class'=>'form-control', 'id'=>'instagram')) }}
|
||||
|
||||
</div>
|
||||
|
|
@ -241,12 +240,12 @@
|
|||
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-6">
|
||||
<label class="form-label" for="facebook">{{ __('facebook') }}</label>
|
||||
<label class="form-label" for="facebook">{{ __('Facebook') }}</label>
|
||||
{{ Form::text('facebook', $user->account->facebook, array('placeholder'=>__('facebook'), 'class'=>'form-control', 'id'=>'facebook')) }}
|
||||
|
||||
</div>
|
||||
<div class="form-group col-md-6">
|
||||
<label class="form-label" for="facebook_fanpage">{{ __('facebook_fanpage') }}</label>
|
||||
<label class="form-label" for="facebook_fanpage">{{ __('Facebook Fanpage') }}</label>
|
||||
{{ Form::text('facebook_fanpage', $user->account->facebook_fanpage, array('placeholder'=>__('facebook_fanpage'), 'class'=>'form-control', 'id'=>'facebook_fanpage')) }}
|
||||
|
||||
</div>
|
||||
|
|
|
|||
30
resources/views/user/update_password_first_form.blade.php
Normal file
30
resources/views/user/update_password_first_form.blade.php
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
|
||||
<div class="card mb-4">
|
||||
<h5 class="card-header">
|
||||
{{__('Create Password')}}
|
||||
</h5>
|
||||
<div class="card-body">
|
||||
<div class="form-group row">
|
||||
<label class="col-form-label col-sm-2 text-sm-right">{{__('New Password')}}*</label>
|
||||
<div class="col-sm-10">
|
||||
<input class="form-control {{ $errors->has('password') ? 'is-invalid' : '' }}" type="password" name="password" placeholder="{{__('New Password')}}*" required>
|
||||
@if ($errors->has('password'))
|
||||
<span class="invalid-feedback" role="alert">
|
||||
<strong>{{ $errors->first('password') }}</strong>
|
||||
</span>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-form-label col-sm-2 text-sm-right">{{__('Confirm new Password')}}*</label>
|
||||
<div class="col-sm-10">
|
||||
<input class="form-control" {{ $errors->has('password_confirmation') ? 'is-invalid' : '' }} type="password" name="password_confirmation" placeholder="{{__('Confirm new Password')}}*" required>
|
||||
@if ($errors->has('password_confirmation'))
|
||||
<span class="invalid-feedback" role="alert">
|
||||
<strong>{{ $errors->first('password_confirmation') }}</strong>
|
||||
</span>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
458
resources/views/user/user_form.blade.php
Normal file
458
resources/views/user/user_form.blade.php
Normal file
|
|
@ -0,0 +1,458 @@
|
|||
<div class="card mb-4">
|
||||
<h5 class="card-header">
|
||||
{{ __('Rechnungsdaten') }}
|
||||
</h5>
|
||||
<div class="card-body">
|
||||
<input type="hidden" name="user_id" value="{{$user->id}}">
|
||||
<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-2 {{ $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 class="form-group col-md-5 {{ $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-5 {{ $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-group {{ $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 class="form-group {{ $errors->has('address_2') ? 'has-error' : '' }}">
|
||||
<label class="form-label" for="address_2">{{ __('Wohnung / Gebäude (optional)') }}</label>
|
||||
{{ Form::text('address_2', $user->account->address_2, array('placeholder'=>__('Wohnung / Gebäude (optional)'), 'class'=>'form-control', 'id'=>'address_2', 'tabindex' => 6)) }}
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-2 {{ $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 class="form-group col-md-4 {{ $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>
|
||||
|
||||
<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">
|
||||
<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">
|
||||
<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>
|
||||
@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') }} {{__('Change E-Mail')}}</a>
|
||||
@else
|
||||
<a href="{{ route('user_update_email', [$user->id]) }}" class="btn btn-default btn-sm">{{__('Change E-Mail')}}</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">
|
||||
<div class="card-body">
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-6">
|
||||
<label class="form-label" for="tax_number">{{ __('Steuernummer') }}</label>
|
||||
{{ Form::text('tax_number', $user->account->tax_number, array('placeholder'=>__('Steuernummer'), 'class'=>'form-control', 'id'=>'tax_number')) }}
|
||||
</div>
|
||||
<div class="form-group col-md-6">
|
||||
<label class="form-label" for=" tax_identification_number">{{ __('USt-ID Nummer') }}</label>
|
||||
{{ Form::text(' tax_identification_number', $user->account-> tax_identification_number, array('placeholder'=>__('USt-ID Nummer'), 'class'=>'form-control', 'id'=>' tax_identification_number')) }}
|
||||
</div>
|
||||
</div>
|
||||
<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">{{__('Versand an die gleiche Adresse')}}</span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card mb-4" id="show_shipping_address" style="@if($user->account->same_as_billing) display:none @endif">
|
||||
<h5 class="card-header">
|
||||
{{ __('Versand Adresse') }}
|
||||
</h5>
|
||||
<div class="card-body">
|
||||
|
||||
<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-2 {{ $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 class="form-group col-md-5 {{ $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-5 {{ $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-group {{ $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 class="form-group {{ $errors->has('shipping_address_2') ? 'has-error' : '' }}">
|
||||
<label class="form-label" for="shipping_address_2">{{ __('Wohnung / Gebäude (optional)') }}</label>
|
||||
{{ Form::text('shipping_address_2', $user->account->shipping_address_2, array('placeholder'=>__('Wohnung / Gebäude (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 class="form-row">
|
||||
<div class="form-group col-md-2 {{ $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 class="form-group col-md-4 {{ $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>
|
||||
</div>
|
||||
|
||||
<div class="card mb-4">
|
||||
<h5 class="card-header">
|
||||
{{ __('weiteres') }}
|
||||
</h5>
|
||||
<div class="card-body">
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-4">
|
||||
<label for="birthday" class="form-label">{{ __('Geburtstag') }}</label>
|
||||
{{ Form::text('birthday', $user->account->birthday, array('placeholder'=>Util::formatDate(), 'data-date-format'=>Util::formatDate(), 'data-start_view'=>2, 'class'=>'form-control datepicker-birthday')) }}
|
||||
</div>
|
||||
<div class="form-group col-md-4">
|
||||
<label class="form-label" for="website">{{ __('Webseite') }}</label>
|
||||
{{ Form::text('website', $user->account->website, array('placeholder'=>__('Webseite'), 'class'=>'form-control', 'id'=>'website')) }}
|
||||
|
||||
</div>
|
||||
<div class="form-group col-md-4">
|
||||
<label class="form-label" for="instagram">{{ __('Instagram') }}</label>
|
||||
{{ Form::text('instagram', $user->account->instagram, array('placeholder'=>__('Instagram'), 'class'=>'form-control', 'id'=>'instagram')) }}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-6">
|
||||
<label class="form-label" for="facebook">{{ __('Facebook') }}</label>
|
||||
{{ Form::text('facebook', $user->account->facebook, array('placeholder'=>__('Facebook'), 'class'=>'form-control', 'id'=>'facebook')) }}
|
||||
|
||||
</div>
|
||||
<div class="form-group col-md-6">
|
||||
<label class="form-label" for="facebook_fanpage">{{ __('Facebook Fanpage') }}</label>
|
||||
{{ Form::text('facebook_fanpage', $user->account->facebook_fanpage, array('placeholder'=>__('Facebook Fanpage'), 'class'=>'form-control', 'id'=>'facebook_fanpage')) }}
|
||||
|
||||
</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);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('.datepicker-birthday').datepicker({
|
||||
todayBtn: 'linked',
|
||||
daysOfWeekDisabled: '1',
|
||||
multidate: false,
|
||||
daysOfWeekHighlighted: '0,6',
|
||||
autoclose: true,
|
||||
format: 'dd.mm.yyyy',
|
||||
language: 'de',
|
||||
clearBtn: true,
|
||||
startView: 2,
|
||||
|
||||
});
|
||||
|
||||
$.extend( $.validator.messages, {
|
||||
required: "Dieses Feld ist ein Pflichtfeld.",
|
||||
maxlength: $.validator.format( "Geben Sie bitte maximal {0} Zeichen ein." ),
|
||||
minlength: $.validator.format( "Geben Sie bitte mindestens {0} Zeichen ein." ),
|
||||
rangelength: $.validator.format( "Geben Sie bitte mindestens {0} und maximal {1} Zeichen ein." ),
|
||||
email: "Geben Sie bitte eine gültige E-Mail Adresse ein.",
|
||||
url: "Geben Sie bitte eine gültige URL ein.",
|
||||
date: "Bitte geben Sie ein gültiges Datum ein.",
|
||||
number: "Geben Sie bitte eine Nummer ein.",
|
||||
digits: "Geben Sie bitte nur Ziffern ein.",
|
||||
equalTo: "Bitte denselben Wert wiederholen.",
|
||||
range: $.validator.format( "Geben Sie bitte einen Wert zwischen {0} und {1} ein." ),
|
||||
max: $.validator.format( "Geben Sie bitte einen Wert kleiner oder gleich {0} ein." ),
|
||||
min: $.validator.format( "Geben Sie bitte einen Wert größer oder gleich {0} ein." ),
|
||||
creditcard: "Geben Sie bitte eine gültige Kreditkarten-Nummer ein."
|
||||
});
|
||||
|
||||
// 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: "{{__('Bitte angeben.')}}",
|
||||
},
|
||||
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.')}}",
|
||||
},
|
||||
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>
|
||||
254
resources/views/user/user_new_form.blade.php
Normal file
254
resources/views/user/user_new_form.blade.php
Normal file
|
|
@ -0,0 +1,254 @@
|
|||
<div class="card mb-4">
|
||||
<h5 class="card-header">
|
||||
{{ __('Rechnungsdaten') }}
|
||||
</h5>
|
||||
<div class="card-body">
|
||||
<input type="hidden" name="user_id" value="{{$user->id}}">
|
||||
<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-2 {{ $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 class="form-group col-md-5 {{ $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-5 {{ $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-group {{ $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', 'id'=>'address', 'tabindex' => 6)) }}
|
||||
@if ($errors->has('address'))
|
||||
<span class="help-block">
|
||||
<strong>{{ $errors->first('address') }}</strong>
|
||||
</span>
|
||||
@endif
|
||||
</div>
|
||||
<div class="form-group {{ $errors->has('address_2') ? 'has-error' : '' }}">
|
||||
<label class="form-label" for="address_2">{{ __('Wohnung / Gebäude (optional)') }}</label>
|
||||
{{ Form::text('address_2', $user->account->address_2, array('placeholder'=>__('Wohnung / Gebäude (optional)'), 'class'=>'form-control', 'id'=>'address_2', 'tabindex' => 6)) }}
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-2 {{ $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', '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', 'id'=>'city', 'tabindex' => 8)) }}
|
||||
@if ($errors->has('city'))
|
||||
<span class="help-block">
|
||||
<strong>{{ $errors->first('city') }}</strong>
|
||||
</span>
|
||||
@endif
|
||||
</div>
|
||||
<div class="form-group col-md-4 {{ $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>
|
||||
|
||||
<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">
|
||||
<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">
|
||||
<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>
|
||||
<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', 'required'=>true, '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', 'required'=>true, 'id'=>'email-confirm', 'tabindex' => 15)) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ Form::hidden('same_as_billing', 1) }}
|
||||
|
||||
<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);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('.datepicker-birthday').datepicker({
|
||||
todayBtn: 'linked',
|
||||
daysOfWeekDisabled: '1',
|
||||
multidate: false,
|
||||
daysOfWeekHighlighted: '0,6',
|
||||
autoclose: true,
|
||||
format: 'dd.mm.yyyy',
|
||||
language: 'de',
|
||||
clearBtn: true,
|
||||
startView: 2,
|
||||
|
||||
});
|
||||
|
||||
$.extend( $.validator.messages, {
|
||||
required: "Dieses Feld ist ein Pflichtfeld.",
|
||||
maxlength: $.validator.format( "Geben Sie bitte maximal {0} Zeichen ein." ),
|
||||
minlength: $.validator.format( "Geben Sie bitte mindestens {0} Zeichen ein." ),
|
||||
rangelength: $.validator.format( "Geben Sie bitte mindestens {0} und maximal {1} Zeichen ein." ),
|
||||
email: "Geben Sie bitte eine gültige E-Mail Adresse ein.",
|
||||
url: "Geben Sie bitte eine gültige URL ein.",
|
||||
date: "Bitte geben Sie ein gültiges Datum ein.",
|
||||
number: "Geben Sie bitte eine Nummer ein.",
|
||||
digits: "Geben Sie bitte nur Ziffern ein.",
|
||||
equalTo: "Bitte denselben Wert wiederholen.",
|
||||
range: $.validator.format( "Geben Sie bitte einen Wert zwischen {0} und {1} ein." ),
|
||||
max: $.validator.format( "Geben Sie bitte einen Wert kleiner oder gleich {0} ein." ),
|
||||
min: $.validator.format( "Geben Sie bitte einen Wert größer oder gleich {0} ein." ),
|
||||
creditcard: "Geben Sie bitte eine gültige Kreditkarten-Nummer ein."
|
||||
});
|
||||
|
||||
// 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: "{{__('Bitte angeben.')}}",
|
||||
},
|
||||
first_name : {
|
||||
required: "{{__('This field is required.')}}",
|
||||
},
|
||||
last_name : {
|
||||
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>
|
||||
188
resources/views/user/wizard/show.blade.php
Normal file
188
resources/views/user/wizard/show.blade.php
Normal file
|
|
@ -0,0 +1,188 @@
|
|||
@extends('layouts.layout-2')
|
||||
|
||||
@section('content')
|
||||
|
||||
@if ($errors->any())
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="alert alert-danger">
|
||||
<ul>
|
||||
@foreach ($errors->all() as $error)
|
||||
<li>{{ $error }}</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<h4 class="font-weight-bold py-2 mb-2">
|
||||
{{ __('Registrierung abschließen') }}
|
||||
</h4>
|
||||
|
||||
<div id="smartwizard-3" class="smartwizard-register">
|
||||
<ul class="card px-4 pt-3 mb-3">
|
||||
<li>
|
||||
<a href="#smartwizard-3-step-1" class="mb-3">
|
||||
<span class="sw-done-icon ion ion-md-checkmark"></span>
|
||||
<span class="sw-number">1</span>
|
||||
Datenschutz
|
||||
<div class="text-muted small">zustimmen</div>
|
||||
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#smartwizard-3-step-2" class="mb-3">
|
||||
<span class="sw-done-icon ion ion-md-checkmark"></span>
|
||||
<span class="sw-number">2</span>
|
||||
Passwort
|
||||
<div class="text-muted small">vergeben</div>
|
||||
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#smartwizard-3-step-3" class="mb-3">
|
||||
<span class="sw-done-icon ion ion-md-checkmark"></span>
|
||||
<span class="sw-number">3</span>
|
||||
Daten
|
||||
<div class="text-muted small">anpassen</div>
|
||||
|
||||
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#smartwizard-3-step-4" class="mb-3">
|
||||
<span class="sw-done-icon ion ion-md-checkmark"></span>
|
||||
<span class="sw-number">4</span>
|
||||
Paket
|
||||
<div class="text-muted small">auswählen</div>
|
||||
|
||||
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#smartwizard-3-step-5" class="mb-3">
|
||||
<span class="sw-done-icon ion ion-md-checkmark"></span>
|
||||
<span class="sw-number">5</span>
|
||||
Registrierung
|
||||
<div class="text-muted small">abgeschlossen</div>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div class="mb-3">
|
||||
<div id="smartwizard-3-step-1" class="card animated fadeIn">
|
||||
<div class="card-body">
|
||||
{!! Form::open(['url' => route('wizard_store', [0]), 'class' => 'form-horizontal', 'id'=>'lead-form-validation-confirm']) !!}
|
||||
@include('user.data_confirm')
|
||||
<div class="text-left mt-3">
|
||||
<button type="submit" class="btn btn-secondary">{{ __('zustimmen und weiter') }}</button>
|
||||
</div>
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
</div>
|
||||
<div id="smartwizard-3-step-2" class="card animated fadeIn">
|
||||
<div class="card-body">
|
||||
@if(!$user->isPasswort())
|
||||
{!! Form::open(['url' => route('wizard_store', [1])]) !!}
|
||||
@include('user.update_password_first_form')
|
||||
<div class="text-left mt-3">
|
||||
<button type="submit" class="btn btn-secondary">{{ __('erstellen und weiter') }}</button>
|
||||
</div>
|
||||
{!! Form::close() !!}
|
||||
@else
|
||||
{!! Form::open(['url' => route('wizard_store', [1])]) !!}
|
||||
<p>Passwort wurde bereits erstellt.</p>
|
||||
<button type="submit" class="btn btn-secondary">{{ __('weiter') }}</button>
|
||||
{!! Form::close() !!}
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
<div id="smartwizard-3-step-3" class="card animated fadeIn">
|
||||
<div class="card-body">
|
||||
{!! Form::open(['url' => route('wizard_store', [2]), 'class' => 'form-horizontal', 'id'=>'lead-form-validation']) !!}
|
||||
@include('user.user_form')
|
||||
<div class="text-left mt-3">
|
||||
<button type="submit" class="btn btn-secondary">{{ __('speichern und weiter') }}</button>
|
||||
</div>
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
</div>
|
||||
<div id="smartwizard-3-step-4" class="card animated fadeIn">
|
||||
<div class="card-body">
|
||||
{!! Form::open(['url' => route('wizard_store', [3]), 'class' => 'form-horizontal']) !!}
|
||||
<div class="table-responsive">
|
||||
<table class="table table- m-0">
|
||||
<tbody>
|
||||
<div class="switchers-stacked">
|
||||
@php($counter = 1)
|
||||
@foreach($products as $product)
|
||||
<tr>
|
||||
<td class="text-center align-middle px-0">
|
||||
<label class="switcher switcher-secondary">
|
||||
<input type="radio" class="switcher-input" value="{{$product->id}}" name="switchers-package-wizard" @if($counter == 2) checked @endif >
|
||||
<span class="switcher-indicator">
|
||||
<span class="switcher-yes"></span>
|
||||
<span class="switcher-no"></span>
|
||||
</span>
|
||||
<span class="switcher-label"></span>
|
||||
</label>
|
||||
</td>
|
||||
<td class="p-4">
|
||||
<div class="media align-items-center">
|
||||
@if(count($product->images))
|
||||
<img src="{{ route('product_image', [$product->images->first()->slug]) }}" class="d-block ui-w-60 ui-bordered mr-4" alt="">
|
||||
@endif
|
||||
<div class="media-body">
|
||||
<h5 class="d-block text-dark">{{$product->name}}</h5>
|
||||
{!! $product->getLang('copy') !!}
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td class="text-right font-weight-semibold align-middle p-4">{{$product->getFormattedPrice()}} EUR / p.a.</td>
|
||||
</tr>
|
||||
@php($counter++)
|
||||
|
||||
@endforeach
|
||||
</div>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="text-left mt-3">
|
||||
<button type="submit" class="btn btn-secondary">{{ __('wählen und weiter zur Kasse') }}</button>
|
||||
<br><br>
|
||||
<em class="small text-center"> <i class="fa fa-lock"></i> Sie werden auf unseren checkout Server weitergeletet, die Verbindung ist mit SSL verschlüsselt.</em>
|
||||
</div>
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
</div>
|
||||
<div id="smartwizard-3-step-5" class="card animated fadeIn">
|
||||
<div class="card-body">
|
||||
<h4>Vielen Dank,</h4>
|
||||
<p>Deine Registrierung ist abgeschlossen!</p>
|
||||
<p>Sobald die Zahlung bei uns eingegangen ist, erhälst du automatisch eine E-Mail und dein Account wird freigeschaltet.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<link rel="stylesheet" href="{{ mix('/vendor/libs/smartwizard/smartwizard.css') }}">
|
||||
<script src="{{ mix('/vendor/libs/smartwizard/smartwizard.js') }}"></script>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
|
||||
$('.smartwizard-register').smartWizard({
|
||||
autoAdjustHeight: true,
|
||||
backButtonSupport: true,
|
||||
useURLhash: false,
|
||||
showStepURLhash: false,
|
||||
selected: '{{$step}}',
|
||||
toolbarSettings: {
|
||||
showNextButton: false,
|
||||
showPreviousButton: false,
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
@endsection
|
||||
Loading…
Add table
Add a link
Reference in a new issue