242 lines
13 KiB
PHP
242 lines
13 KiB
PHP
<x-app-layout>
|
|
<x-slot name="header">
|
|
<h2 class="text-xl font-semibold leading-tight text-gray-800">
|
|
{{ __('Create new member') }}
|
|
</h2>
|
|
</x-slot>
|
|
|
|
<div class="py-12">
|
|
<div class="mx-auto max-w-3xl sm:px-6 lg:px-8">
|
|
<div class="bg-white shadow sm:rounded-lg">
|
|
<div class="px-4 py-5 sm:p-6">
|
|
@if (session('status'))
|
|
<div class="mb-4 rounded-md bg-green-50 p-4" role="status" aria-live="polite">
|
|
<p class="text-sm font-medium text-green-800">
|
|
{{ session('status') }}
|
|
</p>
|
|
</div>
|
|
@endif
|
|
|
|
<form method="POST" action="{{ route('admin.members.store') }}" class="space-y-6" aria-label="{{ __('Create member form') }}">
|
|
@csrf
|
|
|
|
<div>
|
|
<label for="full_name" class="block text-sm font-medium text-gray-700">
|
|
{{ __('Full name') }}
|
|
</label>
|
|
<input
|
|
type="text"
|
|
name="full_name"
|
|
id="full_name"
|
|
value="{{ old('full_name') }}"
|
|
class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm"
|
|
required
|
|
>
|
|
@error('full_name')
|
|
<p class="mt-2 text-sm text-red-600">{{ $message }}</p>
|
|
@enderror
|
|
</div>
|
|
|
|
<div>
|
|
<label for="email" class="block text-sm font-medium text-gray-700">
|
|
{{ __('Email') }}
|
|
</label>
|
|
<input
|
|
type="email"
|
|
name="email"
|
|
id="email"
|
|
value="{{ old('email') }}"
|
|
class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm"
|
|
required
|
|
>
|
|
@error('email')
|
|
<p class="mt-2 text-sm text-red-600">{{ $message }}</p>
|
|
@enderror
|
|
<p class="mt-1 text-sm text-gray-500">
|
|
{{ __('An activation email will be sent to this address.') }}
|
|
</p>
|
|
</div>
|
|
|
|
<div>
|
|
<label for="national_id" class="block text-sm font-medium text-gray-700">
|
|
{{ __('National ID') }}
|
|
</label>
|
|
<input
|
|
type="text"
|
|
name="national_id"
|
|
id="national_id"
|
|
value="{{ old('national_id') }}"
|
|
class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm"
|
|
autocomplete="off"
|
|
>
|
|
@error('national_id')
|
|
<p class="mt-2 text-sm text-red-600">{{ $message }}</p>
|
|
@enderror
|
|
<p class="mt-1 text-sm text-gray-500">
|
|
{{ __('Will be stored encrypted for security.') }}
|
|
</p>
|
|
</div>
|
|
|
|
<div>
|
|
<label for="phone" class="block text-sm font-medium text-gray-700">
|
|
{{ __('Phone') }}
|
|
</label>
|
|
<input
|
|
type="text"
|
|
name="phone"
|
|
id="phone"
|
|
value="{{ old('phone') }}"
|
|
class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm"
|
|
>
|
|
@error('phone')
|
|
<p class="mt-2 text-sm text-red-600">{{ $message }}</p>
|
|
@enderror
|
|
</div>
|
|
|
|
<div class="grid gap-6 sm:grid-cols-2">
|
|
<div>
|
|
<label for="membership_started_at" class="block text-sm font-medium text-gray-700">
|
|
{{ __('Membership start date') }}
|
|
</label>
|
|
<input
|
|
type="date"
|
|
name="membership_started_at"
|
|
id="membership_started_at"
|
|
value="{{ old('membership_started_at') }}"
|
|
class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm"
|
|
>
|
|
@error('membership_started_at')
|
|
<p class="mt-2 text-sm text-red-600">{{ $message }}</p>
|
|
@enderror
|
|
</div>
|
|
|
|
<div>
|
|
<label for="membership_expires_at" class="block text-sm font-medium text-gray-700">
|
|
{{ __('Membership expiry date') }}
|
|
</label>
|
|
<input
|
|
type="date"
|
|
name="membership_expires_at"
|
|
id="membership_expires_at"
|
|
value="{{ old('membership_expires_at') }}"
|
|
class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm"
|
|
>
|
|
@error('membership_expires_at')
|
|
<p class="mt-2 text-sm text-red-600">{{ $message }}</p>
|
|
@enderror
|
|
</div>
|
|
</div>
|
|
|
|
<div>
|
|
<label for="address_line_1" class="block text-sm font-medium text-gray-700">
|
|
{{ __('Address Line 1') }}
|
|
</label>
|
|
<input
|
|
type="text"
|
|
name="address_line_1"
|
|
id="address_line_1"
|
|
value="{{ old('address_line_1') }}"
|
|
class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm"
|
|
>
|
|
@error('address_line_1')
|
|
<p class="mt-2 text-sm text-red-600">{{ $message }}</p>
|
|
@enderror
|
|
</div>
|
|
|
|
<div>
|
|
<label for="address_line_2" class="block text-sm font-medium text-gray-700">
|
|
{{ __('Address Line 2') }}
|
|
</label>
|
|
<input
|
|
type="text"
|
|
name="address_line_2"
|
|
id="address_line_2"
|
|
value="{{ old('address_line_2') }}"
|
|
class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm"
|
|
>
|
|
@error('address_line_2')
|
|
<p class="mt-2 text-sm text-red-600">{{ $message }}</p>
|
|
@enderror
|
|
</div>
|
|
|
|
<div class="grid gap-6 sm:grid-cols-2">
|
|
<div>
|
|
<label for="city" class="block text-sm font-medium text-gray-700">
|
|
{{ __('City') }}
|
|
</label>
|
|
<input
|
|
type="text"
|
|
name="city"
|
|
id="city"
|
|
value="{{ old('city') }}"
|
|
class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm"
|
|
>
|
|
@error('city')
|
|
<p class="mt-2 text-sm text-red-600">{{ $message }}</p>
|
|
@enderror
|
|
</div>
|
|
|
|
<div>
|
|
<label for="postal_code" class="block text-sm font-medium text-gray-700">
|
|
{{ __('Postal Code') }}
|
|
</label>
|
|
<input
|
|
type="text"
|
|
name="postal_code"
|
|
id="postal_code"
|
|
value="{{ old('postal_code') }}"
|
|
class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm"
|
|
>
|
|
@error('postal_code')
|
|
<p class="mt-2 text-sm text-red-600">{{ $message }}</p>
|
|
@enderror
|
|
</div>
|
|
</div>
|
|
|
|
<div>
|
|
<label for="emergency_contact_name" class="block text-sm font-medium text-gray-700">
|
|
{{ __('Emergency Contact Name') }}
|
|
</label>
|
|
<input
|
|
type="text"
|
|
name="emergency_contact_name"
|
|
id="emergency_contact_name"
|
|
value="{{ old('emergency_contact_name') }}"
|
|
class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm"
|
|
>
|
|
@error('emergency_contact_name')
|
|
<p class="mt-2 text-sm text-red-600">{{ $message }}</p>
|
|
@enderror
|
|
</div>
|
|
|
|
<div>
|
|
<label for="emergency_contact_phone" class="block text-sm font-medium text-gray-700">
|
|
{{ __('Emergency Contact Phone') }}
|
|
</label>
|
|
<input
|
|
type="text"
|
|
name="emergency_contact_phone"
|
|
id="emergency_contact_phone"
|
|
value="{{ old('emergency_contact_phone') }}"
|
|
class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm"
|
|
>
|
|
@error('emergency_contact_phone')
|
|
<p class="mt-2 text-sm text-red-600">{{ $message }}</p>
|
|
@enderror
|
|
</div>
|
|
|
|
<div class="flex justify-end gap-3">
|
|
<a href="{{ route('admin.members.index') }}" class="inline-flex items-center rounded-md border border-gray-300 bg-white px-4 py-2 text-sm font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2">
|
|
{{ __('Cancel') }}
|
|
</a>
|
|
<button type="submit" class="inline-flex items-center rounded-md border border-transparent bg-indigo-600 px-4 py-2 text-sm font-medium text-white hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2">
|
|
{{ __('Create member') }}
|
|
</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</x-app-layout>
|