mivita/resources/views/user/components/user_shop_register.blade.php
2019-01-04 18:46:48 +01:00

68 lines
3 KiB
PHP

<div class="card-body" style="background: #fff; border: 1px solid rgba(24, 28, 33, 0.06);">
<h4>{{ __('open your shop') }}</h4>
{!! Form::open(['url' => route('user_shop_register_form'), 'class' => 'form-horizontal' , 'id'=>'data-shop-form-validations']) !!}
@php
$shop_name_btn_color = 'btn-secondary';
$shop_name_fa = '';
$shop_name_form_control = '';
@endphp
@if(Session::has('shop-name-error'))
@if(Session::get('shop-name-error') == 'check')
@php
$shop_name_btn_color = 'btn-success';
$shop_name_fa = 'fa-check';
$shop_name_form_control = ' is-valid';
@endphp
@endif
@if(Session::get('shop-name-error') == 'error')
@php
$shop_name_btn_color = 'btn-danger';
$shop_name_fa = 'fa-times';
$shop_name_form_control = ' is-invalid';
@endphp
@endif
@endif
<div class="form-group">
<label class="form-label" for="shop_name">{{ __('Choose Your Shop Name') }}</label><br>
<div class="input-group mt-2 mb-2 ">
{{ Form::text('user_shop_name', old('user_shop_name'), array('placeholder'=>__('Your Shop Name'), 'class'=>'form-control'.$shop_name_form_control.($errors->has('user_shop_name') ? ' is-invalid' : ''), 'id'=>'user_shop_name', 'tabindex' => 2)) }}
<span class="input-group-append">
<button class="btn {{ $shop_name_btn_color }}" type="submit" name="shop_submit" value="check"><i class="fa {{ $shop_name_fa }}"></i> prüfen!</button>
</span>
</div>
@if ($errors->has('user_shop_name'))
<span class="invalid-feedback" style="display: inline-block;">
<strong>{{ $errors->first('user_shop_name') }}</strong>
</span>
@endif
<p class="mt-2">{{__('shop_name_description')}}</p>
</div>
<hr>
<div class="form-group">
<label class="custom-control custom-checkbox m-0">
<input type="checkbox" class="custom-control-input {{ $errors->has('user_shop_active') ? 'is-invalid' : '' }}" name="user_shop_active" id="user_shop_active" tabindex = "1">
<span class="custom-control-label">{!! __('Declaration of shop') !!}
<button type="button" class="btn btn-outline-primary btn-sm update_modal_data_load" data-url="{{ route('loading_modal') }}" data-data="shop_term_of_use" data-target="#modal-loading">{{__('Terms of Use')}}</button>
</span>
</label>
@if ($errors->has('user_shop_active'))
<span class="invalid-feedback" style="display: inline-block;">
<strong>{{ $errors->first('user_shop_active') }}</strong>
</span>
@endif
</div>
<hr>
<div class="text-left mt-3">
<button type="submit" class="btn btn-secondary" name="shop_submit" value="action">{{__('save and continue') }}</button>&nbsp;
</div>
{!! Form::close() !!}
</div>