reorganize and cleanup php server code
This commit is contained in:
@@ -0,0 +1,58 @@
|
||||
<div class="card">
|
||||
<h6 class="card-header">
|
||||
@lang('General')
|
||||
</h6>
|
||||
|
||||
<div class="card-body">
|
||||
{!! Form::open(['route' => 'settings.auth.update', 'id' => 'auth-general-settings-form']) !!}
|
||||
|
||||
<div class="form-group mb-4">
|
||||
<div class="d-flex align-items-center">
|
||||
<div class="switch">
|
||||
<input type="hidden" value="0" name="remember_me">
|
||||
{!! Form::checkbox('remember_me', 1, setting('remember_me'), ['class' => 'switch', 'id' => 'switch-remember-me']) !!}
|
||||
<label for="switch-remember-me"></label>
|
||||
</div>
|
||||
<div class="ml-3 d-flex flex-column">
|
||||
<label class="mb-0">@lang('Allow "Remember Me"')</label>
|
||||
<small class="pt-0 text-muted">
|
||||
@lang("Should 'Remember Me' checkbox be displayed on login form?")
|
||||
</small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group my-4">
|
||||
<div class="d-flex align-items-center">
|
||||
<div class="switch">
|
||||
<input type="hidden" value="0" name="forgot_password">
|
||||
{!! Form::checkbox('forgot_password', 1, setting('forgot_password'), ['class' => 'switch', 'id' => 'switch-forgot-pass']) !!}
|
||||
<label for="switch-forgot-pass"></label>
|
||||
</div>
|
||||
<div class="ml-3 d-flex flex-column">
|
||||
<label class="mb-0">@lang('Forgot Password')</label>
|
||||
<small class="pt-0 text-muted">
|
||||
@lang('Enable/Disable forgot password feature.')
|
||||
</small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group my-4">
|
||||
<label for="login_reset_token_lifetime">
|
||||
@lang('Reset Token Lifetime') <br>
|
||||
<small class="text-muted">
|
||||
@lang('Number of minutes that the reset token should be considered valid.')
|
||||
</small>
|
||||
</label>
|
||||
<input type="text" name="login_reset_token_lifetime"
|
||||
class="form-control input-solid" value="{{ setting('login_reset_token_lifetime', 30) }}">
|
||||
</div>
|
||||
|
||||
<button type="submit" class="btn btn-primary">
|
||||
@lang('Update')
|
||||
</button>
|
||||
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,39 @@
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h5 class="card-title mb-1">
|
||||
@lang('Google reCAPTCHA')
|
||||
</h5>
|
||||
|
||||
<small class="text-muted d-block mb-4">
|
||||
@lang('Enable/Disable Google reCAPTCHA during the registration.')
|
||||
</small>
|
||||
|
||||
@if (! (config('captcha.secret') && config('captcha.sitekey')))
|
||||
<div class="alert alert-info">
|
||||
@lang('To utilize Google reCAPTCHA, please get your') <code>@lang('Site Key')</code>
|
||||
@lang('and') <code>@lang('Secret Key')</code>
|
||||
@lang('from')
|
||||
<a href="https://www.google.com/recaptcha/intro/index.html" target="_blank">
|
||||
<strong>@lang('reCAPTCHA Website')</strong>
|
||||
</a>,
|
||||
@lang('and update your') <code>RECAPTCHA_SITEKEY</code> @lang('and')
|
||||
<code>RECAPTCHA_SECRETKEY</code> @lang('environment variables inside') <code>.env</code>
|
||||
@lang('file').
|
||||
</div>
|
||||
@else
|
||||
@if (setting('registration.captcha.enabled'))
|
||||
{!! Form::open(['route' => 'settings.registration.captcha.disable', 'id' => 'captcha-settings-form']) !!}
|
||||
<button type="submit" class="btn btn-danger">
|
||||
@lang('Disable')
|
||||
</button>
|
||||
{!! Form::close() !!}
|
||||
@else
|
||||
{!! Form::open(['route' => 'settings.registration.captcha.enable', 'id' => 'captcha-settings-form']) !!}
|
||||
<button type="submit" class="btn btn-primary">
|
||||
@lang('Enable')
|
||||
</button>
|
||||
{!! Form::close() !!}
|
||||
@endif
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,66 @@
|
||||
<div class="card">
|
||||
<h6 class="card-header">@lang('General')</h6>
|
||||
|
||||
<div class="card-body">
|
||||
{!! Form::open(['route' => 'settings.auth.update', 'id' => 'registration-settings-form']) !!}
|
||||
|
||||
<div class="form-group mb-4">
|
||||
<div class="d-flex align-items-center">
|
||||
<div class="switch">
|
||||
<input type="hidden" value="0" name="reg_enabled">
|
||||
|
||||
<input
|
||||
type="checkbox" name="reg_enabled"
|
||||
id="switch-reg-enabled"
|
||||
class="switch" value="1"
|
||||
{{ setting('reg_enabled') ? 'checked' : '' }}>
|
||||
|
||||
<label for="switch-reg-enabled"></label>
|
||||
</div>
|
||||
<div class="ml-3 d-flex flex-column">
|
||||
<label class="mb-0">@lang('Allow Registration')</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group my-4">
|
||||
<div class="d-flex align-items-center">
|
||||
<div class="switch">
|
||||
<input type="hidden" value="0" name="tos">
|
||||
{!! Form::checkbox('tos', 1, setting('tos'), ['class' => 'switch', 'id' => 'switch-tos']) !!}
|
||||
<label for="switch-tos"></label>
|
||||
</div>
|
||||
<div class="ml-3 d-flex flex-column">
|
||||
<label class="mb-0">@lang('Terms & Conditions')</label>
|
||||
<small class="pt-0 text-muted">
|
||||
@lang('The user has to confirm that he agree with terms and conditions in order to create an account.')
|
||||
</small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group my-4">
|
||||
<div class="d-flex align-items-center">
|
||||
<div class="switch">
|
||||
<input type="hidden" value="0" name="reg_email_confirmation">
|
||||
{!! Form::checkbox('reg_email_confirmation', 1, setting('reg_email_confirmation'), ['class' => 'switch', 'id' => 'switch-reg-email-confirm']) !!}
|
||||
<label for="switch-reg-email-confirm"></label>
|
||||
</div>
|
||||
<div class="ml-3 d-flex flex-column">
|
||||
<label class="mb-0">
|
||||
@lang('Email Confirmation')
|
||||
</label>
|
||||
<small class="text-muted">
|
||||
@lang('Require email confirmation from your newly registered users.')
|
||||
</small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<button type="submit" class="btn btn-primary mt-3">
|
||||
@lang('Update')
|
||||
</button>
|
||||
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,54 @@
|
||||
<div class="card">
|
||||
<h6 class="card-header">
|
||||
@lang('Authentication Throttling')
|
||||
</h6>
|
||||
|
||||
<div class="card-body">
|
||||
{!! Form::open(['route' => 'settings.auth.update', 'id' => 'auth-throttle-settings-form']) !!}
|
||||
|
||||
<div class="form-group mb-4">
|
||||
<div class="d-flex align-items-center">
|
||||
<div class="switch">
|
||||
<input type="hidden" value="0" name="throttle_enabled">
|
||||
{!! Form::checkbox('throttle_enabled', 1, setting('throttle_enabled'), ['class' => 'switch', 'id' => 'switch-throttle']) !!}
|
||||
<label for="switch-throttle"></label>
|
||||
</div>
|
||||
<div class="ml-3 d-flex flex-column">
|
||||
<label class="mb-0">@lang('Throttle Authentication')</label>
|
||||
<small class="text-muted">
|
||||
@lang('Should the system throttle authentication attempts?')
|
||||
</small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group my-4">
|
||||
<label for="throttle_attempts">
|
||||
@lang('Maximum Number of Attempts') <br>
|
||||
<small class="text-muted">
|
||||
@lang('Maximum number of incorrect login attempts before lockout.')
|
||||
</small>
|
||||
</label>
|
||||
<input type="text" name="throttle_attempts" class="form-control input-solid"
|
||||
value="{{ setting('throttle_attempts', 10) }}">
|
||||
</div>
|
||||
|
||||
<div class="form-group my-4">
|
||||
<label for="throttle_lockout_time">
|
||||
@lang('Lockout Time') <br>
|
||||
<small class="text-muted">
|
||||
@lang('Number of minutes to lock the user out for after specified maximum number of incorrect login attempts.')
|
||||
</small>
|
||||
</label>
|
||||
|
||||
<input type="text" name="throttle_lockout_time" class="form-control input-solid"
|
||||
value="{{ setting('throttle_lockout_time', 1) }}">
|
||||
</div>
|
||||
|
||||
<button type="submit" class="btn btn-primary">
|
||||
@lang('Update')
|
||||
</button>
|
||||
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,38 @@
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h5 class="card-title mb-1">@lang('Two-Factor Authentication')</h5>
|
||||
|
||||
<small class="text-muted d-block mb-4">
|
||||
@lang('Enable/Disable Two-Factor Authentication for the application.')
|
||||
</small>
|
||||
|
||||
@if (! config('services.authy.key'))
|
||||
<div class="alert alert-info">
|
||||
@lang('In order to enable Two-Factor Authentication you have to register and create new application on')
|
||||
<a href="https://www.authy.com/" target="_blank"><strong>@lang('Authy website')</strong></a>,
|
||||
@lang('and update your') <code>AUTHY_KEY</code>
|
||||
@lang('environment variable inside') <code>.env</code> @lang('file').
|
||||
</div>
|
||||
@else
|
||||
@if (setting('2fa.enabled'))
|
||||
{!! Form::open(['route' => 'settings.auth.2fa.disable', 'id' => 'auth-2fa-settings-form']) !!}
|
||||
<button type="submit"
|
||||
class="btn btn-danger"
|
||||
data-toggle="loader"
|
||||
data-loading-text="@lang('Disabling...')">
|
||||
@lang('Disable')
|
||||
</button>
|
||||
{!! Form::close() !!}
|
||||
@else
|
||||
{!! Form::open(['route' => 'settings.auth.2fa.enable', 'id' => 'auth-2fa-settings-form']) !!}
|
||||
<button type="submit"
|
||||
class="btn btn-primary"
|
||||
data-toggle="loader"
|
||||
data-loading-text="@lang('Enabling...')">
|
||||
@lang('Enable')
|
||||
</button>
|
||||
{!! Form::close() !!}
|
||||
@endif
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user