01 2022 Microsite Promotion

This commit is contained in:
Kevin Adametz 2022-01-18 18:30:14 +01:00
parent 3f1fb9377d
commit 38e7fd504a
39 changed files with 761 additions and 336 deletions

View file

@ -1,5 +1,35 @@
<h2 class="mt-3">Rechnungsdetails</h2>
<div class="row">
<div class="col-12">
<div class="form-group">
<label class="switcher switcher-success">
{!! Form::checkbox('is_invoice_details_private', 1, true, ['id' => 'switch_invoice_details_private', 'class' => 'switcher-input']) !!}
<span class="switcher-indicator">
<span class="switcher-yes">
<span class="ion ion-md-checkmark"></span>
</span>
<span class="switcher-no">
</span>
</span>
<span class="switcher-label">Privat (keine Firma)</span>
</label>
</div>
</div>
<div class="col-12">
<div class="form-group">
<label class="switcher switcher-success">
{!! Form::checkbox('is_invoice_details_germany', 1, (Yard::instance('shopping')->getShippingCountryId() == 1 ? true : false), ['id' => 'switch_invoice_details_germany', 'class' => 'switcher-input']) !!}
<span class="switcher-indicator">
<span class="switcher-yes">
<span class="ion ion-md-checkmark"></span>
</span>
<span class="switcher-no">
</span>
</span>
<span class="switcher-label">aus Deutschland</span>
</label>
</div>
</div>
<div class="col-12">
<div class="form-group {{ $errors->has('billing_salutation') ? 'error' : '' }}">
<label for="billing_salutation">Anrede <span class="required">*</span></label>
@ -34,18 +64,18 @@
@endif
</div>
</div>
<div class="col-12">
<div class="col-12 not-show show_invoice_details_private">
<div class="form-group">
<label for="billing_company">Firmenname (optional)</label>
{!! Form::text('billing_company', '', ['class' => 'form-control', 'id' => 'billing_company']) !!}
</div>
</div>
<div class="col-12">
<div class="col-12 not-show show_invoice_details_germany">
<div class="form-group">
<label for="billing_state">Land / Region <span class="required">*</span></label>
<select id="billing_state" name="billing_state" class="form-control selectpicker"
data-style="btn-default" required>
{!! HTMLHelper::getCountriesForShipping(1) !!}
data-style="btn-default">
{!! HTMLHelper::getCountriesForShipping(Yard::instance('shopping')->getShippingCountryId(), false, 2) !!}
</select>
</div>
</div>
@ -62,7 +92,7 @@
</div>
<div class="col-12">
<div class="form-group">
{!! Form::text('billing_address_2', '', ['placeholder' => 'Wohnung, Suite, Zimmer usw. (optional)', 'class' => 'form-control ' . ($errors->has('billing_address_2') ? 'error' : ''), 'id' => 'billing_address_2']) !!}
{!! Form::text('billing_address_2', '', ['placeholder' => 'Zusätzliche Angaben / Hinweise (optional)', 'class' => 'form-control ' . ($errors->has('billing_address_2') ? 'error' : ''), 'id' => 'billing_address_2']) !!}
@if ($errors->has('billing_address_2'))
<label for="billing_address_2" class="error text-danger small"
style="display: block;">{{ $errors->first('billing_address_2') }}</label>
@ -89,16 +119,6 @@
@endif
</div>
</div>
<div class="col-12">
<div class="form-group">
<label for="billing_phone">Telefon (optional)</label>
{!! Form::text('billing_phone', '', ['class' => 'form-control ' . ($errors->has('billing_phone') ? 'error' : ''), 'id' => 'billing_phone']) !!}
@if ($errors->has('billing_phone'))
<label for="billing_phone" class="error text-danger small"
style="display: block;">{{ $errors->first('billing_phone') }}</label>
@endif
</div>
</div>
<div class="col-12">
<div class="form-group">
<label for="billing_email">E-Mail <span class="required">*</span></label>
@ -167,18 +187,18 @@
@endif
</div>
</div>
<div class="col-12">
<div class="col-12 not-show show_invoice_details_private">
<div class="form-group">
<label for="shipping_company">Firmenname (optional)</label>
{!! Form::text('shipping_company', '', ['class' => 'form-control', 'id' => 'shipping_company']) !!}
</div>
</div>
<div class="col-12">
<div class="col-12 not-show show_invoice_details_germany">
<div class="form-group">
<label for="shipping_state">Land / Region <span class="required">*</span></label>
<select id="shipping_state" name="shipping_state" class="form-control selectpicker"
data-style="btn-default" required>
{!! HTMLHelper::getCountriesForShipping(1) !!}
data-style="btn-default">
{!! HTMLHelper::getCountriesForShipping(Yard::instance('shopping')->getShippingCountryId(), false, 2) !!}
</select>
</div>
</div>
@ -195,7 +215,7 @@
</div>
<div class="col-12">
<div class="form-group">
{!! Form::text('shipping_address_2', '', ['placeholder' => 'Wohnung, Suite, Zimmer usw. (optional)', 'class' => 'form-control ' . ($errors->has('shipping_address_2') ? 'error' : ''), 'id' => 'shipping_address_2']) !!}
{!! Form::text('shipping_address_2', '', ['placeholder' => 'Zusätzliche Angaben / Hinweise (optional)', 'class' => 'form-control ' . ($errors->has('shipping_address_2') ? 'error' : ''), 'id' => 'shipping_address_2']) !!}
@if ($errors->has('shipping_address_2'))
<label for="shipping_address_2" class="error text-danger small"
style="display: block;">{{ $errors->first('shipping_address_2') }}</label>
@ -222,16 +242,6 @@
@endif
</div>
</div>
<div class="col-12">
<div class="form-group">
<label for="shipping_phone">Telefon (optional)</label>
{!! Form::text('shipping_phone', '', ['class' => 'form-control ' . ($errors->has('shipping_phone') ? 'error' : ''), 'id' => 'shipping_phone']) !!}
@if ($errors->has('shipping_phone'))
<label for="shipping_phone" class="error text-danger small"
style="display: block;">{{ $errors->first('shipping_phone') }}</label>
@endif
</div>
</div>
</div>
<script>
@ -289,8 +299,24 @@
validator.element($(this));
});
function switch_invoice_details_germany(){
if($('input#switch_invoice_details_germany').is(':checked')){
$('.show_invoice_details_germany').hide('slow');
}else{
$('.show_invoice_details_germany').show('slow');
}
}
switch_invoice_details_germany();
$('input#switch_invoice_details_private').on('change', function () {
if($(this).is(':checked')){
$('.show_invoice_details_private').hide('slow');
}else{
$('.show_invoice_details_private').show('slow');
}
});
$('input#switch_invoice_details_germany').on('change', function () {
switch_invoice_details_germany();
});
// Shipping Address show|hide
$("#shipping_address_switch").bind("change", function() {