100 lines
5.4 KiB
PHP
100 lines
5.4 KiB
PHP
@extends('layouts.app')
|
|
|
|
@section('content')
|
|
@include('modules.banner')
|
|
@include('modules.banderolle')
|
|
<div id="content">
|
|
@include('modules/steps', ['step' => 2])
|
|
<div class="container">
|
|
@if($errors->has('ipError'))
|
|
<div class="row justify-content-center">
|
|
<div class="col-12 col-md-8">
|
|
<h2 class="formTitle">{{ implode(',', $errors->get('ipError')) }}</h2>
|
|
</div>
|
|
</div>
|
|
@endif
|
|
<div class="row justify-content-center">
|
|
<div class="col-12 col-md-8">
|
|
@if(isset($maxParticipation))
|
|
<h2 class="formTitle">{{ __('Vous avez atteint le nombre de participation maximal pour aujourd\'hui, vous pourrez retenter votre chance demain') }}</h2>
|
|
@else
|
|
<form action="{{ route('participationSubmit') }}" method="post">
|
|
@csrf
|
|
|
|
<fieldset class="form-group row justify-content-center mt-4">
|
|
|
|
<legend class="col-form-label text-center">
|
|
<span class="formTitle formTitleSmall">{{ __('Produit acheté') }}</span><br>
|
|
<span>{{ __('Entrez les 7 ou 13 chiffres situés sous le code-barres du produit acheté') }}</span><br>
|
|
<img class="img-fluid mt-2" src="{{ asset('assets/images/exemple_codebarre.png') }}" alt="{{ __('Exemple Code barre') }}">
|
|
</legend>
|
|
|
|
<div class="col-8">
|
|
<div class="form-group row justify-content-center">
|
|
<div class="col-md-6">
|
|
<label for="ean" class="participationlabel">{{ __('Votre code produit') }}*</label>
|
|
<input type="number" name="ean" id="ean" class="form-control @error('ean') is-invalid @enderror" max="9999999999999" maxlength="13" value="{{ old('ean') }}">
|
|
<small>{{ __('Votre code produit') }}</small>
|
|
@if($errors->has('ean'))
|
|
<div class="error invalid-feedback d-block" role="alert">
|
|
{{ implode($errors->get('ean')) }}
|
|
</div>
|
|
@endif
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group row justify-content-center mt-3">
|
|
<div class="col-md-6">
|
|
<label for="buydate" class="participationlabel">{{ __('Date d\'achat') }}*</label>
|
|
<input type="date" name="buydate" id="buydate" class="form-control @error('buydate') is-invalid @enderror" placeholder="1990-12-31" required autofocus>
|
|
@if($errors->has('buydate'))
|
|
<div class="error invalid-feedback d-block" role="alert">
|
|
{{ implode($errors->get('buydate')) }}
|
|
</div>
|
|
@endif
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group row justify-content-center mt-3">
|
|
<div class="col-md-6">
|
|
<label for="magasin" class="participationlabel">{{ __('Votre magasin') }}*</label>
|
|
{{-- Hack pour styler un select https://stackoverflow.com/questions/3532649/problem-with-select-and-after-with-css-in-webkit --}}
|
|
<div class="magasinSelect">
|
|
<select name="magasin" id="magasin" class="form-control @error('magasin') is-invalid @enderror" required>
|
|
<option>{{ __('Choisissez un magasin') }}</option>
|
|
@foreach($magasins as $magasin)
|
|
<option value="{{ $magasin->id }}">{{ $magasin->name }}</option>
|
|
@endforeach
|
|
</select>
|
|
</div>
|
|
@if($errors->has('magasin'))
|
|
<div class="error invalid-feedback d-block" role="alert">
|
|
{{ implode($errors->get('magasin')) }}
|
|
</div>
|
|
@endif
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
</fieldset>
|
|
|
|
<div class="form-group row justify-content-center mb-0 mt-4">
|
|
<div class="col text-center">
|
|
<button type="submit" class="bigButton">
|
|
{{ __('Je valide') }}
|
|
</button>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group row justify-content-center mb-0 mt-2">
|
|
<div class="col text-center">
|
|
<span class="text-primary">* champs obligatoires</span>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
@endif
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@endsection
|