remove ReCaptcha from views if it is disabled
This commit is contained in:
parent
207e0131fc
commit
a51cf1ff47
|
@ -62,7 +62,7 @@
|
|||
</div>
|
||||
<div class="col-xs-4">
|
||||
{!! csrf_field() !!}
|
||||
<button type="submit" class="btn btn-primary btn-block btn-flat g-recaptcha" data-sitekey="{{ config('recaptcha.website_key') }}" data-callback='onSubmit'>@lang('auth.sign_in')</button>
|
||||
<button type="submit" class="btn btn-primary btn-block btn-flat g-recaptcha" @if(config('recaptcha.enabled')) data-sitekey="{{ config('recaptcha.website_key') }}" data-callback='onSubmit' @endif>@lang('auth.sign_in')</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
@ -72,10 +72,12 @@
|
|||
|
||||
@section('scripts')
|
||||
@parent
|
||||
<script src="https://www.google.com/recaptcha/api.js" async defer></script>
|
||||
<script>
|
||||
function onSubmit(token) {
|
||||
document.getElementById("loginForm").submit();
|
||||
}
|
||||
</script>
|
||||
@if(config('recaptcha.enabled'))
|
||||
<script src="https://www.google.com/recaptcha/api.js" async defer></script>
|
||||
<script>
|
||||
function onSubmit(token) {
|
||||
document.getElementById("loginForm").submit();
|
||||
}
|
||||
</script>
|
||||
@endif
|
||||
@endsection
|
|
@ -58,7 +58,7 @@
|
|||
</div>
|
||||
<div class="col-xs-8">
|
||||
{!! csrf_field() !!}
|
||||
<button type="submit" class="btn btn-primary btn-block btn-flat g-recaptcha" data-sitekey="{{ config('recaptcha.website_key') }}" data-callback='onSubmit'>@lang('auth.request_reset')</button>
|
||||
<button type="submit" class="btn btn-primary btn-block btn-flat g-recaptcha" @if(config('recaptcha.enabled')) data-sitekey="{{ config('recaptcha.website_key') }}" data-callback='onSubmit' @endif>@lang('auth.request_reset')</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
@ -67,10 +67,12 @@
|
|||
|
||||
@section('scripts')
|
||||
@parent
|
||||
<script src="https://www.google.com/recaptcha/api.js" async defer></script>
|
||||
<script>
|
||||
function onSubmit(token) {
|
||||
document.getElementById("resetForm").submit();
|
||||
}
|
||||
</script>
|
||||
@if(config('recaptcha.enabled'))
|
||||
<script src="https://www.google.com/recaptcha/api.js" async defer></script>
|
||||
<script>
|
||||
function onSubmit(token) {
|
||||
document.getElementById("resetForm").submit();
|
||||
}
|
||||
</script>
|
||||
@endif
|
||||
@endsection
|
Loading…
Reference in New Issue