#10 Promotion Modul, Kommentar 2
This commit is contained in:
parent
f0da981737
commit
c9e1545693
128 changed files with 8194 additions and 637 deletions
158
resources/views/web/promotion/index.blade.php
Executable file
158
resources/views/web/promotion/index.blade.php
Executable file
|
|
@ -0,0 +1,158 @@
|
|||
@extends('web.layouts.layout')
|
||||
|
||||
@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
|
||||
|
||||
|
||||
{!! Form::open(['url' => route('web_promotion_store', $promotion_user->id), 'class' => 'form-horizontal form-prevent-multiple-submits', 'id' => 'user-promotion-form-validations']) !!}
|
||||
<div class="layout-content">
|
||||
@include('web.promotion._intro')
|
||||
|
||||
<div class="container px-3">
|
||||
@include('web.promotion._free_product')
|
||||
|
||||
@include('web.promotion._shop_products')
|
||||
|
||||
@include('web.promotion._shipping')
|
||||
|
||||
@include('web.promotion._fairplay')
|
||||
|
||||
@include('web.promotion._promotion_cart')
|
||||
|
||||
<section>
|
||||
<div class="row">
|
||||
<div class="col-lg-8 col-md-7">
|
||||
@include('web.promotion._invoice_details')
|
||||
|
||||
</div>
|
||||
<div class="col-lg-4 col-md-5">
|
||||
@include('web.promotion._checkout')
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
{!! Form::close() !!}
|
||||
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
|
||||
var validator = $("#user-promotion-form-validations").validate({
|
||||
submitHandler: function(form) {
|
||||
$('.button-prevent-multiple-submits').attr('disabled', true);
|
||||
$('.button-prevent-multiple-submits').find('.spinner').show();
|
||||
form.submit();
|
||||
},
|
||||
errorPlacement: function errorPlacement(error, element) {
|
||||
console.log(error);
|
||||
var placement = $(element).data('error');
|
||||
if (placement) {
|
||||
$(placement).append(error.addClass('invalid-feedback d-block'));
|
||||
} else {
|
||||
error.insertAfter(element).addClass('invalid-feedback small d-block');
|
||||
}
|
||||
},
|
||||
highlight: function( element, errorClass, validClass ) {
|
||||
if($(element).hasClass('selectpicker')){
|
||||
$(element).parent('.form-control').find('.dropdown-toggle').addClass( errorClass ).removeClass( validClass );
|
||||
}else if ( element.type === "radio" ) {
|
||||
this.findByName( element.name ).addClass( errorClass ).removeClass( validClass );
|
||||
} else {
|
||||
$( element ).addClass( errorClass ).removeClass( validClass );
|
||||
}
|
||||
},
|
||||
unhighlight: function( element, errorClass, validClass ) {
|
||||
if($(element).hasClass('selectpicker')){
|
||||
$(element).parent('.form-control').find('.dropdown-toggle').removeClass( errorClass ).addClass( validClass );
|
||||
} else if ( element.type === "radio" ) {
|
||||
this.findByName( element.name ).removeClass( errorClass ).addClass( validClass );
|
||||
} else {
|
||||
$( element ).removeClass( errorClass ).addClass( validClass );
|
||||
}
|
||||
},
|
||||
messages: {
|
||||
user_free_product: {
|
||||
required: "Bitte ein Produkt auswählen.",
|
||||
},
|
||||
switchers_shipping: {
|
||||
required: "Bitte eine Auswahl treffen.",
|
||||
},
|
||||
payment_method: {
|
||||
required: "Bitte eine Zahlungsart auswählen.",
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
$('select.revalidat').on('change', function () {
|
||||
validator.element($(this));
|
||||
});
|
||||
|
||||
$('.switcher-holder').on('click', function() {
|
||||
$(this).find('.switcher-input').prop('checked', true);
|
||||
});
|
||||
|
||||
var swiper = new Swiper(".mySwiper", {
|
||||
slidesPerView: 1,
|
||||
spaceBetween: 10,
|
||||
pagination: {
|
||||
el: ".swiper-pagination",
|
||||
clickable: true,
|
||||
},
|
||||
navigation: {
|
||||
nextEl: ".swiper-button-next",
|
||||
prevEl: ".swiper-button-prev",
|
||||
},
|
||||
breakpoints: {
|
||||
576: {
|
||||
slidesPerView: 1,
|
||||
spaceBetween: 10,
|
||||
},
|
||||
768: {
|
||||
slidesPerView: 2,
|
||||
spaceBetween: 20,
|
||||
},
|
||||
992: {
|
||||
slidesPerView: 3,
|
||||
spaceBetween: 20,
|
||||
},
|
||||
1200: {
|
||||
slidesPerView: 3,
|
||||
spaceBetween: 20,
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
// Shipping Address show|hide
|
||||
$("#shipping_address_switch").bind("change", function() {
|
||||
$('#shipping_address').slideToggle(200, function() {
|
||||
if ($('#shipping_address').is(":visible")) {
|
||||
_scrollTo('#shipping_address', 60);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
if ($('#shipping_address_switch').is(':checked')) {
|
||||
$('#shipping_address').show();
|
||||
} else {
|
||||
$('#shipping_address').hide();
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
@endsection
|
||||
Loading…
Add table
Add a link
Reference in a new issue