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') { if (config('SETTINGS::RECAPTCHA:ENABLED') == 'true') {
$validationRules['g-recaptcha-response'] = ['required', 'recaptcha']; $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') { if (config('SETTINGS::SYSTEM:REGISTER_IP_CHECK', 'true') == 'true') {

View file

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