107 lines
5.8 KiB
PHP
107 lines
5.8 KiB
PHP
@extends('layouts.app')
|
||
@section('title', 'Inscription Le Gaulois')
|
||
@section('description', "Inscription au Club Le Gaulois")
|
||
|
||
@section('sub_header')
|
||
<div class="sub_header">
|
||
<div class="content">
|
||
<div class="title-health-nutrition">
|
||
Inscription au club
|
||
</div>
|
||
<!-- TODO : GESTION IMG SI MOBILE -->
|
||
<img src="{{ asset('assets/images/faq/faq_background.jpg') }}" alt="Mentions légales - Le Gaulois">
|
||
</div>
|
||
</div>
|
||
@endsection
|
||
|
||
@section('content')
|
||
<section class="content-register">
|
||
<div class="content">
|
||
<form action="{{ route('inscription') }}" method="POST" class="form-register" name="form-register">
|
||
@csrf
|
||
<div class="bloc-left">
|
||
@if ($errors->any())
|
||
<div class="errors">
|
||
<i class="fa fa-exclamation-triangle"></i>
|
||
@foreach ($errors->all() as $error)
|
||
<p class="error">• {{ $error }}</p>
|
||
@endforeach
|
||
</div>
|
||
@endif
|
||
<h1><i class="icon-account"></i><span>Mes informations</span></h1>
|
||
<p>Pour vous inscrire, rien de plus facile : il vous suffit simplement de renseigner vos données dans le formulaire ci-dessous !</p>
|
||
<div class="form-bloc">
|
||
<h2>Coordonnées</h2>
|
||
<input type="text" name="username" placeholder="Pseudo *" value="{{ old('username') }}" required onchange="changeValue(this.name, this.value.length)">
|
||
<input type="text" name="firstname" placeholder="Prénom *" value="{{ old('firstname') }}" required onchange="changeValue(this.name, this.value.length)">
|
||
<input type="text" name="lastname" placeholder="Nom *" value="{{ old('lastname') }}" required onchange="changeValue(this.name, this.value.length)">
|
||
<input type="text" name="address" placeholder="Adresse" value="{{ old('address') }}" onchange="changeValue(this.name, this.value.length)">
|
||
<input type="text" name="postcode" placeholder="Code postal *" value="{{ old('postcode') }}" required onchange="changeValue(this.name, this.value.length)">
|
||
<input type="text" name="city" placeholder="Ville *" value="{{ old('city') }}" required onchange="changeValue(this.name, this.value.length)">
|
||
<input type="text" name="phone" placeholder="Téléphone" value="{{ old('phone') }}" onchange="changeValue(this.name, this.value.length)">
|
||
<input type="text" name="email" placeholder="Email *" value="{{ old('email') }}" required onchange="changeValue(this.name, this.value.length)">
|
||
<input type="password" name="password" placeholder="Votre mot de passe *" required onchange="changeValue(this.name, this.value.length)">
|
||
<input type="password" name="password_confirmation" placeholder="Confirmer votre mot de passe *" required onchange="changeValue(this.name, this.value.length)">
|
||
<div class="bloc-birth">
|
||
<h2>Date de naissance</h2>
|
||
<div>
|
||
<select name="day">
|
||
@for ($i = 1; $i <= 31; $i++)
|
||
<option value="{{ $i < 10 ? '0' . $i : $i }}" @if(old('day') == $i) selected @endif>{{ $i < 10 ? '0' . $i : $i }}</option>
|
||
@endfor
|
||
</select>
|
||
<select name="month">
|
||
@for ($i = 1; $i <= 12; $i++)
|
||
<option value="{{ $i < 10 ? '0' . $i : $i }}" @if(old('month') == $i) selected @endif>{{ $i < 10 ? '0' . $i : $i }}</option>
|
||
@endfor
|
||
</select>
|
||
<select name="year">
|
||
@for ($i = date('Y'); $i >= date('Y') - 100; $i--)
|
||
<option value="{{ $i }}" @if(old('year') == $i) selected @endif>{{ $i }}</option>
|
||
@endfor
|
||
</select>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="bloc-right">
|
||
<div class="completion">
|
||
<!-- TODO : Progress bar -->
|
||
<div class="progress">
|
||
<div id="progress-bar" class="progress-value"></div>
|
||
</div>
|
||
<div class="percent-progress">
|
||
<p id="percent-text">0%</p>
|
||
<span>completé</span>
|
||
</div>
|
||
<div>
|
||
<label>
|
||
<input type="checkbox" name="optin" @if(old('optin') !== null)checked @endif onchange="changeValue(this.name, this.checked ? 1 : 0)">
|
||
J’accepte de recevoir les actualités et bons plans Le Gaulois
|
||
</label>
|
||
</div>
|
||
<button type="submit" class="btn-red" value="Enregistrer">Enregistrer</button>
|
||
</div>
|
||
</div>
|
||
</form>
|
||
</div>
|
||
</section>
|
||
@endsection
|
||
|
||
@push('scripts')
|
||
<script type="text/javascript">
|
||
// Initialisation des vars
|
||
var bar, text, progressBar;
|
||
|
||
document.addEventListener('DOMContentLoaded', (event) => {
|
||
bar = document.getElementById('progress-bar');
|
||
text = document.getElementById('percent-text');
|
||
let formInputs = document.forms["form-register"].getElementsByTagName('input');
|
||
progressBar = new ProgressBarInfos(bar, text, formInputs);
|
||
});
|
||
|
||
function changeValue(field, size) {
|
||
progressBar.changeValue(field, size);
|
||
}
|
||
</script>
|
||
@endpush
|