mirror of
https://gitlab.linphone.org/BC/public/flexisip-account-manager.git
synced 2026-01-17 01:58:07 +00:00
Fix FLEXIAPI-154 Fix and improve hcaptcha integration
This commit is contained in:
parent
9d7618e9c4
commit
92e06df01f
4 changed files with 7 additions and 7 deletions
|
|
@ -50,10 +50,10 @@ class AccountController extends Controller
|
|||
|
||||
public function store(CreateAccountRequest $request)
|
||||
{
|
||||
$account = (new AccountService(api: false))->store($request);
|
||||
|
||||
$request->validate(['h-captcha-response' => captchaConfigured() ? 'required|HCaptcha' : '']);
|
||||
|
||||
$account = (new AccountService(api: false))->store($request);
|
||||
|
||||
Auth::login($account);
|
||||
|
||||
if ($request->has('phone')) {
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
@include('parts.tabs.register')
|
||||
|
||||
<form method="POST" action="{{ route('account.store') }}" accept-charset="UTF-8">
|
||||
@csrf
|
||||
@csrf
|
||||
|
||||
<div>
|
||||
<input placeholder="username" name="username" type="text" value="{{ old('username') }}" required>
|
||||
|
|
@ -34,12 +34,12 @@
|
|||
</div>
|
||||
|
||||
<div>
|
||||
<input required="" name="password" type="password" value="" placeholder="Password">
|
||||
<input required="" name="password" type="password" value="{{ old('password') }}" placeholder="Password">
|
||||
<label for="password">Password</label>
|
||||
@include('parts.errors', ['name' => 'password'])
|
||||
</div>
|
||||
<div>
|
||||
<input required="" name="password_confirmation" type="password" value="" placeholder="Password confirmation">
|
||||
<input required="" name="password_confirmation" type="password" value="{{ old('password_confirmation') }}" placeholder="Password confirmation">
|
||||
<label for="password_confirmation">Confirm password</label>
|
||||
@include('parts.errors', ['name' => 'password_confirmation'])
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@
|
|||
<tbody>
|
||||
@foreach ($account->phoneChangeCodes as $phoneChangeCode)
|
||||
<tr @if ($phoneChangeCode->consumed()) class="disabled crossed" @endif>
|
||||
<td>{{ $phoneChangeCode->phone }}<td>
|
||||
<td>{{ $phoneChangeCode->phone }}</td>
|
||||
<td>
|
||||
{{ $phoneChangeCode->created_at }}
|
||||
</td>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
@if (captchaConfigured())
|
||||
<div class="large">
|
||||
{!! HCaptcha::renderJs() !!}
|
||||
<script src="https://hcaptcha.com/1/api.js?recaptchacompat=off" async="" defer=""></script>
|
||||
{!! HCaptcha::display() !!}
|
||||
@include('parts.errors', ['name' => 'h-captcha-response'])
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue