@extends('layouts/default') {{-- Page title --}} @section('title') Update LDAP/AD Settings @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 {{ Form::open(['method' => 'POST', 'files' => false, 'autocomplete' => 'off', 'class' => 'form-horizontal', 'role' => 'form']) }} {{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')) }}
{!! $errors->first('is_ad', '') !!} @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') }}

{!! $errors->first('ldap_pw_sync_help', '') !!} @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', $setting->demoMode]) }}

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

{!! $errors->first('ad_domain', '') !!} @if (config('app.lock_passwords')===true)

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

@endif
{{-- NOTICE - this was a feature for AdLdap2-based LDAP syncing, and is already handled in 'classic' LDAP, so we now hide the checkbox (but haven't deleted the field)
{{ Form::label('ad_append_domain', trans('admin/settings/general.ad_append_domain_label')) }}
{{ Form::checkbox('ad_append_domain', '1', old('ad_append_domain', $setting->ad_append_domain),['class' => 'minimal '. $setting->demoMode, $setting->demoMode]) }} {{ trans('admin/settings/general.ad_append_domain') }}

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

{!! $errors->first('ad_append_domain', ':message') !!} @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----- ", $setting->demoMode]) }} {!! $errors->first('ldap_client_tls_key', '') !!} @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-----", $setting->demoMode]) }}

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

{!! $errors->first('ldap_client_tls_cert', '') !!} @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', $setting->demoMode]) }}

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

{!! $errors->first('ldap_server', '') !!} @if (config('app.lock_passwords')===true)

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

@endif
{{ Form::label('ldap_tls', trans('admin/settings/general.ldap_tls')) }}
{!! $errors->first('ldap_tls', '') !!} @if (config('app.lock_passwords')===true)

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

@endif
{{ Form::label('ldap_server_cert_ignore', trans('admin/settings/general.ldap_server_cert')) }}
{!! $errors->first('ldap_server_cert_ignore', '') !!}

{{ 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', $setting->demoMode]) }} {!! $errors->first('ldap_uname', '') !!} @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');", $setting->demoMode, ' readonly']) }} {!! $errors->first('ldap_pword', '') !!} @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', $setting->demoMode]) }} {!! $errors->first('ldap_basedn', '') !!} @if (config('app.lock_passwords')===true)

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

@endif
{{ Form::label('ldap_filter', trans('admin/settings/general.ldap_filter')) }}
{{ Form::text('ldap_filter', old('ldap_filter', $setting->ldap_filter), ['class' => 'form-control','placeholder' => trans('general.example') .'&(cn=*)', $setting->demoMode]) }} {!! $errors->first('ldap_filter', '') !!} @if (config('app.lock_passwords')===true)

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

@endif
{{ Form::label('ldap_username_field', trans('admin/settings/general.ldap_username_field')) }}
{{ Form::text('ldap_username_field', old('ldap_username_field', $setting->ldap_username_field), ['class' => 'form-control','placeholder' => trans('general.example') .'samaccountname', $setting->demoMode]) }} {!! $errors->first('ldap_username_field', '') !!} @if (config('app.lock_passwords')===true)

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

@endif
{{ Form::label('ldap_lname_field', trans('admin/settings/general.ldap_lname_field')) }}
{{ Form::text('ldap_lname_field', old('ldap_lname_field', $setting->ldap_lname_field), ['class' => 'form-control','placeholder' => trans('general.example') .'sn', $setting->demoMode]) }} {!! $errors->first('ldap_lname_field', '') !!} @if (config('app.lock_passwords')===true)

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

@endif
{{ Form::label('ldap_fname_field', trans('admin/settings/general.ldap_fname_field')) }}
{{ Form::text('ldap_fname_field', old('ldap_fname_field', $setting->ldap_fname_field), ['class' => 'form-control', 'placeholder' => trans('general.example') .'givenname', $setting->demoMode]) }} {!! $errors->first('ldap_fname_field', '') !!} @if (config('app.lock_passwords')===true)

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

@endif
{{ Form::label('ldap_auth_filter_query', trans('admin/settings/general.ldap_auth_filter_query')) }}
{{ Form::text('ldap_auth_filter_query', old('ldap_auth_filter_query', $setting->ldap_auth_filter_query), ['class' => 'form-control','placeholder' => trans('general.example') .'uid=', $setting->demoMode]) }} {!! $errors->first('ldap_auth_filter_query', '') !!} @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

No groups have been created yet. Visit Admin Settings > Permission Groups to add one.

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

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

{!! $errors->first('ldap_active_flag', '') !!} @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', $setting->demoMode]) }} {!! $errors->first('ldap_emp_num', '') !!} @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', $setting->demoMode]) }} {!! $errors->first('ldap_dept', '') !!} @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', $setting->demoMode]) }} {!! $errors->first('ldap_manager', '') !!} @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', $setting->demoMode]) }} {!! $errors->first('ldap_email', '') !!} @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', $setting->demoMode]) }} {!! $errors->first('ldap_phone', '') !!} @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', $setting->demoMode]) }} {!! $errors->first('ldap_jobtitle', '') !!} @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', $setting->demoMode]) }} {!! $errors->first('ldap_country', '') !!} @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', $setting->demoMode]) }}

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

{!! $errors->first('ldap_location', '') !!} @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', $setting->demoMode]) }}

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

{!! $errors->first('custom_forgot_pass_url', '') !!} @if (config('app.lock_passwords')===true)

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

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