Skip to content

Commit a51cf1f

Browse files
committed
remove ReCaptcha from views if it is disabled
1 parent 207e013 commit a51cf1f

File tree

2 files changed

+18
-14
lines changed

2 files changed

+18
-14
lines changed

resources/themes/pterodactyl/auth/login.blade.php

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
</div>
6363
<div class="col-xs-4">
6464
{!! csrf_field() !!}
65-
<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>
65+
<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>
6666
</div>
6767
</div>
6868
</form>
@@ -72,10 +72,12 @@
7272

7373
@section('scripts')
7474
@parent
75-
<script src="https://www.google.com/recaptcha/api.js" async defer></script>
76-
<script>
77-
function onSubmit(token) {
78-
document.getElementById("loginForm").submit();
79-
}
80-
</script>
75+
@if(config('recaptcha.enabled'))
76+
<script src="https://www.google.com/recaptcha/api.js" async defer></script>
77+
<script>
78+
function onSubmit(token) {
79+
document.getElementById("loginForm").submit();
80+
}
81+
</script>
82+
@endif
8183
@endsection

resources/themes/pterodactyl/auth/passwords/email.blade.php

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
</div>
5959
<div class="col-xs-8">
6060
{!! csrf_field() !!}
61-
<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>
61+
<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>
6262
</div>
6363
</div>
6464
</form>
@@ -67,10 +67,12 @@
6767

6868
@section('scripts')
6969
@parent
70-
<script src="https://www.google.com/recaptcha/api.js" async defer></script>
71-
<script>
72-
function onSubmit(token) {
73-
document.getElementById("resetForm").submit();
74-
}
75-
</script>
70+
@if(config('recaptcha.enabled'))
71+
<script src="https://www.google.com/recaptcha/api.js" async defer></script>
72+
<script>
73+
function onSubmit(token) {
74+
document.getElementById("resetForm").submit();
75+
}
76+
</script>
77+
@endif
7678
@endsection

0 commit comments

Comments
 (0)