@extends('layouts/default') {{-- Page title --}} @section('title') {{ trans('admin/settings/general.ldap_ad') }} @parent @stop @section('header_right') {{ trans('general.back') }} @stop {{-- Page content --}} @section('content') @if ((!function_exists('ldap_connect')) || (!function_exists('ldap_set_option')) || (!function_exists('ldap_bind')))
{{ trans('admin/settings/general.ldap_extension_warning') }}
@endif
{{csrf_field()}}

{{ trans('admin/settings/general.ldap_ad') }}

{{ Form::label('ldap_enabled', trans('admin/settings/general.ldap_integration')) }}
@if (config('app.lock_passwords')===true)

{{ trans('general.feature_disabled') }}

@endif
{{ Form::label('is_ad', trans('admin/settings/general.ad')) }}
@error('is_ad') {{ $message }} @enderror @if (config('app.lock_passwords')===true)

{{ trans('general.feature_disabled') }}

@endif
{{ Form::label('ldap_pw_sync', trans('admin/settings/general.ldap_pw_sync')) }}

{{ trans('admin/settings/general.ldap_pw_sync_help') }}

@error('ldap_pw_sync') {{ $message }} @enderror @if (config('app.lock_passwords')===true)

{{ trans('general.feature_disabled') }}

@endif
{{ Form::label('ad_domain', trans('admin/settings/general.ad_domain')) }}
{{ Form::text('ad_domain', old('ad_domain', $setting->ad_domain), ['class' => 'form-control','placeholder' => trans('general.example') .'example.com']) }}

{{ trans('admin/settings/general.ad_domain_help') }}

@error('ad_domain') {{ $message }} @enderror @if (config('app.lock_passwords')===true)

{{ trans('general.feature_disabled') }}

@endif
{{ Form::label('ldap_client_tls_key', trans('admin/settings/general.ldap_client_tls_key')) }}
{{ Form::textarea('ldap_client_tls_key', old('ldap_client_tls_key', $setting->ldap_client_tls_key), ['class' => 'form-control','placeholder' => trans('general.example') .'-----BEGIN RSA PRIVATE KEY-----'."\r\n1234567890\r\n-----END RSA PRIVATE KEY-----"]) }} @error('ldap_client_tls_key') {{ $message }} @enderror @if (config('app.lock_passwords')===true)

{{ trans('general.feature_disabled') }}

@endif
{{ Form::label('ldap_client_tls_cert', trans('admin/settings/general.ldap_client_tls_cert')) }}
{{ Form::textarea('ldap_client_tls_cert', old('ldap_client_tls_cert', $setting->ldap_client_tls_cert), ['class' => 'form-control','placeholder' => trans('general.example') .'-----BEGIN CERTIFICATE-----'."\r\n1234567890\r\n-----END CERTIFICATE-----"]) }}

{{ trans('admin/settings/general.ldap_client_tls_cert_help') }}

@error('ldap_client_tls_cert') {{ $message }} @enderror @if (config('app.lock_passwords')===true)

{{ trans('general.feature_disabled') }}

@endif
{{ Form::label('ldap_server', trans('admin/settings/general.ldap_server')) }}
{{ Form::text('ldap_server', old('ldap_server', $setting->ldap_server), ['class' => 'form-control','placeholder' => trans('general.example') .'ldap://ldap.example.com']) }} @error('ldap_server') {{ $message }} @enderror

{{ trans('admin/settings/general.ldap_server_help') }}

@if (config('app.lock_passwords')===true)

{{ trans('general.feature_disabled') }}

@endif
{{ Form::label('ldap_tls', trans('admin/settings/general.ldap_tls')) }}
@error('ldap_tls') {{ $message }} @enderror @if (config('app.lock_passwords')===true)

{{ trans('general.feature_disabled') }}

@endif
{{ Form::label('ldap_server_cert_ignore', trans('admin/settings/general.ldap_server_cert')) }}
@error('ldap_server_cert_ignore') {{ $message }} @enderror

{{ trans('admin/settings/general.ldap_server_cert_help') }}

