add recaptcha to tickets and preview to settings
This commit is contained in:
parent
fe2020f817
commit
bfda91516a
|
@ -39,6 +39,7 @@ class TicketsController extends Controller
|
||||||
'ticketcategory' => 'required',
|
'ticketcategory' => 'required',
|
||||||
'priority' => 'required',
|
'priority' => 'required',
|
||||||
'message' => 'required',
|
'message' => 'required',
|
||||||
|
'g-recaptcha-response' => ['required', 'recaptcha'],
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
$ticket = new Ticket(
|
$ticket = new Ticket(
|
||||||
|
|
|
@ -159,6 +159,28 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@endforeach
|
@endforeach
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-4 d-flex align-items-center">
|
||||||
|
<label for="recaptcha_preview">{{__("ReCAPTCHA Preview")}}</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-8">
|
||||||
|
|
||||||
|
<div class="w-100">
|
||||||
|
<div class="input-group mb-3">
|
||||||
|
{!! htmlScriptTagJsApi() !!}
|
||||||
|
{!! htmlFormSnippet() !!}
|
||||||
|
@error('g-recaptcha-response')
|
||||||
|
<span class="text-danger" role="alert">
|
||||||
|
<small><strong>{{ $message }}</strong></small>
|
||||||
|
</span>
|
||||||
|
@enderror
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12 d-flex align-items-center justify-content-end">
|
<div class="col-12 d-flex align-items-center justify-content-end">
|
||||||
<button type="submit"
|
<button type="submit"
|
||||||
|
|
|
@ -90,6 +90,17 @@
|
||||||
</span>
|
</span>
|
||||||
@endif
|
@endif
|
||||||
</div>
|
</div>
|
||||||
|
@if (app(App\Settings\GeneralSettings::class)->recaptcha_enabled)
|
||||||
|
<div class="input-group mb-3">
|
||||||
|
{!! htmlScriptTagJsApi() !!}
|
||||||
|
{!! htmlFormSnippet() !!}
|
||||||
|
@error('g-recaptcha-response')
|
||||||
|
<span class="text-danger" role="alert">
|
||||||
|
<small><strong>{{ $message }}</strong></small>
|
||||||
|
</span>
|
||||||
|
@enderror
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
</div>
|
</div>
|
||||||
<div class="card-footer">
|
<div class="card-footer">
|
||||||
<button type="submit" class="btn btn-primary ticket-once">
|
<button type="submit" class="btn btn-primary ticket-once">
|
||||||
|
|
Loading…
Reference in a new issue