Files
WebAPP/resources/views/admin/invitations/create.blade.php
Rhino 2e24a40d68 Stand: SMTP-Test, Admin-Mail-Tab, Notifiable-Fix, Lazy-Quill
- Fix: Notifiable-Trait zum User-Model hinzugefuegt (behebt notify()-500er)
- Installer: SMTP-Verbindungstest mit EsmtpTransport + Ueberspringen-Link
- Admin: Neuer E-Mail-Tab mit SMTP-Konfiguration + Verbindungstest
- Admin: Lazy Quill-Initialisierung (nur sichtbare Locale wird geladen)
- Uebersetzungen: 17 neue Mail-Keys in allen 6 Sprachen

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-02 07:30:37 +01:00

50 lines
3.2 KiB
PHP
Executable File

<x-layouts.admin :title="__('admin.create_invitation')">
<h1 class="text-2xl font-bold mb-6">{{ __('admin.new_invitation') }}</h1>
<div class="bg-white rounded-lg shadow p-6 max-w-lg">
<form method="POST" action="{{ route('admin.invitations.store') }}">
@csrf
<div class="mb-4">
<label for="email" class="block text-sm font-medium text-gray-700 mb-1">{{ __('admin.email_optional') }}</label>
<input type="email" name="email" id="email" value="{{ old('email') }}"
placeholder="{{ __('admin.email_optional_hint') }}"
class="w-full px-3 py-2 border border-gray-300 rounded-md @error('email') border-red-500 @enderror">
@error('email')<p class="mt-1 text-sm text-red-600">{{ $message }}</p>@enderror
</div>
<div class="mb-4">
<label for="expires_in_days" class="block text-sm font-medium text-gray-700 mb-1">{{ __('admin.valid_for_days') }} *</label>
<input type="number" name="expires_in_days" id="expires_in_days" value="{{ old('expires_in_days', 7) }}" min="1" max="90" required
class="w-full px-3 py-2 border border-gray-300 rounded-md @error('expires_in_days') border-red-500 @enderror">
@error('expires_in_days')<p class="mt-1 text-sm text-red-600">{{ $message }}</p>@enderror
</div>
<div class="mb-4">
<label class="block text-sm font-medium text-gray-700 mb-2">{{ __('admin.assign_players') }}</label>
<p class="text-xs text-gray-500 mb-2">{{ __('admin.player_assignment_hint') }}</p>
<div class="border border-gray-300 rounded-md max-h-60 overflow-y-auto p-2 space-y-1">
@forelse ($players as $player)
<label class="flex items-center px-2 py-1 hover:bg-gray-50 rounded cursor-pointer">
<input type="checkbox" name="player_ids[]" value="{{ $player->id }}"
{{ in_array($player->id, old('player_ids', [])) ? 'checked' : '' }}
class="rounded border-gray-300 mr-2">
<span class="text-sm">{{ $player->full_name }}</span>
<span class="text-xs text-gray-400 ml-auto">{{ $player->team->name }}</span>
</label>
@empty
<p class="text-sm text-gray-400 px-2 py-1">{{ __('admin.no_active_players') }}</p>
@endforelse
</div>
@error('player_ids')<p class="mt-1 text-sm text-red-600">{{ $message }}</p>@enderror
@error('player_ids.*')<p class="mt-1 text-sm text-red-600">{{ $message }}</p>@enderror
</div>
<div class="flex items-center gap-3">
<button type="submit" class="bg-blue-600 text-white px-4 py-2 rounded-md hover:bg-blue-700 text-sm font-medium">{{ __('admin.create_invitation') }}</button>
<a href="{{ route('admin.invitations.index') }}" class="text-sm text-gray-600 hover:underline">{{ __('ui.cancel') }}</a>
</div>
</form>
</div>
</x-layouts.admin>