DHL Modul v0.5 Shipping Label ok
This commit is contained in:
parent
480fdc65ed
commit
8fdaa0ba1d
122 changed files with 17938 additions and 2239 deletions
|
|
@ -70,6 +70,17 @@
|
|||
</div>
|
||||
</li>
|
||||
<li class="list-group-item d-flex justify-content-between align-items-center">
|
||||
<div class="text-muted">{{ __('Status') }}</div>
|
||||
<div class="text-right">
|
||||
@if($user->shop->getSubdomainAvailable())
|
||||
<span class="badge badge-pill badge-success"><i class="fa fa-check"> {{ __('shop.available') }} </i> </span>
|
||||
@else
|
||||
<span class="badge badge-pill badge-danger"><i class="fa fa-times"> {{ __('shop.not_available') }} </i> </span>
|
||||
@endif
|
||||
</div>
|
||||
</li>
|
||||
|
||||
{{-- <li class="list-group-item d-flex justify-content-between align-items-center">
|
||||
<div class="text-muted">{{ __('Status') }}</div>
|
||||
<div class="text-right">
|
||||
@if($user->shop->getSubdomainStatus())
|
||||
|
|
@ -94,17 +105,13 @@
|
|||
@endif
|
||||
|
||||
</div>
|
||||
</li> --}}
|
||||
<li class="list-group-item d-flex justify-content-between align-items-center">
|
||||
<div class="text-muted">{{ __('shop.active_since') }}</div>
|
||||
<div>
|
||||
<a href="{{ route('user_shop_name_edit') }}" class="btn btn-xs btn-outline-primary"><i class="fa fa-edit"></i> Shop Name anpassen</a>
|
||||
</div>
|
||||
</li>
|
||||
@if(!$user->shop->getSubdomainStatus() || !$user->shop->getSubdomainAvailable() || !$user->shop->getSubdomainSslSinActive())
|
||||
<li class="list-group-item d-flex justify-content-between align-items-center">
|
||||
<p class="text-danger">{{ __('shop.not_available_copy') }}
|
||||
<a href="" class="btn icon-btn btn-xs btn-outline-primary">
|
||||
<span class="lnr lnr-redo"></span>
|
||||
</a>
|
||||
</p>
|
||||
|
||||
</li>
|
||||
@endif
|
||||
<li class="list-group-item d-flex justify-content-between align-items-center">
|
||||
<div class="text-muted">{{ __('shop.active_since') }}</div>
|
||||
<div>
|
||||
|
|
|
|||
174
resources/views/user/components/user_shop_edit_name.blade.php
Normal file
174
resources/views/user/components/user_shop_edit_name.blade.php
Normal file
|
|
@ -0,0 +1,174 @@
|
|||
<div class="card-body" style="background: #fff; border: 1px solid rgba(24, 28, 33, 0.06);">
|
||||
<h4>{{ __('shop.edit_your_shop') }}</h4>
|
||||
|
||||
{!! Form::open(['action' => route('user_shop_register_form'), 'class' => 'form-horizontal' , 'id'=>'data-shop-form-validations']) !!}
|
||||
{{ Form::hidden('user_shop_id', $user_shop_id) }}
|
||||
|
||||
@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
|
||||
|
||||
|
||||
<p class="mt-2">
|
||||
{!! __('shop.open_copy_1') !!}
|
||||
<br><br>
|
||||
{!! __('shop.open_copy_2') !!}
|
||||
<br><br>
|
||||
<strong>{{ __('shop.open_note_hl') }}</strong><br>
|
||||
{!! __('shop.open_note_1') !!}
|
||||
<hr>
|
||||
<span class="badge badge-pill badge-primary">{{ __('shop.your_current_shop_name') }}</span> <strong><a href="{{ $user_shop_domain }}" target="_blank">{{ $user_shop_domain }}</a></strong>
|
||||
</p>
|
||||
<div class="form-group">
|
||||
<div class="input-group mt-2 mb-2 ">
|
||||
{{ Form::text('user_shop_name', old('user_shop_name'), array('placeholder'=>__('shop.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> {{ __('shop.check') }}!</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
|
||||
</div>
|
||||
<div class="from-group mt-2 mb-2 ">
|
||||
{{ Form::text('preview_user_shop_name', '', array('placeholder'=>__('shop.preview_shop_internet_address'), 'class'=>'form-control', 'id'=>'preview_user_shop_name', 'readonly')) }}
|
||||
</div>
|
||||
<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">{!! __('shop.declaration_of_shop') !!}</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">{{__('shop.accept_and_change') }}</button>
|
||||
|
||||
</div>
|
||||
|
||||
{!! Form::close() !!}
|
||||
|
||||
</div>
|
||||
|
||||
<script type="application/javascript">
|
||||
|
||||
$( document ).ready(function() {
|
||||
|
||||
$.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
|
||||
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){
|
||||
$('#preview_user_shop_name').val(response.preview_user_shop_name);
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
message = response.errors.user_shop_name;
|
||||
$('#preview_user_shop_name').val('');
|
||||
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>
|
||||
|
|
@ -27,9 +27,9 @@
|
|||
|
||||
|
||||
<p class="mt-2">
|
||||
{{ __('shop.open_copy_1') }}
|
||||
{!! __('shop.open_copy_1') !!}
|
||||
<br><br>
|
||||
{{ __('shop.open_copy_2') }}
|
||||
{!! __('shop.open_copy_2') !!}
|
||||
<br><br>
|
||||
<strong>{{ __('shop.open_note_hl') }}</strong><br>
|
||||
{{ __('shop.open_note_1') }}
|
||||
|
|
|
|||
23
resources/views/user/shop_edit_name.blade.php
Normal file
23
resources/views/user/shop_edit_name.blade.php
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
@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">
|
||||
{{ __('navigation.my_shop') }}
|
||||
</h4>
|
||||
@include('user.components.user_shop_edit_name')
|
||||
@endsection
|
||||
Loading…
Add table
Add a link
Reference in a new issue