@if (config('app.lock_passwords')===true)

{{ trans('general.feature_disabled') }}

@endif
{{ Form::label('ldap_uname', trans('admin/settings/general.ldap_uname')) }}
{{ Form::text('ldap_uname', old('ldap_uname', $setting->ldap_uname), ['class' => 'form-control','autocomplete' => 'off', 'placeholder' => trans('general.example') .'binduser@example.com']) }} @error('ldap_uname') {{ $message }} @enderror @if (config('app.lock_passwords')===true)

{{ trans('general.feature_disabled') }}

@endif
{{ Form::label('ldap_pword', trans('admin/settings/general.ldap_pword')) }}
{{ Form::password('ldap_pword', ['class' => 'form-control', 'autocomplete' => 'off', 'onfocus' => "this.removeAttribute('readonly');", ' readonly']) }} @error('ldap_pword') {{ $message }} @enderror @if (config('app.lock_passwords')===true)

{{ trans('general.feature_disabled') }}

@endif
{{ Form::label('ldap_basedn', trans('admin/settings/general.ldap_basedn')) }}
{{ Form::text('ldap_basedn', old('ldap_basedn', $setting->ldap_basedn), ['class' => 'form-control', 'placeholder' => trans('general.example') .'cn=users/authorized,dc=example,dc=com']) }} @error('ldap_basedn') {{ $message }} @enderror @if (config('app.lock_passwords')===true)

{{ trans('general.feature_disabled') }}

@endif
{{ Form::label('ldap_filter', trans('admin/settings/general.ldap_filter')) }}
@error('ldap_filter') {{ $message }} @enderror @if (config('app.lock_passwords')===true)

{{ trans('general.feature_disabled') }}

@endif
{{ Form::label('ldap_username_field', trans('admin/settings/general.ldap_username_field')) }}
@error('ldap_username_field') {!! $message !!} @enderror @if (config('app.lock_passwords')===true)

{{ trans('general.feature_disabled') }}

@endif
{{ Form::label('ldap_lname_field', trans('admin/settings/general.ldap_lname_field')) }}
@error('ldap_lname_field') {{ $message }} @enderror @if (config('app.lock_passwords')===true)

{{ trans('general.feature_disabled') }}

@endif
{{ Form::label('ldap_fname_field', trans('admin/settings/general.ldap_fname_field')) }}
@error('ldap_fname_field') {{ $message }} @enderror @if (config('app.lock_passwords')===true)

{{ trans('general.feature_disabled') }}

@endif
@error('ldap_auth_filter_query') {!! $message !!} @enderror @if (config('app.lock_passwords')===true)

{{ trans('general.feature_disabled') }}

@endif
{{ Form::label('ldap_default_group', trans('admin/settings/general.ldap_default_group')) }}
@if ($groups->count()) @if ((Config::get('app.lock_passwords') || (!Auth::user()->isSuperUser())))
    @foreach ($groups as $id => $group) {!! '
  • '.e($group).'
  • ' !!} @endforeach
{{ trans('admin/users/general.group_memberships_helpblock') }} @else
{{ trans('admin/settings/general.ldap_default_group_info') }}
@endif @else

{!! trans('admin/settings/general.no_groups') !!}

@endif
{{ Form::label('ldap_active_flag', trans('admin/settings/general.ldap_active_flag')) }}

{!! trans('admin/settings/general.ldap_activated_flag_help') !!}

@error('ldap_active_flag') {{ $message }} @enderror @if (config('app.lock_passwords')===true)

{{ trans('general.feature_disabled') }}

@endif
{{ Form::label('ldap_emp_num', trans('admin/settings/general.ldap_emp_num')) }}
{{ Form::text('ldap_emp_num', old('ldap_emp_num', $setting->ldap_emp_num), ['class' => 'form-control','placeholder' => trans('general.example') .'employeenumber/employeeid']) }} @error('ldap_emp_num') {{ $message }} @enderror @if (config('app.lock_passwords')===true)

{{ trans('general.feature_disabled') }}

@endif
{{ Form::label('ldap_dept', trans('admin/settings/general.ldap_dept')) }}
{{ Form::text('ldap_dept', old('ldap_dept', $setting->ldap_dept), ['class' => 'form-control','placeholder' => trans('general.example') .'department']) }} @error('ldap_dept') {{ $message }} @enderror @if (config('app.lock_passwords')===true)

{{ trans('general.feature_disabled') }}

@endif
{{ Form::label('ldap_dept', trans('admin/settings/general.ldap_manager')) }}
{{ Form::text('ldap_manager', old('ldap_manager', $setting->ldap_manager), ['class' => 'form-control','placeholder' => trans('general.example') .'manager']) }} @error('ldap_manager') {{ $message }} @enderror @if (config('app.lock_passwords')===true)

{{ trans('general.feature_disabled') }}

@endif
{{ Form::label('ldap_email', trans('admin/settings/general.ldap_email')) }}
{{ Form::text('ldap_email', old('ldap_email', $setting->ldap_email), ['class' => 'form-control','placeholder' => trans('general.example') .'mail']) }} @error('ldap_email') {{ $message }} @enderror @if (config('app.lock_passwords')===true)

{{ trans('general.feature_disabled') }}

@endif
{{ Form::label('ldap_phone', trans('admin/settings/general.ldap_phone')) }}
{{ Form::text('ldap_phone', old('ldap_phone', $setting->ldap_phone_field), ['class' => 'form-control','placeholder' => trans('general.example') .'telephonenumber']) }} @error('ldap_phone') {{ $message }} @enderror @if (config('app.lock_passwords')===true)

{{ trans('general.feature_disabled') }}

@endif
{{ Form::label('ldap_jobtitle', trans('admin/settings/general.ldap_jobtitle')) }}
{{ Form::text('ldap_jobtitle', old('ldap_jobtitle', $setting->ldap_jobtitle), ['class' => 'form-control','placeholder' => trans('general.example') .'title']) }} @error('ldap_jobtitle') {{ $message }} @enderror @if (config('app.lock_passwords')===true)

{{ trans('general.feature_disabled') }}

@endif
{{ Form::label('ldap_country', trans('admin/settings/general.ldap_country')) }}
{{ Form::text('ldap_country', old('ldap_country', $setting->ldap_country), ['class' => 'form-control','placeholder' => trans('general.example') .'c']) }} @error('ldap_country') {{ $message }} @enderror @if (config('app.lock_passwords')===true)

{{ trans('general.feature_disabled') }}

@endif
{{ Form::label('ldap_location', trans('admin/settings/general.ldap_location')) }}
{{ Form::text('ldap_location', old('ldap_location', $setting->ldap_location), ['class' => 'form-control','placeholder' => trans('general.example') .'physicaldeliveryofficename']) }}

{!! trans('admin/settings/general.ldap_location_help') !!}

@error('ldap_location') {{ $message }} @enderror @if (config('app.lock_passwords')===true)

{{ trans('general.feature_disabled') }}

@endif
@if ($setting->ldap_enabled)
{{ Form::label('test_ldap_sync', 'Test LDAP Sync') }}

{{ trans('admin/settings/general.ldap_login_sync_help') }}

@if (config('app.lock_passwords')===true)

{{ trans('general.feature_disabled') }}

@endif
{{ Form::label('test_ldap_login', 'Test LDAP Login') }}

{{ trans('admin/settings/general.ldap_login_test_help') }}

@endif
{{ Form::label('custom_forgot_pass_url', trans('admin/settings/general.custom_forgot_pass_url')) }}
{{ Form::text('custom_forgot_pass_url', old('custom_forgot_pass_url', $setting->custom_forgot_pass_url), ['class' => 'form-control','placeholder' => trans('general.example') .'https://my.ldapserver-forgotpass.com']) }}

{{ trans('admin/settings/general.custom_forgot_pass_url_help') }}

@error('custom_forgot_pass_url') {{ $message }} @enderror @if (config('app.lock_passwords')===true)

{{ trans('general.feature_disabled') }}

@endif
{{Form::close()}} @endsection @push('js') @endpush