File: D:/HostingSpaces/fire-tech/fire-tech.nl/resources/views/site/pages/subscribe.blade.php
@extends('site.master', ['view' => 'default'])
@section('title', $page->translation->meta_title)
@section('meta_description', $page->translation->meta_description)
@section('content')
<section class="dynamic-content">
<div class="grid-row">
@include('site.partials.dynamic.dynamicBlocks', [ 'dynamicContent' => $page->translation->description ])
@if(\Session::has('sent'))
<div class="content kms-content">
<h3>Bedankt voor uw inschrijving</h3>
{{--<h4 style="color: #373c41;">Wij nemen zo snel mogelijk contact met u op.</h4>--}}
</div>
@else
@if($errors->any())
<ul class="c-form-feedback" style="line-height: 1.4" data-feedback="@lang('site/contact.feedback_message')">
@foreach($errors->all() as $error)
<li>
{{ $error }}
</li>
@endforeach
</ul>
@endif
<div class="content kms-content">
<h3>Inschrijven</h3>
@if( empty($subscribe_step) )
<form class="form" method="post">
{{csrf_field()}}
<input type="hidden" name="step" value="1">
{{-- show courses --}}
@foreach($courses as $course)
<label class="radio"><input type="radio"
name="courseId"
{{ old('course') == $course->id ? 'checked' : '' }}
value="{{$course->id}}"/>
<h5>{{$course->translation->name}}</h5>
</label><br/>
@endforeach
<input type="submit" value="Naar stap 2">
</form>
stap 1
@elseif( $subscribe_step == '1' )
@if(count($dates) > 0)
<form class="form" method="post">
<h5>{{$course->translation->name}}</h5>
@if(is_numeric($course->price))
<p>De kosten hiervoor bedragen € {{number_format($course->price, 2, ',', '.')}} excl. BTW.</p>
@elseif(!empty($course->price))
<p>{{$course->price}}</p>
@endif
{{-- @if(isset($course->extra_costs) && !empty($course->extra_costs))--}}
{{-- @if(is_numeric($course->extra_costs))--}}
{{-- <p style="font-style: italic">Voor de CCV punten (code 95) zijn de extra kosten € {{number_format($course->extra_costs, 2, ',', '.')}} excl. BTW.</p>--}}
{{-- @else--}}
{{-- <p>Extra kosten: {{$course->extra_costs}}</p>--}}
{{-- @endif--}}
{{-- @endif--}}
<br/>
{{csrf_field()}}
<input type="hidden" name="step" value="2">
<input type="hidden" name="courseId" value="{{$course->id}}">
<div class="dates form-element ">
<p><strong>Cursusdata:</strong></p>
<span class="error-message {{($errors->has('date')? 'active' :'')}}">{{ucfirst($errors->first('date'))}}</span>
@foreach($dates as $date)
@if(\Carbon\Carbon::parse($date['dateA'])->isFuture())
<label class="radio {{ $date['full'] ? 'disabled' : '' }}">
<input
type="radio"
name="date"
{{ old('date') == $date['dateA'] ? 'checked' : '' }}
{{ $date['full'] ? 'disabled' : '' }}
value="{{$date['dateA']}} {{ $date['remark'] ? ' | '.$date['remark'] : '' }} @if(!empty($date['dateB']))<br/>{{$date['dateB']}} @endif">
<h5>{{$date['dateA']}} {{ $date['remark'] ? ' | '.$date['remark'] : '' }}
@if(!empty($date['dateB']))<br/>{{$date['dateB']}} {{ $date['remarkB'] ? ' | '.$date['remarkB'] : '' }} @endif
</h5>
</label>
{{ $date['full'] ? 'vol' : '' }}
<br/>
@endif
@endforeach
</div>
<p>Bel of mail ons voor eventuele andere cursusdata!</p>
<input type="submit" value="Naar stap 3">
</form>
@else
<div class="content kms-content form">
<p><strong>Cursusdata</strong></p>
<p>Er zijn op dit moment geen data beschikbaar voor deze opleiding</p>
</div>
@endif
@elseif( $subscribe_step == '2' )
<form class="form" method="post" action="{{route('subscribe')}}">
<h5>{{$course->translation->name}} op <br/> {!! $date !!}</h5>
@if(is_numeric($course->price))
<p>De kosten hiervoor bedragen € {{number_format($course->price, 2, ',', '.')}} excl. BTW.</p>
@else
<p>{{$course->price}}</p>
@endif
{{-- @if(isset($course->extra_costs) && !empty($course->extra_costs))--}}
{{-- @if(is_numeric($course->extra_costs))--}}
{{-- <p style="font-style: italic">Voor de CCV punten (code 95) zijn de extra kosten € {{number_format($course->extra_costs, 2, ',', '.')}} excl. BTW.</p>--}}
{{-- @else--}}
{{-- <p style="font-style: italic">Voor de CCV punten (code 95) zijn de extra kosten € {{$course->extra_costs}} excl. BTW.</p>--}}
{{-- @endif--}}
{{-- @endif--}}
<br/>
{{csrf_field()}}
<input type="hidden" name="step" value="2">
<input type="hidden" name="courseId" value="{{$course->id}}">
<input type="hidden" name="date" value="{{$date}}">
{{-- show form --}}
@if(count($errors) > 0)
<h4 class="error-message active" style="font-size: 1rem;">Het formulier is foutief of
onvolledig ingevuld.<br>Controleer uw gegevens en probeer het opnieuw.</h4>
@endif
<p><strong>Uw bedrijfsinformatie:</strong></p>
<div class="company form-element ">
<span class="error-message {{($errors->has('company')? 'active' :'')}}">{{ucfirst($errors->first('company'))}}</span>
<label for="company">@lang('site/form.company.label')</label>
<input type="text" id="company" name="company"
placeholder="@lang('site/form.company.placeholder')"
value="{{ old('company') }}"/>
</div>
<div class="company_email form-element ">
<span class="error-message {{($errors->has('email')? 'active' :'')}}">{{ucfirst($errors->first('email'))}}</span>
<label for="email">@lang('site/form.company_email.label')</label>
<input type="text" id="email" name="email"
placeholder="@lang('site/form.company_email.placeholder')"
value="{{ old('email') }}"/>
</div>
<div class="company_street form-element ">
<span class="error-message {{($errors->has('street')? 'active' :'')}}">{{ucfirst($errors->first('street'))}}</span>
<label for="street">@lang('site/form.company_street.label')</label>
<input type="text" id="street" name="street"
placeholder="@lang('site/form.company_street.placeholder')"
value="{{ old('street') }}"/>
</div>
<div class="company_housenumber form-element ">
<span class="error-message {{($errors->has('housenumber')? 'active' :'')}}">{{ucfirst($errors->first('housenumber'))}}</span>
<label for="housenumber">@lang('site/form.company_housenumber.label')</label>
<input type="text" id="housenumber" name="housenumber"
placeholder="@lang('site/form.company_housenumber.placeholder')"
value="{{ old('housenumber') }}"/>
</div>
<div class="company_postal_code form-element ">
<span class="error-message {{($errors->has('postal_code')? 'active' :'')}}">{{ucfirst($errors->first('postal_code'))}}</span>
<label for="city">@lang('site/form.company_postal_code.label')</label>
<input type="text" id="postal_code" name="postal_code"
placeholder="@lang('site/form.company_postal_code.placeholder')"
value="{{ old('postal_code') }}"/>
</div>
<div class="company_city form-element ">
<span class="error-message {{($errors->has('city')? 'active' :'')}}">{{ucfirst($errors->first('city'))}}</span>
<label for="city">@lang('site/form.company_city.label')</label>
<input type="text" id="city" name="city"
placeholder="@lang('site/form.company_city.placeholder')"
value="{{ old('city') }}"/>
</div>
{{--<div class="company_country form-element ">--}}
{{--<span class="error-message {{($errors->has('country')? 'active' :'')}}">{{ucfirst($errors->first('country'))}}</span>--}}
{{--<label for="country">@lang('site/form.company_country.label')</label>--}}
{{--<input type="text" id="country" name="country"--}}
{{--placeholder="@lang('site/form.company_country.placeholder')"--}}
{{--value="{{ old('country') }}"/>--}}
{{--</div>--}}
<div class="company_phone form-element ">
<span class="error-message {{($errors->has('phone')? 'active' :'')}}">{{ucfirst($errors->first('phone'))}}</span>
<label for="phone">@lang('site/form.company_phone.label')</label>
<input type="text" id="phone" name="phone"
placeholder="@lang('site/form.company_phone.placeholder')"
value="{{ old('phone') }}"/>
</div>
{{-- <div class="code95 form-element ">--}}
{{-- <span class="error-message {{($errors->has('code95')? 'active' :'')}}">{{ucfirst($errors->first('code95'))}}</span>--}}
{{-- <div class="genders">--}}
{{-- <label for="code95">@lang('site/form.code95.label')</label>--}}
{{-- <input id="code95_ja" name="code95" type="radio"--}}
{{-- value="1" {{ old('code95') == 1 ? 'checked' : '' }}/>--}}
{{-- <label for="code95_ja" class="radioLabelSpan">Ja</label>--}}
{{-- <input id="code95_nee" name="code95" type="radio"--}}
{{-- value="0" {{ !old('code95') == 0 ? 'checked' : '' }} />--}}
{{-- <label for="code95_nee" class="radioLabelSpan">Nee</label>--}}
{{-- </div>--}}
{{-- </div>--}}
<div class="course_legal form-element ">
<span class="error-message {{($errors->has('course_legal')? 'active' :'')}}">{{ucfirst($errors->first('course_legal'))}}</span>
<div class="genders">
<label for="code95">@lang('site/form.course_legal.label')</label>
<input id="course_legal" name="course_legal" type="hidden" value="0"/>
<input id="course_legal" name="course_legal" type="checkbox"
value="1" {{ old('course_legal') == 1 ? 'checked' : '' }}/>
<label for="course_legal" class="radioLabelSpan">Ik accepteer de <a
href="{{$links->course_legal->route}}">Cursusvoorwaarden</a></label>
</div>
</div>
<br/>
<p><strong>Deelnemers</strong></p>
@for($i = 0; $i < 30; $i++)
<div class="student form-element"
@if(empty(old('students.'.$i.'.name')) && $i >= 1) hidden @endif>
<span class="error-message {{($errors->has('students')? 'active' :'')}}">{{ucfirst($errors->first('students'))}}</span>
{{-- VCA opleidingen (VCA-Basis en VCA-VOL) --}}
{{-- https://app.asana.com/0/1208258625560451/1208268844280863/f --}}
@if($course->id === 15)
<div class="genders">
<label>Keuze</label>
<input id="vcabasis{{$i}}" name="students[{{$i}}][vca]" type="radio"
value="VCA-Basis" {{ old('students.'.$i.'.vca') == 'VCA-Basis' ? 'checked' : '' }}/>
<label for="vcabasis{{$i}}" class="radioLabelSpan">VCA-Basis</label>
<input id="vcavol{{$i}}" name="students[{{$i}}][vca]" type="radio"
value="VCA-Vol" {{ old('students.'.$i.'.vca') == 'VCA-Vol' ? 'checked' : '' }} />
<label for="vcavol{{$i}}" class="radioLabelSpan">VCA-Vol</label>
</div>
@endif
<div class="genders">
<label>Aanhef</label>
<input id="man{{$i}}" name="students[{{$i}}][gender]" type="radio"
value="man" {{ old('students.'.$i.'.gender') == 'man' ? 'checked' : '' }}/>
<label for="man{{$i}}" class="radioLabelSpan">Dhr.</label>
<input id="vrouw{{$i}}" name="students[{{$i}}][gender]" type="radio"
value="vrouw" {{ old('students.'.$i.'.gender') == 'vrouw' ? 'checked' : '' }} />
<label for="vrouw{{$i}}" class="radioLabelSpan">Mevr.</label>
</div>
<label>@lang('site/form.student_name.label')</label>
<input type="text"
class="student_name"
name="students[{{$i}}][name]"
placeholder="@lang('site/form.student_name.placeholder')"
value="{{ old('students.'.$i.'.name') }}"
/>
<label for="email">@lang('site/form.student_mail.label')</label>
<input type="text" id="email" name="students[{{$i}}][email]"
placeholder="@lang('site/form.student_mail.placeholder')"
value="{{ old('students.'.$i.'.email') }}"/>
<label>Geboortedatum</label>
<div class="birthdateInputs">
<input type="text" name="students[{{$i}}][birthday]" id="dag"
class="datum_geboorte" value="{{ old('students.'.$i.'.birthday') }}"
placeholder="dag" maxlength="2" size="2"/> -
<input type="text" name="students[{{$i}}][birthmonth]" id="maand"
class="datum_geboorte" value="{{ old('students.'.$i.'.birthmonth') }}"
placeholder="maand" maxlength="2" size="2"/> -
<input type="text" name="students[{{$i}}][birthyear]" id="jaar"
class="datum_geboorte" value="{{ old('students.'.$i.'.birthyear') }}"
placeholder="jaar" maxlength="4" size="4"/>
</div>
</div>
@endfor
<p class="add-student"><a href=""
onclick="CourseFormHandler.addStudent(); return false;"><span>+</span>Voeg
een deelnemer
toe</a></p><br/><br/>
<input type="submit" value="Inschrijven">
</form>
@endif
</div>
@endif
</div>
</section>
@include('site.partials.blocks.ctaRow', [
'ctaTrigger1' => (object)[
'title' => trans('site/global.ctaRow.title'),
'subTitle' => trans('site/global.ctaRow.subTitle'),
'button' => (object)[
'link' => "/".$links->contact->route,
'text' => trans('site/home.contactUs'),
],
],
'ctaPerson' => (object)[
'image' => '/img/contact-person.jpg',
'name' => 'Thijs Neeskens',
'text' => trans('site/global.ctaRow.phoneTitle'),
'button' => (object)[
'link' => 'tel:' . \Config::get('site.company.phone.call'),
'text' => \Config::get('site.company.phone.display')
]
],
])
@endsection