mivita/resources/views/web/templates/kontakt.blade.php
Kevin Adametz 4c944aa15d Spamschutz Kontakt + Registrierung: Turnstile, Rate-Limit, Honeypot; Passwort min. 8
- Kontaktformular: keine Mail mehr an die eingegebene Adresse (wurde als
  Spam-Versender missbraucht); Anfrage nur an Kontakt-Adresse + Berater (BCC),
  Reply-To = Absender; Eingaben in der Mail escaped
- Kontakt + Registrierung: Cloudflare Turnstile statt reCAPTCHA (Schluessel
  aus dem Code in die .env), Rate-Limits, Honeypot + Mindest-Ausfuellzeit,
  Namensregel (lateinische Schrift, max. 50 Zeichen), Form Requests
- Registrierung: Partner-Nummer nur fuer aktive Berater (vorher ungeprueft)
- CRM: POST /register abgeschaltet (legte ohne Captcha Benutzer an)
- Passwort-Mindestlaenge systemweit 8 Zeichen ueber Password::defaults()
- Log abgefangener Anfragen: storage/logs/form-spam-*.log
- Doku und Protokoll: dev/2026-10-09-spam/README.md

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 08:22:02 +00:00

262 lines
No EOL
13 KiB
PHP

@extends($user_shop ?'web.user.layouts.layout' : 'web.layouts.layout')
@section('content')
<section class="page-header page-header-xlg parallax parallax-3"
style="background-image:url('assets/images/vision-min.jpg')">
<div class="overlay dark-1"><!-- dark overlay [1 to 9 opacity] --></div>
<div class="container">
</div>
</section>
<style type="text/css">
.tp-caption {
text-shadow: none;
}
div.shop-item {
margin-bottom: 30px;
border: 1px solid #ddd;
}
div.shop-item > .thumbnail, .thumbnail {
border: none;
}
div.shop-item-summary {
padding: 8px;
}
div.shop-item-summary h2 a {
color: #9aa983;
font-size: 1.2em;
margin: 0 0 10px 0;
}
div.shop-item-buttons {
padding: 0 8px 10px 8px;
}
div.shop-item-buttons .btn-xs {
padding: 4px;
}
img.avatar {
width: 75%;
max-width: 200px;
border: 6px solid #bbccab;
margin-bottom: 10px;
}
.checkbox {
font-size: 14px;
line-height: 1.3em;
}
.checkbox i {
top:1px;
}
.radio {
font-size: 14px;
line-height: 2em;
}
.alert.error {
padding: 8px;
margin-bottom: 4px;
margin-top: 4px;
font-size: 0.9em;
font-weight: bold;
}
select.form-control:not([size]):not([multiple]) {
height: 40px;
}
.checkbox.error, .radio.error{
color:#b92c28 !important;
}
</style>
<!-- /PAGE HEADER -->
<script src="https://challenges.cloudflare.com/turnstile/v0/api.js" async defer></script>
<!-- -->
<section>
<div class="container">
<div class="row">
<!-- FORM -->
<div class="col-md-9 col-sm-8">
<h1>{{ __('website.contact_hl') }}</h1>
<p>{{ __('website.contact_subl') }}</p>
<div class="box-static box-transparent box-bordered padding-20">
{!! Form::open(['action' => '/kontakt']) !!}
{{ html()->hidden(\App\Services\FormSpamGuard::TIMESTAMP_FIELD, $form_token) }}
<div style="position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden;" aria-hidden="true">
<label for="{{ \App\Services\FormSpamGuard::HONEYPOT_FIELD }}">{{ __('form_protection.honeypot_label') }}</label>
{{ html()->text(\App\Services\FormSpamGuard::HONEYPOT_FIELD)->attributes(['tabindex' => '-1', 'autocomplete' => 'off']) }}
</div>
<div class="text-right" style="margin-bottom: 8px; margin-top: -16px;">
<em class="small">* {{trans('register.required_fields')}}</em>
</div>
<div class="row contact-row">
<div class="form-group col-md-12">
{!! Form::label('first_name', __('Salutation').'*') !!}
{!! Form::select('salutation', [''=>__('please select'), 'mr'=>__('MR'), 'ms'=>__('MS')], '', ['class' => 'form-control '.($errors->has('salutation') ? 'error is-invalid' : '')]) !!}
@if ($errors->has('salutation'))
<div class="alert alert-danger error"><!-- DANGER -->
{{ $errors->first('salutation') }}
</div>
@endif
</div>
<div class="form-group col-md-6">
{!! Form::label('first_name', __('First name').'*') !!}
{!! Form::text('first_name', '', ['class' => 'form-control '.($errors->has('first_name') ? 'error is-invalid' : ''), 'placeholder'=>__('First name'), '']) !!}
@if ($errors->has('first_name'))
<div class="alert alert-danger error"><!-- DANGER -->
{{ $errors->first('first_name') }}
</div>
@endif
</div>
<div class="form-group col-md-6">
{!! Form::label('last_name', __('Last name').'*') !!}
{!! Form::text('last_name', '', ['class' => 'form-control '.($errors->has('last_name') ? 'error is-invalid' : ''), 'placeholder'=>__('Last name'), '']) !!}
@if ($errors->has('last_name'))
<div class="alert alert-danger error"><!-- DANGER -->
{{ $errors->first('last_name') }}
</div>
@endif
</div>
<div class="form-group col-md-12">
{!! Form::label('email', __('E-Mail Address').'*') !!}
{!! Form::email('email', '', ['class' => 'form-control '.($errors->has('email') ? 'error is-invalid' : ''), 'placeholder'=>__('E-Mail Address'), '']) !!}
@if ($errors->has('email'))
<div class="alert alert-danger error"><!-- DANGER -->
{{ $errors->first('email') }}
</div>
@endif
</div>
<div class="form-group col-md-12">
{!! Form::label('phone', __('Phone')) !!}
{!! Form::text('phone', null, ['class' => 'form-control '.($errors->has('phone') ? 'error is-invalid' : ''), 'placeholder'=>__('Phone')]) !!}
@if ($errors->has('phone'))
<div class="alert alert-danger error"><!-- DANGER -->
{{ $errors->first('phone') }}
</div>
@endif
</div>
</div>
<div class="row contact-row">
<div class="col-md-12">
<div class="form-group">
{!! Form::label('message', __('Nachricht*')) !!}
{!! Form::textarea('message', null, ['class' => 'form-control '.($errors->has('message') ? 'error is-invalid' : ''), 'placeholder'=>__('website.your_message_to_us')]) !!}
@if ($errors->has('message'))
<div class="alert alert-danger error"><!-- DANGER -->
{{ $errors->first('message') }}
</div>
@endif
</div>
</div>
@if(!$user_shop || $user_shop->id === 22)
<div class="col-md-12">
<div class="form-group mb-0">
{!! Form::label('sales_partnership', __('website.your_enquiry_relate_partnership')) !!}
</div>
</div>
<div class="col-md-12">
<div class="form-group my-0">
<label class="radio {{ ($errors->has('sales_partnership') ? 'error' : '') }}">
{!! Form::radio('sales_partnership', 'JA', '', ['class'=> 'form-control']) !!}
<i></i> {{ __('website.yes') }}
</label>
</div>
</div>
<div class="col-md-12">
<div class="form-group my-0">
<label class="radio {{ ($errors->has('sales_partnership') ? 'error' : '') }}">
{!! Form::radio('sales_partnership', 'NEIN', '', ['class'=> 'form-control']) !!}
<i></i> {{ __('website.no') }}
</label>
@if ($errors->has('sales_partnership'))
<div class="alert alert-danger error"><!-- DANGER -->
{{ $errors->first('sales_partnership') }}
</div>
@endif
</div>
</div>
<div class="col-md-12" id="show_sales_partnership_message" @if(old('sales_partnership') !== 'JA') style="display: none;" @endif>
<hr class="my-3">
<p class="mb-3">{{ __('website.through_whom_label') }}</p>
<div class="form-group">
{!! Form::textarea('sales_partnership_message', null, ['class' => 'form-control '.($errors->has('sales_partnership_message') ? 'error is-invalid' : ''), 'placeholder'=>__('website.through_whom_placeholder'), 'rows'=>4]) !!}
@if ($errors->has('sales_partnership_message'))
<div class="alert alert-danger error"><!-- DANGER -->
{{ $errors->first('sales_partnership_message') }}
</div>
@endif
</div>
</div>
@endif
<div class="col-md-12">
<hr>
</div>
<div class="col-md-12" style="margin-bottom: 8px; margin-top: 8px;">
<label class="checkbox {{ ($errors->has('accepted_data_protection') ? 'error' : '') }}" for="accepted_data_protection">
{!! Form::checkbox('accepted_data_protection', 1, false, ['id'=>'accepted_data_protection', 'class' => 'form-control '.($errors->has('accepted_data_protection') ? 'error' : ''), '']) !!}
<i></i> <span class="fa fa-angle-double-left text-success fa-lg"></span>
{!! trans('register.reg_checked', ['link' => url('datenschutz')]) !!}
.*
</label>
@if ($errors->has('accepted_data_protection'))
<div class="alert alert-danger error"><!-- DANGER -->
{{ $errors->first('accepted_data_protection') }}
</div>
@endif
</div>
</div>
<div class="row contact-row">
<div class="col-md-12">
<div class="cf-turnstile" data-sitekey="{{ $turnstile_site_key }}" data-action="contact" data-language="{{ app()->getLocale() }}"></div>
@if ($errors->has('cf-turnstile-response'))
<div class="alert alert-danger error"><!-- DANGER -->
{{ $errors->first('cf-turnstile-response') }}
</div>
@endif
</div>
</div>
<button type="submit" class="btn btn-primary btn-text-500"><i class="fa fa-check"></i> {{ __('website.send_message') }} </button>
{!! Form::close() !!}
</div> <!-- end col -->
<!-- /FORM -->
</div>
<!-- INFO -->
@include('web.templates._side_contact')
</div>
</div>
</section>
<!-- / -->
@endsection
@section('scripts')
@if(!$user_shop || $user_shop->id === 22)
<script>
$(document).ready(function () {
$('input[type=radio][name=sales_partnership]').change(function() {
if (this.value == 'JA') {
$('#show_sales_partnership_message').show('slow');
}
else if (this.value == 'NEIN') {
$('#show_sales_partnership_message').hide('slow');
}
});
});
</script>
@endif
@endsection