- Convert hardcoded strings and French translation keys to English keys across Blade templates, Vue components, TypeScript modules, models, and routes - Complete and synchronize lang/fr.json and lang/en.json translation dictionaries - Add timezone attribute in lang/fr/validation.php and lang/en/validation.php - Add missing English lang files for parity: crud.php, models.php, search.php, and vue.php
237 lines
12 KiB
PHP
237 lines
12 KiB
PHP
@extends('fo.layouts.layout')
|
|
|
|
@section('title', __('Register'))
|
|
@section('description', __('Registration procedure for the shop.'))
|
|
|
|
@section('content')
|
|
<main class="container my-5">
|
|
<div class="row justify-content-center">
|
|
<div class="col-12 col-md-10 col-lg-8">
|
|
|
|
<h1 class="h3 fw-bold text-uppercase mb-4 text-center">{{ __('Register') }}</h1>
|
|
|
|
<form action="{{ route('fo.auth.register.post') }}" method="POST">
|
|
@csrf
|
|
|
|
{{-- GESTION DES ERREURS GLOBALES --}}
|
|
@if ($errors->any())
|
|
<div class="alert alert-danger mb-4" role="alert">
|
|
<ul class="list-unstyled mb-0 text-center">
|
|
@foreach ($errors->all() as $error)
|
|
<li>{{ $error }}</li>
|
|
@endforeach
|
|
</ul>
|
|
</div>
|
|
@endif
|
|
|
|
{{-- CONSIGNES MATRICULE --}}
|
|
<div class="alert alert-warning small mb-3 py-2 text-center" role="alert">
|
|
{{ __('Please enter your employee number (available on your payslip), 7 characters long (e.g. v00115590->0115590).') }}
|
|
</div>
|
|
|
|
{{-- MATRICULE --}}
|
|
<div class="form-floating mb-4">
|
|
<input class="form-control @error('matricule') is-invalid @enderror" id="matricule" name="matricule" type="text"
|
|
value="{{ old('matricule') }}" placeholder="{{ __('validation.attributes.matricule') }}" required autocomplete="off" autofocus>
|
|
<label for="matricule">{{ Str::ucfirst(__('validation.attributes.matricule')) }}</label>
|
|
@error('matricule')
|
|
<span class="invalid-feedback" role="alert"><strong>{{ $message }}</strong></span>
|
|
@enderror
|
|
</div>
|
|
|
|
{{-- CONSIGNES CODE RH --}}
|
|
<div class="alert alert-warning small mb-3 py-2 text-center" role="alert">
|
|
{{ __('Please contact your HR department to get your single-use registration code.') }}
|
|
</div>
|
|
|
|
{{-- CODE_INSCRIPTION --}}
|
|
<div class="form-floating mb-4">
|
|
<input class="form-control @error('code') is-invalid @enderror" id="code" name="code" type="text"
|
|
value="{{ old('code') }}" placeholder="{{ __('validation.attributes.code') }}" required autocomplete="off">
|
|
<label for="code">{{ Str::ucfirst(__('validation.attributes.code')) }}</label>
|
|
@error('code')
|
|
<span class="invalid-feedback" role="alert"><strong>{{ $message }}</strong></span>
|
|
@enderror
|
|
</div>
|
|
|
|
{{-- INFORMATIONS PERSONNELLES --}}
|
|
<div class="row g-3 mb-4">
|
|
{{-- LASTNAME --}}
|
|
<div class="col-12 col-sm-6">
|
|
<div class="form-floating">
|
|
<input class="form-control @error('lastname') is-invalid @enderror" id="lastname" name="lastname" type="text"
|
|
value="{{ old('lastname') }}" placeholder="{{ __('validation.attributes.last_name') }}" required
|
|
autocomplete="family-name">
|
|
<label for="lastname">{{ Str::ucfirst(__('validation.attributes.last_name')) }}</label>
|
|
</div>
|
|
@error('lastname')
|
|
<span class="text-danger small" role="alert"><strong>{{ $message }}</strong></span>
|
|
@enderror
|
|
</div>
|
|
|
|
{{-- FIRSTNAME --}}
|
|
<div class="col-12 col-sm-6">
|
|
<div class="form-floating">
|
|
<input class="form-control @error('firstname') is-invalid @enderror" id="firstname" name="firstname" type="text"
|
|
value="{{ old('firstname') }}" placeholder="{{ __('validation.attributes.first_name') }}" required
|
|
autocomplete="given-name">
|
|
<label for="firstname">{{ Str::ucfirst(__('validation.attributes.first_name')) }}</label>
|
|
</div>
|
|
@error('firstname')
|
|
<span class="text-danger small" role="alert"><strong>{{ $message }}</strong></span>
|
|
@enderror
|
|
</div>
|
|
</div>
|
|
|
|
{{-- BIRTHDATE & PHONE --}}
|
|
<div class="row g-3 mb-4">
|
|
<div class="col-12 col-sm-6">
|
|
<div class="form-floating">
|
|
<input class="form-control @error('birth_date') is-invalid @enderror" id="birth-date" name="birth_date" type="date"
|
|
value="{{ old('birth_date') }}" placeholder="{{ __('validation.attributes.date_of_birth') }}" required
|
|
autocomplete="bday">
|
|
<label for="birth-date">{{ Str::ucfirst(__('validation.attributes.date_of_birth')) }}</label>
|
|
</div>
|
|
@error('birth_date')
|
|
<span class="text-danger small" role="alert"><strong>{{ $message }}</strong></span>
|
|
@enderror
|
|
</div>
|
|
|
|
<div class="col-12 col-sm-6">
|
|
<div class="form-floating">
|
|
<input class="form-control @error('phone') is-invalid @enderror" id="phone" name="phone" type="tel"
|
|
value="{{ old('phone') }}" placeholder="{{ __('validation.attributes.phone') }}" autocomplete="tel">
|
|
<label for="phone">{{ Str::ucfirst(__('validation.attributes.phone')) }}</label>
|
|
</div>
|
|
@error('phone')
|
|
<span class="text-danger small" role="alert"><strong>{{ $message }}</strong></span>
|
|
@enderror
|
|
</div>
|
|
</div>
|
|
|
|
{{-- EMAIL --}}
|
|
<div class="form-floating mb-4">
|
|
<input class="form-control @error('email') is-invalid @enderror" id="email" name="email" type="email"
|
|
value="{{ old('email') }}" placeholder="{{ __('validation.attributes.email') }}" required autocomplete="email">
|
|
<label for="email">{{ Str::ucfirst(__('validation.attributes.email')) }}</label>
|
|
@error('email')
|
|
<span class="invalid-feedback" role="alert"><strong>{{ $message }}</strong></span>
|
|
@enderror
|
|
</div>
|
|
|
|
{{-- COORDONNÉES POSTALES --}}
|
|
<div class="form-floating mb-4">
|
|
<input class="form-control @error('address') is-invalid @enderror" id="address" name="address" type="text"
|
|
value="{{ old('address') }}" placeholder="{{ __('validation.attributes.address') }}" autocomplete="street-address">
|
|
<label for="address">{{ Str::ucfirst(__('validation.attributes.address')) }}</label>
|
|
@error('address')
|
|
<span class="invalid-feedback" role="alert"><strong>{{ $message }}</strong></span>
|
|
@enderror
|
|
</div>
|
|
|
|
<div class="row g-3 mb-4">
|
|
<div class="col-12 col-sm-4">
|
|
<div class="form-floating">
|
|
<input class="form-control @error('postal_code') is-invalid @enderror" id="postal-code" name="postal_code" type="text"
|
|
value="{{ old('postal_code') }}" placeholder="{{ __('validation.attributes.postal_code') }}" required
|
|
autocomplete="postal-code">
|
|
<label for="postal-code">{{ Str::ucfirst(__('validation.attributes.postal_code')) }}</label>
|
|
</div>
|
|
@error('postal_code')
|
|
<span class="text-danger small" role="alert"><strong>{{ $message }}</strong></span>
|
|
@enderror
|
|
</div>
|
|
|
|
<div class="col-12 col-sm-8">
|
|
<div class="form-floating">
|
|
<input class="form-control @error('city') is-invalid @enderror" id="city" name="city" type="text"
|
|
value="{{ old('city') }}" placeholder="{{ __('validation.attributes.city') }}" required
|
|
autocomplete="address-level4">
|
|
<label for="city">{{ Str::ucfirst(__('validation.attributes.city')) }}</label>
|
|
</div>
|
|
@error('city')
|
|
<span class="text-danger small" role="alert"><strong>{{ $message }}</strong></span>
|
|
@enderror
|
|
</div>
|
|
</div>
|
|
|
|
{{-- MOT DE PASSE --}}
|
|
<div class="card bg-light mb-4 border-0 p-4">
|
|
<div class="row g-3">
|
|
<div class="col-12 col-sm-6">
|
|
<div class="input-group">
|
|
<div class="form-floating">
|
|
<input class="form-control @error('password') is-invalid @enderror" id="password" name="password" type="password"
|
|
autocomplete="new-password" placeholder="{{ __('Password') }}" required>
|
|
<label for="password">{{ __('Password') }}</label>
|
|
</div>
|
|
<span class="password-visibility" data-json='@json(['id' => 'password'])'></span>
|
|
</div>
|
|
@error('password')
|
|
<span class="text-danger small" role="alert"><strong>{{ $message }}</strong></span>
|
|
@enderror
|
|
</div>
|
|
|
|
<div class="col-12 col-sm-6">
|
|
<div class="input-group">
|
|
<div class="form-floating">
|
|
<input class="form-control @error('password_confirmation') is-invalid @enderror" id="password-confirm"
|
|
name="password_confirmation" type="password" placeholder="{{ __('Confirm Password') }}" required
|
|
autocomplete="new-password">
|
|
<label for="password-confirm">{{ __('Confirm Password') }}</label>
|
|
</div>
|
|
<span class="password-visibility" data-json='@json(['id' => 'password-confirm'])'></span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
{{-- CRITÈRES DU MOT DE PASSE --}}
|
|
<div class="text-muted small mt-3 text-center">
|
|
<p class="fw-bold mb-1">{{ __('The password must contain') }} :</p>
|
|
<span class="d-block">{{ __('- minimum 8 characters') }}</span>
|
|
<span class="d-block">{{ __('- at least one uppercase letter') }}</span>
|
|
<span class="d-block">{{ __('- at least one lowercase letter') }}</span>
|
|
<span class="d-block">{{ __('- at least one number') }}</span>
|
|
<span class="d-block">{{ __('- at least one special character.') }}</span>
|
|
</div>
|
|
</div>
|
|
|
|
{{-- PRIVACY --}}
|
|
<div class="form-check d-flex align-items-start mb-3">
|
|
<input class="form-check-input me-2 mt-1" id="ok_cgv" name="ok_cgv" type="checkbox" required>
|
|
<label class="form-check-label small" for="ok_cgv">
|
|
{{ __('I have read and accept the') }}
|
|
<a href="{{ route('fo.pages.terms') }}" target="mentions">{{ __('general conditions') }}</a>
|
|
{{ __('and the') }}
|
|
<a href="{{ route('fo.pages.privacy') }}" target="mentions">{{ __('personal data management policy') }}</a>.
|
|
</label>
|
|
</div>
|
|
|
|
{{-- NEWSLETTER --}}
|
|
<div class="form-check d-flex align-items-start mb-3">
|
|
<input class="form-check-input me-2 mt-1" id="optin" name="optin" type="checkbox" @checked(old('optin'))>
|
|
<label class="form-check-label small" for="optin">
|
|
{{ __('I wish to subscribe to the newsletter') }} {{ config('app.name') }}.
|
|
</label>
|
|
</div>
|
|
|
|
<div class="fst-italic text-muted small my-3 text-center">{{ '*' . __('Mandatory fields') }}</div>
|
|
|
|
{{-- S'INSCRIRE --}}
|
|
<div class="d-grid mb-4 gap-2 text-center">
|
|
<button class="btn btn-primary rounded-4 py-2" type="submit">{{ __('Register') }}</button>
|
|
</div>
|
|
</form>
|
|
|
|
<hr class="my-4">
|
|
|
|
{{-- ASIDE (DÉJÀ INSCRIT) --}}
|
|
<div class="d-flex flex-column flex-sm-row justify-content-center align-items-center gap-2">
|
|
<p class="text-muted m-0">{{ __('Already registered?') }}</p>
|
|
<a class="btn btn-primary rounded-4" href="{{ route('fo.auth.connexion') }}">{{ __('Log in') }}</a>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
</main>
|
|
@endsection
|