Refactor register inputs + add profil-verify form
This commit is contained in:
parent
e854f7557c
commit
145d5c8894
20 changed files with 491 additions and 328 deletions
38
views/auth/partials/form-address-info.blade.php
Normal file
38
views/auth/partials/form-address-info.blade.php
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
<fieldset class="mb-3">
|
||||
<legend class="text-center">{{ __('Vos coordonnées') }}</legend>
|
||||
|
||||
{{-- ADDRESS --}}
|
||||
<div class="row justify-content-center">
|
||||
<div class="{{ $colClasses }}">
|
||||
@include('theme::auth.partials.inputs.address', ['required' => true])
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{-- ADDRESS2 --}}
|
||||
<div class="row justify-content-center">
|
||||
<div class="{{ $colClasses }}">
|
||||
@include('theme::auth.partials.inputs.address2')
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{-- CITY --}}
|
||||
<div class="row justify-content-center">
|
||||
<div class="{{ $colClasses }}">
|
||||
@include('theme::auth.partials.inputs.city', ['required' => true])
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{-- POSTCODE --}}
|
||||
<div class="row justify-content-center">
|
||||
<div class="{{ $colClasses }}">
|
||||
@include('theme::auth.partials.inputs.postal_code', ['required' => true])
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{-- COUNTRY --}}
|
||||
<div class="row justify-content-center">
|
||||
<div class="{{ $colClasses }}">
|
||||
@include('theme::auth.partials.inputs.country', ['required' => true])
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
26
views/auth/partials/form-personal-info.blade.php
Normal file
26
views/auth/partials/form-personal-info.blade.php
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
<fieldset class="mb-3">
|
||||
<legend class="text-center">{{ __('Votre profil') }}</legend>
|
||||
|
||||
<div class="container-fluid">
|
||||
{{-- FIRST_NAME --}}
|
||||
<div class="row justify-content-center">
|
||||
<div class="{{ $colClasses }}">
|
||||
@include('theme::auth.partials.inputs.first_name', ['required' => true])
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{-- LAST NAME --}}
|
||||
<div class="row justify-content-center">
|
||||
<div class="{{ $colClasses }}">
|
||||
@include('theme::auth.partials.inputs.last_name', ['required' => true])
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{-- BIRTH_DATE --}}
|
||||
<div class="row justify-content-center">
|
||||
<div class="{{ $colClasses }}">
|
||||
@include('theme::auth.partials.inputs.birth_date', ['required' => true])
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
28
views/auth/partials/form-security-info.blade.php
Normal file
28
views/auth/partials/form-security-info.blade.php
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
<fieldset class="mb-3">
|
||||
<legend class="text-center">{{ __('Vos identifiants') }}</legend>
|
||||
|
||||
<div class="container-fluid">
|
||||
{{-- EMAIL --}}
|
||||
<div class="row justify-content-center">
|
||||
<div class="col col-md-10 col-lg-8 py-2">
|
||||
@include('theme::auth.partials.inputs.email', ['required' => true])
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{-- PASSWORD --}}
|
||||
<div class="row justify-content-center">
|
||||
<div class="col col-md-10 col-lg-8 input-group d-flex justify-content-center py-2">
|
||||
@include('theme::auth.partials.inputs.password', ['required' => true])
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{-- PASSWORD CONFIRMATION --}}
|
||||
<div class="row justify-content-center">
|
||||
<div class="col col-md-10 col-lg-8 input-group d-flex justify-content-center py-2">
|
||||
@include('theme::auth.partials.inputs.password_confirmation', ['required' => true])
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@include('theme::auth.password-min-strength')
|
||||
</div>
|
||||
</fieldset>
|
||||
18
views/auth/partials/inputs/address.blade.php
Normal file
18
views/auth/partials/inputs/address.blade.php
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
<div class="form-floating mb-3">
|
||||
<input id="address" name="address" type="text" value="{{ old('address', $crmCustomer->address ?? null) }}"
|
||||
placeholder="{{ __('Votre :attribute', [
|
||||
'attribute' => __('validation.attributes.line_address_1'),
|
||||
]) }}"
|
||||
@class([
|
||||
'form-control',
|
||||
'mx-auto',
|
||||
'is-invalid' => $errors->has('address'),
|
||||
]) autocomplete="address-line1" @readonly(!empty($readonly)) @disabled(!empty($disabled)) @required(!empty($required)) />
|
||||
<label for="address">{{ Str::ucfirst(__('validation.attributes.line_address_1')) }}@if (!empty($required))
|
||||
*
|
||||
@endif
|
||||
</label>
|
||||
@foreach ($errors->get('address') as $message)
|
||||
<div class="invalid-feedback">{{ $message }}</div>
|
||||
@endforeach
|
||||
</div>
|
||||
18
views/auth/partials/inputs/address2.blade.php
Normal file
18
views/auth/partials/inputs/address2.blade.php
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
<div class="form-floating mb-3">
|
||||
<input id="address2" name="address2" type="text" value="{{ old('address2', $crmCustomer->address2 ?? null) }}"
|
||||
placeholder="{{ __('Votre :attribute', [
|
||||
'attribute' => __('validation.attributes.line_address_2'),
|
||||
]) }}"
|
||||
@class([
|
||||
'form-control',
|
||||
'mx-auto',
|
||||
'is-invalid' => $errors->has('address2'),
|
||||
]) autocomplete="address-line2" @readonly(!empty($readonly)) @disabled(!empty($disabled)) @required(!empty($required)) />
|
||||
<label for="address2">{{ Str::ucfirst(__('validation.attributes.line_address_2')) }}@if (!empty($required))
|
||||
*
|
||||
@endif
|
||||
</label>
|
||||
@foreach ($errors->get('address2') as $message)
|
||||
<div class="invalid-feedback">{{ $message }}</div>
|
||||
@endforeach
|
||||
</div>
|
||||
17
views/auth/partials/inputs/birth_date.blade.php
Normal file
17
views/auth/partials/inputs/birth_date.blade.php
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
<div class="form-floating">
|
||||
@php
|
||||
$dataBirthDate = [
|
||||
'id' => 'register-birth_date',
|
||||
'class' => 'form-control mx-auto ' . ($errors->has('birth_date') ? 'is-invalid' : ''),
|
||||
'name' => 'birth_date',
|
||||
'placeholder' => Str::ucfirst(__('validation.attributes.date_of_birth')) . (!empty($required) ? '*' : ''),
|
||||
'autocomplete' => 'bday',
|
||||
'required' => !empty($required),
|
||||
'value' => old('birth_date', $crmCustomer->birth_date ?? null),
|
||||
];
|
||||
@endphp
|
||||
<div class="input-birth-date form-floating" data-json='@json($dataBirthDate)'></div>
|
||||
@foreach ($errors->get('birth_date') as $message)
|
||||
<div class="invalid-feedback d-block">{{ $message }}</div>
|
||||
@endforeach
|
||||
</div>
|
||||
16
views/auth/partials/inputs/city.blade.php
Normal file
16
views/auth/partials/inputs/city.blade.php
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
<div class="form-floating">
|
||||
<input id="register-city" name="city" type="text" value="{{ old('city', $crmCustomer->city ?? null) }}" @class([
|
||||
'form-control',
|
||||
'mx-auto',
|
||||
'is-invalid' => $errors->has('city'),
|
||||
])
|
||||
placeholder="{{ __('validation.attributes.city') }}*" autocomplete="address-level2" @readonly(!empty($readonly)) @disabled(!empty($disabled))
|
||||
@required(!empty($required)) />
|
||||
<label for="register-city">{{ Str::ucfirst(__('validation.attributes.city')) }}@if (!empty($required))
|
||||
*
|
||||
@endif
|
||||
</label>
|
||||
@foreach ($errors->get('city') as $message)
|
||||
<div class="invalid-feedback">{{ $message }}</div>
|
||||
@endforeach
|
||||
</div>
|
||||
37
views/auth/partials/inputs/country.blade.php
Normal file
37
views/auth/partials/inputs/country.blade.php
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
<div class="form-floating mb-3">
|
||||
@php
|
||||
// * Avoir les DROM-COM + France
|
||||
$franceCountries = collect(\LDC\LDCCRM\Enums\Country::getValidCountries())->filter(fn($enum) => !in_array($enum, [LDC\LDCCRM\Enums\Country::belgium(), LDC\LDCCRM\Enums\Country::luxembourg()]));
|
||||
$countries = collect(\LDC\LDCCRM\Enums\Country::getValidCountries())->filter(fn($enum) => !$franceCountries->contains($enum));
|
||||
$old_country = old('country', optional($crmCustomer->country ?? null)->value ?: null);
|
||||
@endphp
|
||||
<select id="country" aria-label="{{ Str::ucfirst(__('validation.attributes.country')) }}" @class([
|
||||
'form-select',
|
||||
'mx-auto',
|
||||
'is-invalid' => $errors->has('country'),
|
||||
]) @readonly(!empty($readonly))
|
||||
@disabled(!empty($disabled)) @required(!empty($required))>
|
||||
<option @selected(!$old_country) disabled>
|
||||
{{ __('Votre :attribute', [
|
||||
'attribute' => __('validation.attributes.country'),
|
||||
]) }}
|
||||
</option>
|
||||
@foreach ($franceCountries as $countryEnum)
|
||||
<option value="{{ $countryEnum->value }}" @selected($old_country == $countryEnum->value)>
|
||||
{{ Str::ucfirst($countryEnum->label) }}
|
||||
</option>
|
||||
@endforeach
|
||||
@foreach ($countries as $countryEnum)
|
||||
<option value="{{ $countryEnum->value }}" @selected($old_country == $countryEnum->value)>
|
||||
{{ Str::ucfirst($countryEnum->label) }}
|
||||
</option>
|
||||
@endforeach
|
||||
</select>
|
||||
<label for="country">{{ Str::ucfirst(__('validation.attributes.country')) }}@if (!empty($required))
|
||||
*
|
||||
@endif
|
||||
</label>
|
||||
@foreach ($errors->get('country') as $message)
|
||||
<div class="invalid-feedback">{{ $message }}</div>
|
||||
@endforeach
|
||||
</div>
|
||||
16
views/auth/partials/inputs/email.blade.php
Normal file
16
views/auth/partials/inputs/email.blade.php
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
<div class="form-floating">
|
||||
<input id="register-email" name="email" type="email" value="{{ old('email', $crmCustomer->email ?? null) }}"
|
||||
@class([
|
||||
'form-control',
|
||||
'mx-auto',
|
||||
'is-invalid' => $errors->has('email'),
|
||||
]) placeholder="{{ __('validation.attributes.email') }}*" autocomplete="email" @readonly(!empty($readonly))
|
||||
@readonly(!empty($readonly)) @disabled(!empty($disabled)) @required(!empty($required)) />
|
||||
<label for="register-email">{{ Str::ucfirst(__('validation.attributes.email')) }}@if (!empty($required))
|
||||
*
|
||||
@endif
|
||||
</label>
|
||||
@foreach ($errors->get('email') as $message)
|
||||
<div class="invalid-feedback">{{ $message }}</div>
|
||||
@endforeach
|
||||
</div>
|
||||
16
views/auth/partials/inputs/first_name.blade.php
Normal file
16
views/auth/partials/inputs/first_name.blade.php
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
<div class="form-floating">
|
||||
<input id="register-lastname" name="lastname" type="text" value="{{ old('lastname', $crmCustomer->lastname ?? null) }}"
|
||||
@class([
|
||||
'form-control',
|
||||
'mx-auto',
|
||||
'is-invalid' => $errors->has('lastname'),
|
||||
]) placeholder="{{ __('validation.attributes.last_name') }}*" autocomplete="given-name" @readonly(!empty($readonly))
|
||||
@disabled(!empty($disabled)) @required(!empty($required)) />
|
||||
<label for="register-lastname">{{ Str::ucfirst(__('validation.attributes.last_name')) }}@if (!empty($required))
|
||||
*
|
||||
@endif
|
||||
</label>
|
||||
@foreach ($errors->get('lastname') as $message)
|
||||
<div class="invalid-feedback">{{ $message }}</div>
|
||||
@endforeach
|
||||
</div>
|
||||
16
views/auth/partials/inputs/last_name.blade.php
Normal file
16
views/auth/partials/inputs/last_name.blade.php
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
<div class="form-floating">
|
||||
<input id="register-firstname" name="firstname" type="text" value="{{ old('firstname', $crmCustomer->firstname ?? null) }}"
|
||||
@class([
|
||||
'form-control',
|
||||
'mx-auto',
|
||||
'is-invalid' => $errors->has('firstname'),
|
||||
]) placeholder="{{ __('validation.attributes.first_name') }}*" autocomplete="family-name" @readonly(!empty($readonly))
|
||||
@disabled(!empty($disabled)) @required(!empty($required)) />
|
||||
<label for="register-firstname">{{ Str::ucfirst(__('validation.attributes.first_name')) }}@if (!empty($required))
|
||||
*
|
||||
@endif
|
||||
</label>
|
||||
@foreach ($errors->get('firstname') as $message)
|
||||
<div class="invalid-feedback">{{ $message }}</div>
|
||||
@endforeach
|
||||
</div>
|
||||
21
views/auth/partials/inputs/password.blade.php
Normal file
21
views/auth/partials/inputs/password.blade.php
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
<div class="input-group has-validation">
|
||||
<div class="form-floating @if ($errors->has('password')) is-invalid @endif">
|
||||
<input id="register-password" name="password" type="password" @class([
|
||||
'form-control',
|
||||
'rounded-0',
|
||||
'rounded-start',
|
||||
'is-invalid' => $errors->has('password'),
|
||||
])
|
||||
placeholder="{{ __('validation.attributes.password') }}*" autocomplete="new-password" @readonly(!empty($readonly))
|
||||
@disabled(!empty($disabled)) @required(!empty($required)) />
|
||||
<label for="register-password">{{ Str::ucfirst(__('validation.attributes.password')) }}@if (!empty($required))
|
||||
*
|
||||
@endif
|
||||
</label>
|
||||
</div>
|
||||
@php $dataPassword = ['inputId' => 'register-password']; @endphp
|
||||
<span class="password-visibility p-0" data-json='@json($dataPassword)'></span>
|
||||
@foreach ($errors->get('password') as $message)
|
||||
<div class="invalid-feedback">{{ $message }}</div>
|
||||
@endforeach
|
||||
</div>
|
||||
21
views/auth/partials/inputs/password_confirmation.blade.php
Normal file
21
views/auth/partials/inputs/password_confirmation.blade.php
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
<div class="input-group has-validation">
|
||||
<div class="form-floating @if ($errors->has('password_confirmation')) is-invalid @endif">
|
||||
<input id="register-password-confirmation" name="password_confirmation" type="password" @class([
|
||||
'form-control',
|
||||
'rounded-0',
|
||||
'rounded-start',
|
||||
'is-invalid' => $errors->has('password_confirmation'),
|
||||
])
|
||||
placeholder="{{ __('validation.attributes.password_confirmation') }}*" autocomplete="new-password" @readonly(!empty($readonly))
|
||||
@disabled(!empty($disabled)) @required(!empty($required)) />
|
||||
<label for="register-password-confirmation">{{ Str::ucfirst(__('validation.attributes.password_confirmation')) }}@if (!empty($required))
|
||||
*
|
||||
@endif
|
||||
</label>
|
||||
</div>
|
||||
@php $dataConfirmPassword = ['inputId' => 'register-password-confirmation']; @endphp
|
||||
<span class="password-visibility p-0" data-json='@json($dataConfirmPassword)'></span>
|
||||
@foreach ($errors->get('password_confirmation') as $message)
|
||||
<div class="invalid-feedback">{{ $message }}</div>
|
||||
@endforeach
|
||||
</div>
|
||||
18
views/auth/partials/inputs/phone.blade.php
Normal file
18
views/auth/partials/inputs/phone.blade.php
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
<div class="form-floating mb-3">
|
||||
<input id="phone" name="phone" type="text" value="{{ old('phone', $crmCustomer->phone ?? null) }}"
|
||||
placeholder="{{ __('Votre :attribute', [
|
||||
'attribute' => __('validation.attributes.phone'),
|
||||
]) }}"
|
||||
@class([
|
||||
'form-control',
|
||||
'mx-auto',
|
||||
'is-invalid' => $errors->has('phone'),
|
||||
]) autocomplete="tel" @readonly(!empty($readonly)) @disabled(!empty($disabled)) @required(!empty($required)) />
|
||||
<label for="phone">{{ Str::ucfirst(__('validation.attributes.phone')) }}@if (!empty($required))
|
||||
*
|
||||
@endif
|
||||
</label>
|
||||
@foreach ($errors->get('phone') as $message)
|
||||
<div class="invalid-feedback">{{ $message }}</div>
|
||||
@endforeach
|
||||
</div>
|
||||
18
views/auth/partials/inputs/postal_code.blade.php
Normal file
18
views/auth/partials/inputs/postal_code.blade.php
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
<div class="form-floating mb-3">
|
||||
<input id="postal_code" name="postal_code" type="text" value="{{ old('postal_code', $crmCustomer->postcode ?? null) }}"
|
||||
placeholder="{{ __('Votre :attribute', [
|
||||
'attribute' => __('validation.attributes.postal_code'),
|
||||
]) }}"
|
||||
@class([
|
||||
'form-control',
|
||||
'mx-auto',
|
||||
'is-invalid' => $errors->has('postal_code'),
|
||||
]) autocomplete="postal-code" @readonly(!empty($readonly)) @disabled(!empty($disabled)) @required(!empty($required)) />
|
||||
<label for="postal_code">{{ Str::ucfirst(__('validation.attributes.postal_code')) }}@if (!empty($required))
|
||||
*
|
||||
@endif
|
||||
</label>
|
||||
@foreach ($errors->get('postal_code') as $message)
|
||||
<div class="invalid-feedback">{{ $message }}</div>
|
||||
@endforeach
|
||||
</div>
|
||||
135
views/auth/profil-verify.blade.php
Normal file
135
views/auth/profil-verify.blade.php
Normal file
|
|
@ -0,0 +1,135 @@
|
|||
@extends('theme::layout')
|
||||
|
||||
@section('title', __('Vérifier mes informations'))
|
||||
@section('description', __('Vérifier mes informations pour participer au jeu'))
|
||||
|
||||
@section('content')
|
||||
<div class="container pb-5 pt-5">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-8">
|
||||
<h1 class="fw-bold text-tertiary text-uppercase text-center">
|
||||
{{ __('Mon compte du club :company', ['company' => $settingsGlobal->company]) }}</h1>
|
||||
|
||||
<form class="container-fluid" method="POST" action="{{ route('fo.profil.verify-submit') }}">
|
||||
@csrf
|
||||
|
||||
<div class="row justify-content-center mb-3">
|
||||
<div class="col-md-8">
|
||||
<span
|
||||
class="h2 d-block text-center">{{ __("Pour pouvoir jouer, merci de renseigner/compléter les champs ci-dessous\u{00A0}:") }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<fieldset class="row justify-content-center mb-5">
|
||||
<legend class="col-md-auto fw-bold">{{ __('Vos coordonnées') }}</legend>
|
||||
|
||||
{{-- Force next columns to break to new line --}}
|
||||
<div class="w-100"></div>
|
||||
|
||||
{{-- FIRST_NAME --}}
|
||||
<div class="col-12 col-md-6 py-2">
|
||||
@include('theme::auth.partials.inputs.first_name', ['required' => true])
|
||||
</div>
|
||||
|
||||
{{-- LAST_NAME --}}
|
||||
<div class="col-12 col-md-6 py-2">
|
||||
@include('theme::auth.partials.inputs.last_name', ['required' => true])
|
||||
</div>
|
||||
|
||||
{{-- ADDRESS --}}
|
||||
<div class="col-12 col-md-6 py-2">
|
||||
@include('theme::auth.partials.inputs.address', ['required' => true])
|
||||
</div>
|
||||
|
||||
{{-- ADDRESS2 --}}
|
||||
<div class="col-12 col-md-6 py-2">
|
||||
@include('theme::auth.partials.inputs.address2')
|
||||
</div>
|
||||
|
||||
{{-- POSTAL_CODE --}}
|
||||
<div class="col-12 col-md-6 py-2">
|
||||
@include('theme::auth.partials.inputs.postal_code', ['required' => true])
|
||||
</div>
|
||||
|
||||
{{-- CITY --}}
|
||||
<div class="col-12 col-md-6 py-2">
|
||||
@include('theme::auth.partials.inputs.city', ['required' => true])
|
||||
</div>
|
||||
|
||||
{{-- COUNTRY --}}
|
||||
<div class="col-12 col-md-6 py-2">
|
||||
@include('theme::auth.partials.inputs.country', ['required' => true])
|
||||
</div>
|
||||
|
||||
{{-- PHONE --}}
|
||||
<div class="col-12 col-md-6 py-2">
|
||||
@include('theme::auth.partials.inputs.phone')
|
||||
</div>
|
||||
|
||||
{{-- EMAIL --}}
|
||||
<div class="col-12 col-md-6 py-2">
|
||||
@include('theme::auth.partials.inputs.email', ['readonly' => true])
|
||||
</div>
|
||||
|
||||
</fieldset>
|
||||
|
||||
{{-- CHECKBOXES --}}
|
||||
<div class="row justify-content-center">
|
||||
<div class="col col-md-8 px-0 py-2">
|
||||
<div class="form-check text-start">
|
||||
<input id="register-optin" name="opt_in" type="checkbox" @class([
|
||||
'form-check-input',
|
||||
'me-1',
|
||||
'is-invalid' => $errors->has('opt_in'),
|
||||
])
|
||||
@checked($crmCustomer->opt_in)>
|
||||
<label class="form-check-label fw-bold w-fit" for="register-optin" role="button">
|
||||
{{ __('Je souhaite m\'inscrire à la newsletter') }} {{ $settingsGlobal->company }}
|
||||
</label>
|
||||
</div>
|
||||
@foreach ($errors->get('opt_in') as $message)
|
||||
<div class="invalid-feedback d-block">{{ $message }}</div>
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
<div class="row justify-content-center mb-5">
|
||||
<div class="col col-md-8 px-0 py-2">
|
||||
<div class="form-check">
|
||||
<input id="register-ok-cgv" name="ok_cgv" type="checkbox" @class([
|
||||
'form-check-input',
|
||||
'me-1',
|
||||
'is-invalid' => $errors->has('ok_cgv'),
|
||||
]) required />
|
||||
<label class="form-check-label fw-bold w-fit" for="register-ok-cgv" role="button">
|
||||
{!! clean(
|
||||
__('J\'ai lu et accepte le :a règlement du jeu :enda', [
|
||||
'a' => '<a href="' . route('fo.reglement') . '" target="_blank">',
|
||||
'enda' => '</a>',
|
||||
]),
|
||||
) !!}
|
||||
</label>
|
||||
</div>
|
||||
@foreach ($errors->get('ok_cgv') as $message)
|
||||
<div class="invalid-feedback d-block">{{ $message }}</div>
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mb-2">
|
||||
<div class="col-md-6 offset-md-4">
|
||||
<button class="btn btn-lg btn-tertiary" type="submit">
|
||||
{{ __('Continuer') }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mb-0">
|
||||
<div class="col-md-6 offset-md-4">
|
||||
<span class="fw-bold">{{ __('* champs obligatoires') }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
|
@ -19,197 +19,28 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<fieldset class="mb-3">
|
||||
<legend class="text-center">{{ __('Votre profil') }}</legend>
|
||||
{{-- PERSONAL INFO --}}
|
||||
@include('theme::auth.partials.form-personal-info', [
|
||||
'colClasses' => 'col col-md-10 col-lg-8 py-2',
|
||||
])
|
||||
|
||||
<div class="container-fluid">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col col-md-10 col-lg-8 py-2">
|
||||
<div class="form-floating">
|
||||
<input class="form-control @if ($errors->has('lastname')) is-invalid @endif mx-auto"
|
||||
id="register-lastname" name="lastname" type="text"
|
||||
value="{{ old('lastname', $crmCustomer->lastname ?? null) }}" placeholder="{{ __('Nom') }}*"
|
||||
autocomplete="given-name" required />
|
||||
<label for="register-lastname">{{ __('Nom') }}*</label>
|
||||
@foreach ($errors->get('lastname') as $message)
|
||||
<div class="invalid-feedback">{{ $message }}</div>
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{-- ADDRESS INFO --}}
|
||||
@include('theme::auth.partials.form-address-info', [
|
||||
'colClasses' => 'col col-md-10 col-lg-8 py-2',
|
||||
])
|
||||
|
||||
<div class="row justify-content-center">
|
||||
<div class="col col-md-10 col-lg-8 py-2">
|
||||
<div class="form-floating">
|
||||
<input class="form-control @if ($errors->has('firstname')) is-invalid @endif mx-auto"
|
||||
id="register-firstname" name="firstname" type="text"
|
||||
value="{{ old('firstname', $crmCustomer->firstname ?? null) }}" placeholder="{{ __('Prénom') }}*"
|
||||
autocomplete="family-name" required />
|
||||
<label for="register-firstname">{{ __('Prénom') }}*</label>
|
||||
@foreach ($errors->get('firstname') as $message)
|
||||
<div class="invalid-feedback">{{ $message }}</div>
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row justify-content-center">
|
||||
<div class="col col-md-10 col-lg-8 py-2">
|
||||
<div class="form-floating">
|
||||
@php
|
||||
$dataBirthDate = [
|
||||
'id' => 'register-birth_date',
|
||||
'class' => 'form-control mx-auto ' . ($errors->has('birth_date') ? 'is-invalid' : ''),
|
||||
'name' => 'birth_date',
|
||||
'placeholder' => __('Date de naissance'),
|
||||
'autocomplete' => 'bday',
|
||||
'required' => true,
|
||||
'value' => old('birth_date', $crmCustomer->birth_date ?? null),
|
||||
];
|
||||
@endphp
|
||||
<div class="input-birth-date form-floating" data-json='@json($dataBirthDate)'></div>
|
||||
@foreach ($errors->get('birth_date') as $message)
|
||||
<div class="invalid-feedback d-block">{{ $message }}</div>
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<fieldset class="mb-3">
|
||||
<legend class="text-center">{{ __('Vos coordonnées') }}</legend>
|
||||
|
||||
<div class="row justify-content-center">
|
||||
<div class="col col-md-10 col-lg-8 py-2">
|
||||
<div class="form-floating">
|
||||
<input class="form-control @if ($errors->has('address')) is-invalid @endif mx-auto"
|
||||
id="register-address" name="address" type="text"
|
||||
value="{{ old('address', $crmCustomer->address ?? null) }}" placeholder="{{ __('Adresse') }}*"
|
||||
autocomplete="street-address" required />
|
||||
<label for="register-address">{{ __('Adresse') }}*</label>
|
||||
@foreach ($errors->get('address') as $message)
|
||||
<div class="invalid-feedback">{{ $message }}</div>
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row justify-content-center">
|
||||
<div class="col col-md-10 col-lg-8 py-2">
|
||||
<div class="form-floating">
|
||||
<input class="form-control @if ($errors->has('address2')) is-invalid @endif mx-auto"
|
||||
id="register-address2" name="address2" type="text"
|
||||
value="{{ old('address2', $crmCustomer->address2 ?? null) }}"
|
||||
placeholder="{{ __('Adresse complément') }}" />
|
||||
<label for="register-address2">{{ __('Adresse complément') }}</label>
|
||||
@foreach ($errors->get('address2') as $message)
|
||||
<div class="invalid-feedback">{{ $message }}</div>
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row justify-content-center">
|
||||
<div class="col col-md-10 col-lg-8 py-2">
|
||||
<div class="form-floating">
|
||||
<input class="form-control @if ($errors->has('city')) is-invalid @endif mx-auto" id="register-city"
|
||||
name="city" type="text" value="{{ old('city', $crmCustomer->city ?? null) }}"
|
||||
placeholder="{{ __('Ville') }}*" autocomplete="address-level2" required />
|
||||
<label for="register-city">{{ __('Ville') }}*</label>
|
||||
@foreach ($errors->get('city') as $message)
|
||||
<div class="invalid-feedback">{{ $message }}</div>
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row justify-content-center">
|
||||
<div class="col col-md-10 col-lg-8 py-2">
|
||||
<div class="form-floating">
|
||||
<input class="form-control @if ($errors->has('postcode')) is-invalid @endif mx-auto"
|
||||
id="register-postcode" name="postcode" type="text"
|
||||
value="{{ old('postcode', $crmCustomer->postcode ?? null) }}" placeholder="{{ __('Code postal') }}*"
|
||||
autocomplete="postal-code" required />
|
||||
<label for="register-postcode">{{ __('Code postal') }}*</label>
|
||||
@foreach ($errors->get('postcode') as $message)
|
||||
<div class="invalid-feedback">{{ $message }}</div>
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<fieldset class="mb-3">
|
||||
<legend class="text-center">{{ __('Vos identifiants') }}</legend>
|
||||
|
||||
<div class="container-fluid">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col col-md-10 col-lg-8 py-2">
|
||||
<div class="form-floating">
|
||||
<input class="form-control @if ($errors->has('email')) is-invalid @endif mx-auto"
|
||||
id="register-email" name="email" type="email"
|
||||
value="{{ old('email', $crmCustomer->email ?? null) }}"
|
||||
placeholder="{{ __('Votre adresse email') }}*" autocomplete="email"
|
||||
@if (!empty($displayEdit)) disabled @else required @endif />
|
||||
<label for="register-email">{{ __('Votre adresse email') }}*</label>
|
||||
@foreach ($errors->get('email') as $message)
|
||||
<div class="invalid-feedback">{{ $message }}</div>
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if (empty($displayEdit))
|
||||
<div class="row justify-content-center">
|
||||
<div class="col col-md-10 col-lg-8 input-group d-flex justify-content-center py-2">
|
||||
<div class="input-group has-validation">
|
||||
<div class="form-floating @if ($errors->has('password')) is-invalid @endif">
|
||||
<input
|
||||
class="form-control rounded-0 rounded-start @if ($errors->has('password')) is-invalid @endif"
|
||||
id="register-password" name="password" type="password"
|
||||
placeholder="{{ __('Mot de passe') }}*" autocomplete="new-password" required />
|
||||
<label for="register-password">{{ __('Mot de passe') }}*</label>
|
||||
</div>
|
||||
@php $dataPassword = ['inputId' => 'register-password']; @endphp
|
||||
<span class="password-visibility p-0" data-json='@json($dataPassword)'></span>
|
||||
@foreach ($errors->get('password') as $message)
|
||||
<div class="invalid-feedback">{{ $message }}</div>
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row justify-content-center">
|
||||
<div class="col col-md-10 col-lg-8 input-group d-flex justify-content-center py-2">
|
||||
<div class="input-group has-validation">
|
||||
<div class="form-floating @if ($errors->has('password_confirmation')) is-invalid @endif">
|
||||
<input
|
||||
class="form-control rounded-0 rounded-start @if ($errors->has('password_confirmation')) is-invalid @endif"
|
||||
id="register-password-confirmation" name="password_confirmation" type="password"
|
||||
placeholder="{{ __('Confirmer votre mot de passe') }}*" autocomplete="new-password"
|
||||
required />
|
||||
<label for="register-password-confirmation">{{ __('Confirmer votre mot de passe') }}*</label>
|
||||
</div>
|
||||
@php $dataConfirmPassword = ['inputId' => 'register-password-confirmation']; @endphp
|
||||
<span class="password-visibility p-0" data-json='@json($dataConfirmPassword)'></span>
|
||||
@foreach ($errors->get('password_confirmation') as $message)
|
||||
<div class="invalid-feedback">{{ $message }}</div>
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@include('theme::auth.password-min-strength')
|
||||
@endif
|
||||
</div>
|
||||
</fieldset>
|
||||
{{-- SECURITY INFO --}}
|
||||
@include('theme::auth.partials.form-security-info')
|
||||
|
||||
{{-- CHECKBOXES --}}
|
||||
<div class="row justify-content-center">
|
||||
<div class="col col-md-8 px-0 py-2">
|
||||
<div class="form-check text-start">
|
||||
<input class="form-check-input @if ($errors->has('opt_in')) is-invalid @endif me-1" id="register-optin"
|
||||
name="opt_in" type="checkbox">
|
||||
<input id="register-optin" name="opt_in" type="checkbox" @class([
|
||||
'form-check-input',
|
||||
'me-1',
|
||||
'is-invalid' => $errors->has('opt_in'),
|
||||
])>
|
||||
<label class="form-check-label fw-bold w-fit" for="register-optin" role="button">
|
||||
{{ __('Je souhaite m\'inscrire à la newsletter') }} {{ $settingsGlobal->company }}
|
||||
</label>
|
||||
|
|
@ -219,12 +50,14 @@
|
|||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row justify-content-center mb-5">
|
||||
<div class="col col-md-8 px-0 py-2">
|
||||
<div class="form-check">
|
||||
<input class="form-check-input @if ($errors->has('ok_cgv')) is-invalid @endif me-1"
|
||||
id="register-ok-cgv" name="ok_cgv" type="checkbox" required />
|
||||
<input id="register-ok-cgv" name="ok_cgv" type="checkbox" @class([
|
||||
'form-check-input',
|
||||
'me-1',
|
||||
'is-invalid' => $errors->has('ok_cgv'),
|
||||
]) required />
|
||||
<label class="form-check-label fw-bold w-fit" for="register-ok-cgv" role="button">
|
||||
{!! clean(
|
||||
__('J\'ai lu et accepte le :a règlement du jeu :enda', [
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
</li>
|
||||
@endcan
|
||||
<li class="nav-item">
|
||||
@guest
|
||||
@guest('frontend')
|
||||
<a class="btn-connect btn btn-tertiary fw-bold fs-4 text-uppercase"
|
||||
href="{{ route('fo.login') }}">{{ __('Je me connecte') }}</a>
|
||||
@else
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
@if ($settingsGlobal->winning_proof)
|
||||
{{ __('Pour recevoir votre cadeau, vous devez envoyer vos preuves d\'achat. Voir modalités ci dessous.') }}
|
||||
@else
|
||||
{{ __('Vous serez prochainement contacté via vos coordonées d\'inscription pour recevoir votre lot.') }}
|
||||
{{ __('Vous serez prochainement contacté via vos coordonnées d\'inscription pour recevoir votre lot.') }}
|
||||
@endif
|
||||
</p>
|
||||
@if ($settingsGlobal->winning_proof)
|
||||
|
|
|
|||
|
|
@ -1,176 +1,47 @@
|
|||
<fieldset class="row justify-content-center mb-5">
|
||||
<legend class="col-md-auto fw-bold">{{ __('Vos coordonées') }}</legend>
|
||||
<legend class="col-md-auto fw-bold">{{ __('Vos coordonnées') }}</legend>
|
||||
|
||||
{{-- Force next columns to break to new line --}}
|
||||
<div class="w-100"></div>
|
||||
|
||||
{{-- FIRST_NAME --}}
|
||||
<div class="col-12 col-md-6 py-2">
|
||||
<div class="form-floating mb-3">
|
||||
<input id="first_name" name="first_name" type="text" value="{{ old('first_name') }}"
|
||||
placeholder="{{ __('Votre :attribute', [
|
||||
'attribute' => __('validation.attributes.first_name'),
|
||||
]) }}"
|
||||
@class([
|
||||
'form-control',
|
||||
'mx-auto',
|
||||
'is-invalid' => $errors->has('first_name'),
|
||||
]) autocomplete="given-name" />
|
||||
<label for="first_name">{{ Str::ucfirst(__('validation.attributes.first_name')) }}</label>
|
||||
@foreach ($errors->get('first_name') as $message)
|
||||
<div class="invalid-feedback">{{ $message }}</div>
|
||||
@endforeach
|
||||
</div>
|
||||
@include('theme::auth.partials.inputs.first_name')
|
||||
</div>
|
||||
|
||||
{{-- LAST_NAME --}}
|
||||
<div class="col-12 col-md-6 py-2">
|
||||
<div class="form-floating mb-3">
|
||||
<input id="last_name" name="last_name" type="text" value="{{ old('last_name') }}"
|
||||
placeholder="{{ __('Votre :attribute', [
|
||||
'attribute' => __('validation.attributes.last_name'),
|
||||
]) }}"
|
||||
@class([
|
||||
'form-control',
|
||||
'mx-auto',
|
||||
'is-invalid' => $errors->has('last_name'),
|
||||
]) autocomplete="given-name" />
|
||||
<label for="last_name">{{ Str::ucfirst(__('validation.attributes.last_name')) }}</label>
|
||||
@foreach ($errors->get('last_name') as $message)
|
||||
<div class="invalid-feedback">{{ $message }}</div>
|
||||
@endforeach
|
||||
</div>
|
||||
@include('theme::auth.partials.inputs.last_name')
|
||||
</div>
|
||||
|
||||
{{-- ADDRESS --}}
|
||||
<div class="col-12 col-md-6 py-2">
|
||||
<div class="form-floating mb-3">
|
||||
<input id="address" name="address" type="text" value="{{ old('address') }}"
|
||||
placeholder="{{ __('Votre :attribute', [
|
||||
'attribute' => __('validation.attributes.line_address_1'),
|
||||
]) }}"
|
||||
@class([
|
||||
'form-control',
|
||||
'mx-auto',
|
||||
'is-invalid' => $errors->has('address'),
|
||||
]) autocomplete="address-line1" />
|
||||
<label for="address">{{ Str::ucfirst(__('validation.attributes.line_address_1')) }}</label>
|
||||
@foreach ($errors->get('address') as $message)
|
||||
<div class="invalid-feedback">{{ $message }}</div>
|
||||
@endforeach
|
||||
</div>
|
||||
@include('theme::auth.partials.inputs.address')
|
||||
</div>
|
||||
|
||||
{{-- ADDRESS2 --}}
|
||||
<div class="col-12 col-md-6 py-2">
|
||||
<div class="form-floating mb-3">
|
||||
<input id="address2" name="address2" type="text" value="{{ old('address2') }}"
|
||||
placeholder="{{ __('Votre :attribute', [
|
||||
'attribute' => __('validation.attributes.line_address_2'),
|
||||
]) }}"
|
||||
@class([
|
||||
'form-control',
|
||||
'mx-auto',
|
||||
'is-invalid' => $errors->has('address2'),
|
||||
]) autocomplete="address-line2" />
|
||||
<label for="address2">{{ Str::ucfirst(__('validation.attributes.line_address_2')) }}</label>
|
||||
@foreach ($errors->get('address2') as $message)
|
||||
<div class="invalid-feedback">{{ $message }}</div>
|
||||
@endforeach
|
||||
</div>
|
||||
@include('theme::auth.partials.inputs.address2')
|
||||
</div>
|
||||
|
||||
{{-- POSTAL_CODE --}}
|
||||
<div class="col-12 col-md-6 py-2">
|
||||
<div class="form-floating mb-3">
|
||||
<input id="postal_code" name="postal_code" type="text" value="{{ old('postal_code') }}"
|
||||
placeholder="{{ __('Votre :attribute', [
|
||||
'attribute' => __('validation.attributes.postal_code'),
|
||||
]) }}"
|
||||
@class([
|
||||
'form-control',
|
||||
'mx-auto',
|
||||
'is-invalid' => $errors->has('postal_code'),
|
||||
]) autocomplete="postal-code" />
|
||||
<label for="postal_code">{{ Str::ucfirst(__('validation.attributes.postal_code')) }}</label>
|
||||
@foreach ($errors->get('postal_code') as $message)
|
||||
<div class="invalid-feedback">{{ $message }}</div>
|
||||
@endforeach
|
||||
</div>
|
||||
@include('theme::auth.partials.inputs.postal_code')
|
||||
</div>
|
||||
|
||||
{{-- CITY --}}
|
||||
<div class="col-12 col-md-6 py-2">
|
||||
<div class="form-floating mb-3">
|
||||
<input id="city" name="city" type="text" value="{{ old('city') }}"
|
||||
placeholder="{{ __('Votre :attribute', [
|
||||
'attribute' => __('validation.attributes.city'),
|
||||
]) }}"
|
||||
@class([
|
||||
'form-control',
|
||||
'mx-auto',
|
||||
'is-invalid' => $errors->has('city'),
|
||||
]) autocomplete="address-level2" />
|
||||
<label for="city">{{ Str::ucfirst(__('validation.attributes.city')) }}</label>
|
||||
@foreach ($errors->get('city') as $message)
|
||||
<div class="invalid-feedback">{{ $message }}</div>
|
||||
@endforeach
|
||||
</div>
|
||||
@include('theme::auth.partials.inputs.city')
|
||||
</div>
|
||||
|
||||
{{-- COUNTRY --}}
|
||||
<div class="col-12 col-md-6 py-2">
|
||||
<div class="form-floating mb-3">
|
||||
@php
|
||||
// * Avoir les DROM-COM + France
|
||||
$franceCountries = collect(\LDC\LDCCRM\Enums\Country::getValidCountries())->filter(fn($enum) => !in_array($enum, [LDC\LDCCRM\Enums\Country::belgium(), LDC\LDCCRM\Enums\Country::luxembourg()]));
|
||||
$countries = collect(\LDC\LDCCRM\Enums\Country::toArray())->filter(fn($enum) => !$franceCountries->contains($enum));
|
||||
@endphp
|
||||
<select id="country" aria-label="{{ Str::ucfirst(__('validation.attributes.country')) }}" @class([
|
||||
'form-select',
|
||||
'mx-auto',
|
||||
'is-invalid' => $errors->has('country'),
|
||||
])>
|
||||
<option @selected(!old('country')) disabled>
|
||||
{{ __('Votre :attribute', [
|
||||
'attribute' => __('validation.attributes.country'),
|
||||
]) }}
|
||||
</option>
|
||||
@foreach ($franceCountries as $countryEnum)
|
||||
<option value="{{ $countryEnum->value }}" @selected(old('country') == $countryEnum->value)>
|
||||
{{ Str::ucfirst($countryEnum->label) }}
|
||||
</option>
|
||||
@endforeach
|
||||
@foreach ($countries as $countryEnum)
|
||||
<option value="{{ $countryEnum->value }}" @selected(old('country') == $countryEnum->value)>
|
||||
{{ Str::ucfirst($countryEnum->label) }}
|
||||
</option>
|
||||
@endforeach
|
||||
</select>
|
||||
<label for="country">{{ Str::ucfirst(__('validation.attributes.country')) }}</label>
|
||||
@foreach ($errors->get('country') as $message)
|
||||
<div class="invalid-feedback">{{ $message }}</div>
|
||||
@endforeach
|
||||
</div>
|
||||
@include('theme::auth.partials.inputs.country')
|
||||
</div>
|
||||
|
||||
{{-- PHONE --}}
|
||||
<div class="col-12 col-md-6 py-2">
|
||||
<div class="form-floating mb-3">
|
||||
<input id="phone" name="phone" type="text" value="{{ old('phone') }}"
|
||||
placeholder="{{ __('Votre :attribute', [
|
||||
'attribute' => __('validation.attributes.phone'),
|
||||
]) }}"
|
||||
@class([
|
||||
'form-control',
|
||||
'mx-auto',
|
||||
'is-invalid' => $errors->has('phone'),
|
||||
]) autocomplete="tel" />
|
||||
<label for="phone">{{ Str::ucfirst(__('validation.attributes.phone')) }}</label>
|
||||
@foreach ($errors->get('phone') as $message)
|
||||
<div class="invalid-feedback">{{ $message }}</div>
|
||||
@endforeach
|
||||
</div>
|
||||
@include('theme::auth.partials.inputs.phone')
|
||||
</div>
|
||||
|
||||
</fieldset>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue