Fixed ldap settings JS error

Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
snipe 2020-04-23 14:41:20 -07:00
parent e9135eceb3
commit b01e8720dc
No known key found for this signature in database
GPG key ID: 10BFFDA3ED34B5AC

View file

@ -25,13 +25,13 @@
<div class="col-md-12">
<div class="col-md-12">
<div class="alert alert-danger">
It doesn't look like the LDAP extension is installed or enabled on this server. :(
It doesn't look like the LDAP extension is installed or enabled on this server. You can still save your settings, but you will need to enable the LDAP extension for PHP before LDAP syncing or login will work.
</div>
</div>
</div>
</div>
@else
@endif
{{ Form::open(['method' => 'POST', 'files' => false, 'autocomplete' => 'false', 'class' => 'form-horizontal', 'role' => 'form']) }}
@ -341,12 +341,12 @@
</div> <!-- /.row-->
{{Form::close()}}
@endif
@stop
@push('js')
<script nonce="{{ csrf_token() }}">
<script nonce="{{ csrf_token() }}">
/**
* Check to see if is_ad is checked, if not disable the ad_domain field
@ -395,17 +395,10 @@
error: function (data) {
$("#ldapad_test_results").html('');
} else if (data.status == 400) {
$("#ldapad_test_results").addClass('text-danger');
let errorIcon = '<i class="fa fa-exclamation-triangle text-danger"></i>' + ' ';
if (data.status == 500) {
$('#ldapad_test_results').html(errorIcon + '500 Server Error');
}
}
} else if (data.status == 400) {
let errorMessage = '';
if( typeof data.responseJSON.user_sync !== 'undefined') {
@ -458,5 +451,5 @@
body += "</tbody>"
return body;
}
</script>
</script>
@endpush