TOS on register site

This commit is contained in:
1day2die 2023-01-04 11:51:35 +01:00
parent ab26a20dde
commit 81662b8e17
2 changed files with 157 additions and 145 deletions

View file

@ -67,6 +67,9 @@ class RegisterController extends Controller
if (config('SETTINGS::RECAPTCHA:ENABLED') == 'true') {
$validationRules['g-recaptcha-response'] = ['required', 'recaptcha'];
}
if (config('SETTINGS::SYSTEM:SHOW_TOS') == 'true') {
$validationRules['terms'] = ['required'];
}
if (config('SETTINGS::SYSTEM:REGISTER_IP_CHECK', 'true') == 'true') {

View file

@ -110,7 +110,7 @@
</div>
@if (config('SETTINGS::REFERRAL::ENABLED') == 'true')
<div class="input-group mb-3">
<input type="text" value="{{ \Request::get('ref') }}" class="form-control"
<input type="text" value="{{ Request::get('ref') }}" class="form-control"
name="referral_code"
placeholder="{{ __('Referral code') }} ({{ __('optional') }})">
<div class="input-group-append">
@ -132,14 +132,23 @@
@endif
<div class="row">
<div class="col-8">
<div class="col-12">
@if (config('SETTINGS::SYSTEM:SHOW_TOS'))
{{-- <div class="icheck-primary"> --}}
{{-- <input type="checkbox" id="agreeTerms" name="terms" value="agree"> --}}
{{-- <label for="agreeTerms"> --}}
{{-- I agree to the <a href="#">terms</a> --}}
{{-- </label> --}}
{{-- </div> --}}
<div class="icheck-primary">
<input type="checkbox" id="agreeTerms" name="terms" value="agree">
<label for="agreeTerms">
{{__("I agree to the")}} <a target="_blank" href="{{route("tos")}}">{{__("Terms of Service")}}</a>
</label>
</div>
@error('terms')
<span class="text-danger" role="alert">
<small><strong>{{ $message }}</strong></small>
</span>
@enderror
@endif
</div>
</div>
<!-- /.col -->
<div class="col-4">