38 lines
2.4 KiB
PHP
38 lines
2.4 KiB
PHP
<div>
|
|
<div class="mb-6">
|
|
<a href="{{ route('campagne.index') }}" class="inline-flex items-center gap-1 text-sm text-gray-500 hover:text-indigo-600 transition-colors mb-1">
|
|
<svg class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 19l-7-7 7-7"/></svg>
|
|
Torna alla lista
|
|
</a>
|
|
<h1 class="text-2xl font-bold text-gray-900">{{ $titolo }}</h1>
|
|
</div>
|
|
|
|
<div class="bg-white rounded-xl shadow-sm border border-gray-200 p-6 max-w-lg">
|
|
<form wire:submit="save" class="space-y-4">
|
|
<div>
|
|
<label for="descrizione" class="block text-sm font-medium text-gray-700">Descrizione *</label>
|
|
<input wire:model="descrizione" type="text" id="descrizione" placeholder="es. Campagna della Commemorazione 2025" class="mt-1 block w-full rounded-lg border-gray-300 shadow-sm focus:ring-indigo-500 focus:border-indigo-500 text-sm" required>
|
|
@error('descrizione') <p class="text-red-500 text-xs mt-1">{{ $message }}</p> @enderror
|
|
</div>
|
|
|
|
<div class="grid grid-cols-1 sm:grid-cols-2 gap-4">
|
|
<div>
|
|
<label for="start_date" class="block text-sm font-medium text-gray-700">Data Inizio *</label>
|
|
<input wire:model="start_date" type="date" id="start_date" class="mt-1 block w-full rounded-lg border-gray-300 shadow-sm focus:ring-indigo-500 focus:border-indigo-500 text-sm" required>
|
|
@error('start_date') <p class="text-red-500 text-xs mt-1">{{ $message }}</p> @enderror
|
|
</div>
|
|
<div>
|
|
<label for="end_date" class="block text-sm font-medium text-gray-700">Data Fine *</label>
|
|
<input wire:model="end_date" type="date" id="end_date" class="mt-1 block w-full rounded-lg border-gray-300 shadow-sm focus:ring-indigo-500 focus:border-indigo-500 text-sm" required>
|
|
@error('end_date') <p class="text-red-500 text-xs mt-1">{{ $message }}</p> @enderror
|
|
</div>
|
|
</div>
|
|
|
|
<div class="flex items-center gap-3 pt-4">
|
|
<x-btn variante="primary" type="submit">{{ $btnLabel }}</x-btn>
|
|
<x-btn variante="secondary" :href="route('campagne.index')">Annulla</x-btn>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|