ldc-legaulois/resources/views/bo/mail-testing.blade.php
2026-09-23 15:11:48 +02:00

84 lines
3 KiB
PHP
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

@extends('bo.layout')
@section('title', __('Test de mails'))
@section('description', __('Test de mails'))
@section('content')
<div class="d-flex justify-content-between align-items-center mb-4 flex-wrap gap-2">
@include('modules.breadcrumbs.breadcrumb-body', ['brParam' => ''])
</div>
<div class="mb-4">
<form action="{{ route('bo.mail-testing.sendMail') }}" method="POST" novalidate>
@csrf
<div class="row g-4 mb-4">
{{-- Section Gabarit --}}
<div class="col-12 col-md-6">
<fieldset class="card h-100 border p-3 shadow-sm">
<legend class="fs-6 fw-bold float-none mb-3 w-auto px-2">
{{ __('Gabarit de mail') }}
</legend>
<div class="mb-3">
<label class="form-label" for="mail_template">
{{ __('Sélectionnez un modèle') }}
<span class="text-danger" aria-hidden="true">*</span>
</label>
<select class="form-select @error('template') is-invalid @enderror" id="mail_template" name="template" aria-required="true"
aria-describedby="mail_template_feedback" required>
<option value="" disabled selected>{{ __('Choisissez un modèle...') }}</option>
@foreach (\App\Enums\MailToTest::cases() as $mailToTest)
<option value="{{ $mailToTest->value() }}" {{ old('template') === $mailToTest->value() ? 'selected' : '' }}>
{{ $mailToTest->label() }}
</option>
@endforeach
</select>
@error('template')
<div class="invalid-feedback" id="mail_template_feedback">
{{ $message }}
</div>
@enderror
</div>
</fieldset>
</div>
{{-- Section Destinataire --}}
<div class="col-12 col-md-6">
<fieldset class="card h-100 border p-3 shadow-sm">
<legend class="fs-6 fw-bold float-none mb-3 w-auto px-2">
{{ __('Destinataire') }}
</legend>
<div class="mb-3">
<label class="form-label" for="recipient_email">
{{ __('Adresse e-mail de réception') }}
<span class="text-danger" aria-hidden="true">*</span>
</label>
<input class="form-control @error('to') is-invalid @enderror" id="recipient_email" name="to" type="email"
value="{{ old('to') }}" aria-required="true" aria-describedby="recipient_email_feedback" placeholder="nom@exemple.org"
autocomplete="email" required>
@error('to')
<div class="invalid-feedback" id="recipient_email_feedback">
{{ $message }}
</div>
@enderror
</div>
</fieldset>
</div>
</div>
{{-- Action de soumission --}}
<div>
<button class="btn btn-primary" type="submit">
{{ __('Envoyer l’e-mail de test') }}
</button>
</div>
</form>
</div>
@endsection