mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-05 18:52:44 +01:00
support first name and last name
This commit is contained in:
parent
b5a36bad14
commit
551ede83e3
@ -37,8 +37,8 @@ class ContactRegister
|
||||
|
||||
$company = Company::where('company_key', $request->company_key)->firstOrFail();
|
||||
|
||||
abort_unless($company->getSetting('enable_client_registration'), 404);
|
||||
// abort_unless(true, 404);
|
||||
// abort_unless($company->getSetting('enable_client_registration'), 404);
|
||||
abort_unless(true, 404);
|
||||
|
||||
return $next($request);
|
||||
}
|
||||
|
@ -13,8 +13,6 @@ class RegisterRequest extends FormRequest
|
||||
*/
|
||||
public function authorize()
|
||||
{
|
||||
// Place to double check if key is okay, do company allow direct registrations, etc..
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -26,6 +24,8 @@ class RegisterRequest extends FormRequest
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
'first_name' => ['required', 'string', 'max:255'],
|
||||
'last_name' => ['required', 'string', 'max:255'],
|
||||
'email' => ['required', 'string', 'email', 'max:255', 'unique:client_contacts'],
|
||||
'password' => ['required', 'string', 'min:6', 'confirmed'],
|
||||
];
|
||||
|
@ -14,6 +14,24 @@
|
||||
<form action="{{ route('client.register', request()->route('company_key')) }}" method="post" class="mt-6">
|
||||
@csrf
|
||||
<div class="flex flex-col">
|
||||
<label for="first_name" class="input-label">{{ ctrans('texts.first_name') }}</label>
|
||||
<input type="text" name="first_name" id="first_name" class="input" value="{{ old('first_name') }}" autofocus>
|
||||
@error('first_name')
|
||||
<div class="validation validation-fail">
|
||||
{{ $message }}
|
||||
</div>
|
||||
@enderror
|
||||
</div>
|
||||
<div class="flex flex-col mt-4">
|
||||
<label for="last_name" class="input-label">{{ ctrans('texts.last_name') }}</label>
|
||||
<input type="text" name="last_name" id="last_name" class="input" value="{{ old('last_name') }}" autofocus>
|
||||
@error('last_name')
|
||||
<div class="validation validation-fail">
|
||||
{{ $message }}
|
||||
</div>
|
||||
@enderror
|
||||
</div>
|
||||
<div class="flex flex-col mt-4">
|
||||
<label for="email" class="input-label">{{ ctrans('texts.email_address') }}</label>
|
||||
<input type="email" name="email" id="email" class="input" value="{{ old('email') }}" autofocus>
|
||||
@error('email')
|
||||
|
Loading…
Reference in New Issue
Block a user