mirror of
https://github.com/snipe/snipe-it.git
synced 2025-01-11 22:07:29 -08:00
Blade changes for ldap
Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
parent
710e738e8e
commit
aa8048ac15
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
{{-- Page title --}}
|
{{-- Page title --}}
|
||||||
@section('title')
|
@section('title')
|
||||||
Update LDAP/AD Settings
|
{{ trans('admin/settings/general.ldap_ad') }}
|
||||||
@parent
|
@parent
|
||||||
@stop
|
@stop
|
||||||
|
|
||||||
|
@ -76,7 +76,7 @@
|
||||||
<div class="col-md-8">
|
<div class="col-md-8">
|
||||||
|
|
||||||
<label class="form-control">
|
<label class="form-control">
|
||||||
{{ Form::checkbox('ldap_enabled', '1', old('ldap_enabled', $setting->ldap_enabled), [((config('app.lock_passwords')===true)) ? 'disabled ': '', 'class' => 'form-control '. $setting->demoMode, $setting->demoMode]) }}
|
{{ Form::checkbox('ldap_enabled', '1', old('ldap_enabled', $setting->ldap_enabled), [((config('app.lock_passwords')===true)) ? 'disabled ': '', 'id' => 'ldap_enabled', 'class' => 'form-control '. $setting->demoMode, $setting->demoMode]) }}
|
||||||
{{ trans('admin/settings/general.ldap_enabled') }}
|
{{ trans('admin/settings/general.ldap_enabled') }}
|
||||||
</label>
|
</label>
|
||||||
@if (config('app.lock_passwords')===true)
|
@if (config('app.lock_passwords')===true)
|
||||||
|
@ -93,10 +93,12 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-8">
|
<div class="col-md-8">
|
||||||
<label class="form-control">
|
<label class="form-control">
|
||||||
{{ Form::checkbox('is_ad', '1', old('is_ad', $setting->is_ad), [((config('app.lock_passwords')===true)) ? 'disabled ': '', 'class' => 'minimal '. $setting->demoMode, $setting->demoMode]) }}
|
{{ Form::checkbox('is_ad', '1', old('is_ad', $setting->is_ad), [((config('app.lock_passwords')===true)) ? 'disabled ': '', 'class' => $setting->demoMode, $setting->demoMode]) }}
|
||||||
{{ trans('admin/settings/general.is_ad') }}
|
{{ trans('admin/settings/general.is_ad') }}
|
||||||
</label>
|
</label>
|
||||||
{!! $errors->first('is_ad', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
@error('is_ad')
|
||||||
|
<span class="alert-msg" aria-hidden="true">{{ $message }}</span>
|
||||||
|
@enderror
|
||||||
|
|
||||||
@if (config('app.lock_passwords')===true)
|
@if (config('app.lock_passwords')===true)
|
||||||
<p class="text-warning"><i class="fas fa-lock" aria-hidden="true"></i> {{ trans('general.feature_disabled') }}</p>
|
<p class="text-warning"><i class="fas fa-lock" aria-hidden="true"></i> {{ trans('general.feature_disabled') }}</p>
|
||||||
|
@ -116,7 +118,9 @@
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
<p class="help-block">{{ trans('admin/settings/general.ldap_pw_sync_help') }}</p>
|
<p class="help-block">{{ trans('admin/settings/general.ldap_pw_sync_help') }}</p>
|
||||||
{!! $errors->first('ldap_pw_sync_help', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
@error('ldap_pw_sync')
|
||||||
|
<span class="alert-msg" aria-hidden="true">{{ $message }}</span>
|
||||||
|
@enderror
|
||||||
@if (config('app.lock_passwords')===true)
|
@if (config('app.lock_passwords')===true)
|
||||||
<p class="text-warning"><i class="fas fa-lock" aria-hidden="true"></i> {{ trans('general.feature_disabled') }}</p>
|
<p class="text-warning"><i class="fas fa-lock" aria-hidden="true"></i> {{ trans('general.feature_disabled') }}</p>
|
||||||
@endif
|
@endif
|
||||||
|
@ -132,29 +136,15 @@
|
||||||
<div class="col-md-8">
|
<div class="col-md-8">
|
||||||
{{ Form::text('ad_domain', old('ad_domain', $setting->ad_domain), ['class' => 'form-control','placeholder' => trans('general.example') .'example.com', $setting->demoMode]) }}
|
{{ Form::text('ad_domain', old('ad_domain', $setting->ad_domain), ['class' => 'form-control','placeholder' => trans('general.example') .'example.com', $setting->demoMode]) }}
|
||||||
<p class="help-block">{{ trans('admin/settings/general.ad_domain_help') }}</p>
|
<p class="help-block">{{ trans('admin/settings/general.ad_domain_help') }}</p>
|
||||||
{!! $errors->first('ad_domain', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
@error('ad_domain')
|
||||||
|
<span class="alert-msg" aria-hidden="true">{{ $message }}</span>
|
||||||
|
@enderror
|
||||||
@if (config('app.lock_passwords')===true)
|
@if (config('app.lock_passwords')===true)
|
||||||
<p class="text-warning"><i class="fas fa-lock" aria-hidden="true"></i> {{ trans('general.feature_disabled') }}</p>
|
<p class="text-warning"><i class="fas fa-lock" aria-hidden="true"></i> {{ trans('general.feature_disabled') }}</p>
|
||||||
@endif
|
@endif
|
||||||
</div>
|
</div>
|
||||||
</div><!-- AD Domain -->
|
</div><!-- AD Domain -->
|
||||||
|
|
||||||
{{-- 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) <!-- AD Append Domain -->
|
|
||||||
<div class="form-group">
|
|
||||||
<div class="col-md-3">
|
|
||||||
{{ Form::label('ad_append_domain', trans('admin/settings/general.ad_append_domain_label')) }}
|
|
||||||
</div>
|
|
||||||
<div class="col-md-8">
|
|
||||||
{{ 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') }}
|
|
||||||
<p class="help-block">{{ trans('admin/settings/general.ad_append_domain_help') }}</p>
|
|
||||||
{!! $errors->first('ad_append_domain', '<span class="alert-msg">:message</span>') !!}
|
|
||||||
@if (config('app.lock_passwords')===true)
|
|
||||||
<p class="text-warning"><i class="fas fa-lock" aria-hidden="true"></i> {{ trans('general.feature_disabled') }}</p>
|
|
||||||
@endif
|
|
||||||
</div>
|
|
||||||
</div> --}}
|
|
||||||
|
|
||||||
<!-- LDAP Client-Side TLS key -->
|
<!-- LDAP Client-Side TLS key -->
|
||||||
<div class="form-group {{ $errors->has('ldap_client_tls_key') ? 'error' : '' }}">
|
<div class="form-group {{ $errors->has('ldap_client_tls_key') ? 'error' : '' }}">
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
|
@ -163,7 +153,9 @@
|
||||||
<div class="col-md-8">
|
<div class="col-md-8">
|
||||||
{{ 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-----
|
{{ 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]) }}
|
", $setting->demoMode]) }}
|
||||||
{!! $errors->first('ldap_client_tls_key', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
@error('ldap_client_tls_key')
|
||||||
|
<span class="alert-msg" aria-hidden="true">{{ $message }}</span>
|
||||||
|
@enderror
|
||||||
@if (config('app.lock_passwords')===true)
|
@if (config('app.lock_passwords')===true)
|
||||||
<p class="text-warning"><i class="fas fa-lock" aria-hidden="true"></i> {{ trans('general.feature_disabled') }}</p>
|
<p class="text-warning"><i class="fas fa-lock" aria-hidden="true"></i> {{ trans('general.feature_disabled') }}</p>
|
||||||
@endif
|
@endif
|
||||||
|
@ -178,7 +170,9 @@
|
||||||
<div class="col-md-8">
|
<div class="col-md-8">
|
||||||
{{ 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]) }}
|
{{ 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]) }}
|
||||||
<p class="help-block">{{ trans('admin/settings/general.ldap_client_tls_cert_help') }}</p>
|
<p class="help-block">{{ trans('admin/settings/general.ldap_client_tls_cert_help') }}</p>
|
||||||
{!! $errors->first('ldap_client_tls_cert', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
@error('ldap_client_tls_cert')
|
||||||
|
<span class="alert-msg" aria-hidden="true">{{ $message }}</span>
|
||||||
|
@enderror
|
||||||
@if (config('app.lock_passwords')===true)
|
@if (config('app.lock_passwords')===true)
|
||||||
<p class="text-warning"><i class="fas fa-lock" aria-hidden="true"></i> {{ trans('general.feature_disabled') }}</p>
|
<p class="text-warning"><i class="fas fa-lock" aria-hidden="true"></i> {{ trans('general.feature_disabled') }}</p>
|
||||||
@endif
|
@endif
|
||||||
|
@ -192,8 +186,10 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-8">
|
<div class="col-md-8">
|
||||||
{{ Form::text('ldap_server', old('ldap_server', $setting->ldap_server), ['class' => 'form-control','placeholder' => trans('general.example') .'ldap://ldap.example.com', $setting->demoMode]) }}
|
{{ Form::text('ldap_server', old('ldap_server', $setting->ldap_server), ['class' => 'form-control','placeholder' => trans('general.example') .'ldap://ldap.example.com', $setting->demoMode]) }}
|
||||||
|
@error('ldap_server')
|
||||||
|
<span class="alert-msg" aria-hidden="true">{{ $message }}</span>
|
||||||
|
@enderror
|
||||||
<p class="help-block">{{ trans('admin/settings/general.ldap_server_help') }}</p>
|
<p class="help-block">{{ trans('admin/settings/general.ldap_server_help') }}</p>
|
||||||
{!! $errors->first('ldap_server', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
|
||||||
@if (config('app.lock_passwords')===true)
|
@if (config('app.lock_passwords')===true)
|
||||||
<p class="text-warning"><i class="fas fa-lock" aria-hidden="true"></i> {{ trans('general.feature_disabled') }}</p>
|
<p class="text-warning"><i class="fas fa-lock" aria-hidden="true"></i> {{ trans('general.feature_disabled') }}</p>
|
||||||
@endif
|
@endif
|
||||||
|
@ -210,7 +206,9 @@
|
||||||
{{ Form::checkbox('ldap_tls', '1', old('ldap_tls', $setting->ldap_tls),['class' => 'minimal '. $setting->demoMode, $setting->demoMode]) }}
|
{{ Form::checkbox('ldap_tls', '1', old('ldap_tls', $setting->ldap_tls),['class' => 'minimal '. $setting->demoMode, $setting->demoMode]) }}
|
||||||
{{ trans('admin/settings/general.ldap_tls_help') }}
|
{{ trans('admin/settings/general.ldap_tls_help') }}
|
||||||
</label>
|
</label>
|
||||||
{!! $errors->first('ldap_tls', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
@error('ldap_tls')
|
||||||
|
<span class="alert-msg" aria-hidden="true">{{ $message }}</span>
|
||||||
|
@enderror
|
||||||
@if (config('app.lock_passwords')===true)
|
@if (config('app.lock_passwords')===true)
|
||||||
<p class="text-warning"><i class="fas fa-lock" aria-hidden="true"></i> {{ trans('general.feature_disabled') }}</p>
|
<p class="text-warning"><i class="fas fa-lock" aria-hidden="true"></i> {{ trans('general.feature_disabled') }}</p>
|
||||||
@endif
|
@endif
|
||||||
|
@ -224,10 +222,12 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-8">
|
<div class="col-md-8">
|
||||||
<label class="form-control">
|
<label class="form-control">
|
||||||
{{ Form::checkbox('ldap_server_cert_ignore', '1', old('ldap_server_cert_ignore', $setting->ldap_server_cert_ignore),['class' => 'minimal '. $setting->demoMode, $setting->demoMode]) }}
|
{{ Form::checkbox('ldap_server_cert_ignore', '1', old('ldap_server_cert_ignore', $setting->ldap_server_cert_ignore),['class' => $setting->demoMode, $setting->demoMode]) }}
|
||||||
{{ trans('admin/settings/general.ldap_server_cert_ignore') }}
|
{{ trans('admin/settings/general.ldap_server_cert_ignore') }}
|
||||||
</label>
|
</label>
|
||||||
{!! $errors->first('ldap_server_cert_ignore', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
@error('ldap_server_cert_ignore')
|
||||||
|
<span class="alert-msg" aria-hidden="true">{{ $message }}</span>
|
||||||
|
@enderror
|
||||||
<p class="help-block">{{ trans('admin/settings/general.ldap_server_cert_help') }}</p>
|
<p class="help-block">{{ trans('admin/settings/general.ldap_server_cert_help') }}</p>
|
||||||
@if (config('app.lock_passwords')===true)
|
@if (config('app.lock_passwords')===true)
|
||||||
<p class="text-warning"><i class="fas fa-lock" aria-hidden="true"></i> {{ trans('general.feature_disabled') }}</p>
|
<p class="text-warning"><i class="fas fa-lock" aria-hidden="true"></i> {{ trans('general.feature_disabled') }}</p>
|
||||||
|
@ -242,8 +242,9 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-8">
|
<div class="col-md-8">
|
||||||
{{ Form::text('ldap_uname', old('ldap_uname', $setting->ldap_uname), ['class' => 'form-control','autocomplete' => 'off', 'placeholder' => trans('general.example') .'binduser@example.com', $setting->demoMode]) }}
|
{{ 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', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
@error('ldap_uname')
|
||||||
@if (config('app.lock_passwords')===true)
|
<span class="alert-msg" aria-hidden="true">{{ $message }}</span>
|
||||||
|
@enderror @if (config('app.lock_passwords')===true)
|
||||||
<p class="text-warning"><i class="fas fa-lock" aria-hidden="true"></i> {{ trans('general.feature_disabled') }}</p>
|
<p class="text-warning"><i class="fas fa-lock" aria-hidden="true"></i> {{ trans('general.feature_disabled') }}</p>
|
||||||
@endif
|
@endif
|
||||||
</div>
|
</div>
|
||||||
|
@ -256,7 +257,9 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-8">
|
<div class="col-md-8">
|
||||||
{{ Form::password('ldap_pword', ['class' => 'form-control', 'autocomplete' => 'off', 'onfocus' => "this.removeAttribute('readonly');", $setting->demoMode, ' readonly']) }}
|
{{ Form::password('ldap_pword', ['class' => 'form-control', 'autocomplete' => 'off', 'onfocus' => "this.removeAttribute('readonly');", $setting->demoMode, ' readonly']) }}
|
||||||
{!! $errors->first('ldap_pword', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
@error('ldap_pword')
|
||||||
|
<span class="alert-msg" aria-hidden="true">{{ $message }}</span>
|
||||||
|
@enderror
|
||||||
@if (config('app.lock_passwords')===true)
|
@if (config('app.lock_passwords')===true)
|
||||||
<p class="text-warning"><i class="fas fa-lock" aria-hidden="true"></i> {{ trans('general.feature_disabled') }}</p>
|
<p class="text-warning"><i class="fas fa-lock" aria-hidden="true"></i> {{ trans('general.feature_disabled') }}</p>
|
||||||
@endif
|
@endif
|
||||||
|
@ -270,7 +273,9 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-8">
|
<div class="col-md-8">
|
||||||
{{ 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]) }}
|
{{ 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', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
@error('ldap_basedn')
|
||||||
|
<span class="alert-msg" aria-hidden="true">{{ $message }}</span>
|
||||||
|
@enderror
|
||||||
@if (config('app.lock_passwords')===true)
|
@if (config('app.lock_passwords')===true)
|
||||||
<p class="text-warning"><i class="fas fa-lock" aria-hidden="true"></i> {{ trans('general.feature_disabled') }}</p>
|
<p class="text-warning"><i class="fas fa-lock" aria-hidden="true"></i> {{ trans('general.feature_disabled') }}</p>
|
||||||
@endif
|
@endif
|
||||||
|
@ -283,8 +288,10 @@
|
||||||
{{ Form::label('ldap_filter', trans('admin/settings/general.ldap_filter')) }}
|
{{ Form::label('ldap_filter', trans('admin/settings/general.ldap_filter')) }}
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-8">
|
<div class="col-md-8">
|
||||||
{{ Form::text('ldap_filter', old('ldap_filter', $setting->ldap_filter), ['class' => 'form-control','placeholder' => trans('general.example') .'&(cn=*)', $setting->demoMode]) }}
|
<input type="text" name="ldap_filter" id="ldap_filter" value="{{ old('ldap_filter', $setting->ldap_filter) }}" class="form-control" placeholder="{{ trans('general.example') .'&(cn=*)' }}">
|
||||||
{!! $errors->first('ldap_filter', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
@error('ldap_filter')
|
||||||
|
<span class="alert-msg" aria-hidden="true">{{ $message }}</span>
|
||||||
|
@enderror
|
||||||
@if (config('app.lock_passwords')===true)
|
@if (config('app.lock_passwords')===true)
|
||||||
<p class="text-warning"><i class="fas fa-lock" aria-hidden="true"></i> {{ trans('general.feature_disabled') }}</p>
|
<p class="text-warning"><i class="fas fa-lock" aria-hidden="true"></i> {{ trans('general.feature_disabled') }}</p>
|
||||||
@endif
|
@endif
|
||||||
|
@ -297,8 +304,10 @@
|
||||||
{{ Form::label('ldap_username_field', trans('admin/settings/general.ldap_username_field')) }}
|
{{ Form::label('ldap_username_field', trans('admin/settings/general.ldap_username_field')) }}
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-8">
|
<div class="col-md-8">
|
||||||
{{ Form::text('ldap_username_field', old('ldap_username_field', $setting->ldap_username_field), ['class' => 'form-control','placeholder' => trans('general.example') .'samaccountname', $setting->demoMode]) }}
|
<input type="text" name="ldap_username_field" id="ldap_username_field" value="{{ old('ldap_username_field', $setting->ldap_username_field) }}" class="form-control" placeholder="{{ trans('general.example') .'samaccountname' }}">
|
||||||
{!! $errors->first('ldap_username_field', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
@error('ldap_username_field')
|
||||||
|
<span class="alert-msg" aria-hidden="true">{!! $message !!} </span>
|
||||||
|
@enderror
|
||||||
@if (config('app.lock_passwords')===true)
|
@if (config('app.lock_passwords')===true)
|
||||||
<p class="text-warning"><i class="fas fa-lock" aria-hidden="true"></i> {{ trans('general.feature_disabled') }}</p>
|
<p class="text-warning"><i class="fas fa-lock" aria-hidden="true"></i> {{ trans('general.feature_disabled') }}</p>
|
||||||
@endif
|
@endif
|
||||||
|
@ -311,8 +320,10 @@
|
||||||
{{ Form::label('ldap_lname_field', trans('admin/settings/general.ldap_lname_field')) }}
|
{{ Form::label('ldap_lname_field', trans('admin/settings/general.ldap_lname_field')) }}
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-8">
|
<div class="col-md-8">
|
||||||
{{ Form::text('ldap_lname_field', old('ldap_lname_field', $setting->ldap_lname_field), ['class' => 'form-control','placeholder' => trans('general.example') .'sn', $setting->demoMode]) }}
|
<input type="text" name="ldap_lname_field" id="ldap_lname_field" value="{{ old('ldap_lname_field', $setting->ldap_lname_field) }}" class="form-control" placeholder="{{ trans('general.example') .'sn' }}">
|
||||||
{!! $errors->first('ldap_lname_field', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
@error('ldap_lname_field')
|
||||||
|
<span class="alert-msg" aria-hidden="true">{{ $message }}</span>
|
||||||
|
@enderror
|
||||||
@if (config('app.lock_passwords')===true)
|
@if (config('app.lock_passwords')===true)
|
||||||
<p class="text-warning">
|
<p class="text-warning">
|
||||||
<i class="fas fa-lock" aria-hidden="true"></i>
|
<i class="fas fa-lock" aria-hidden="true"></i>
|
||||||
|
@ -328,7 +339,7 @@
|
||||||
{{ Form::label('ldap_fname_field', trans('admin/settings/general.ldap_fname_field')) }}
|
{{ Form::label('ldap_fname_field', trans('admin/settings/general.ldap_fname_field')) }}
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-8">
|
<div class="col-md-8">
|
||||||
{{ Form::text('ldap_fname_field', old('ldap_fname_field', $setting->ldap_fname_field), ['class' => 'form-control', 'placeholder' => trans('general.example') .'givenname', $setting->demoMode]) }}
|
<input type="text" name="ldap_fname_field" id="ldap_fname_field" value="{{ old('ldap_fname_field', $setting->ldap_fname_field) }}" class="form-control" placeholder="{{ trans('general.example') .'givenname' }}" {{ $setting->demoMode }}>
|
||||||
{!! $errors->first('ldap_fname_field', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
{!! $errors->first('ldap_fname_field', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
||||||
@if (config('app.lock_passwords')===true)
|
@if (config('app.lock_passwords')===true)
|
||||||
<p class="text-warning"><i class="fas fa-lock" aria-hidden="true"></i> {{ trans('general.feature_disabled') }}</p>
|
<p class="text-warning"><i class="fas fa-lock" aria-hidden="true"></i> {{ trans('general.feature_disabled') }}</p>
|
||||||
|
@ -339,7 +350,7 @@
|
||||||
<!-- LDAP Auth Filter Query -->
|
<!-- LDAP Auth Filter Query -->
|
||||||
<div class="form-group {{ $errors->has('ldap_auth_filter_query') ? 'error' : '' }}">
|
<div class="form-group {{ $errors->has('ldap_auth_filter_query') ? 'error' : '' }}">
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
{{ Form::label('ldap_auth_filter_query', trans('admin/settings/general.ldap_auth_filter_query')) }}
|
<label for="ldap_auth_filter_query">{{ trans('admin/settings/general.ldap_auth_filter_query') }}</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-8">
|
<div class="col-md-8">
|
||||||
|
|
||||||
|
@ -368,7 +379,6 @@
|
||||||
@endforeach
|
@endforeach
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
<span class="help-block">{{ trans('admin/users/general.group_memberships_helpblock') }}</span>
|
<span class="help-block">{{ trans('admin/users/general.group_memberships_helpblock') }}</span>
|
||||||
@else
|
@else
|
||||||
<div class="controls">
|
<div class="controls">
|
||||||
|
@ -387,7 +397,7 @@
|
||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
@else
|
@else
|
||||||
<p>No groups have been created yet. Visit <code>Admin Settings > Permission Groups</code> to add one.</p>
|
<p>{!! trans('admin/settings/general.no_groups') !!}</p>
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
@ -399,11 +409,12 @@
|
||||||
{{ Form::label('ldap_active_flag', trans('admin/settings/general.ldap_active_flag')) }}
|
{{ Form::label('ldap_active_flag', trans('admin/settings/general.ldap_active_flag')) }}
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-8">
|
<div class="col-md-8">
|
||||||
{{ Form::text('ldap_active_flag', old('ldap_active_flag', $setting->ldap_active_flag), ['class' => 'form-control', $setting->demoMode]) }}
|
<input type="text" name="ldap_active_flag" id="ldap_active_flag" value="{{ old('ldap_active_flag', $setting->ldap_active_flag) }}" class="form-control" {{ $setting->demoMode }}>
|
||||||
|
|
||||||
<p class="help-block">{!! trans('admin/settings/general.ldap_activated_flag_help') !!}</p>
|
<p class="help-block">{!! trans('admin/settings/general.ldap_activated_flag_help') !!}</p>
|
||||||
|
|
||||||
{!! $errors->first('ldap_active_flag', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
@error('ldap_active_flag')
|
||||||
|
<span class="alert-msg" aria-hidden="true">{{ $message }}</span>
|
||||||
|
@enderror
|
||||||
@if (config('app.lock_passwords')===true)
|
@if (config('app.lock_passwords')===true)
|
||||||
<p class="text-warning"><i class="fas fa-lock" aria-hidden="true"></i> {{ trans('general.feature_disabled') }}</p>
|
<p class="text-warning"><i class="fas fa-lock" aria-hidden="true"></i> {{ trans('general.feature_disabled') }}</p>
|
||||||
@endif
|
@endif
|
||||||
|
@ -417,7 +428,9 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-8">
|
<div class="col-md-8">
|
||||||
{{ Form::text('ldap_emp_num', old('ldap_emp_num', $setting->ldap_emp_num), ['class' => 'form-control','placeholder' => trans('general.example') .'employeenumber/employeeid', $setting->demoMode]) }}
|
{{ 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', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
@error('ldap_emp_num')
|
||||||
|
<span class="alert-msg" aria-hidden="true">{{ $message }}</span>
|
||||||
|
@enderror
|
||||||
@if (config('app.lock_passwords')===true)
|
@if (config('app.lock_passwords')===true)
|
||||||
<p class="text-warning"><i class="fas fa-lock" aria-hidden="true"></i> {{ trans('general.feature_disabled') }}</p>
|
<p class="text-warning"><i class="fas fa-lock" aria-hidden="true"></i> {{ trans('general.feature_disabled') }}</p>
|
||||||
@endif
|
@endif
|
||||||
|
@ -430,7 +443,9 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-8">
|
<div class="col-md-8">
|
||||||
{{ Form::text('ldap_dept', old('ldap_dept', $setting->ldap_dept), ['class' => 'form-control','placeholder' => trans('general.example') .'department', $setting->demoMode]) }}
|
{{ Form::text('ldap_dept', old('ldap_dept', $setting->ldap_dept), ['class' => 'form-control','placeholder' => trans('general.example') .'department', $setting->demoMode]) }}
|
||||||
{!! $errors->first('ldap_dept', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
@error('ldap_dept')
|
||||||
|
<span class="alert-msg" aria-hidden="true">{{ $message }}</span>
|
||||||
|
@enderror
|
||||||
@if (config('app.lock_passwords')===true)
|
@if (config('app.lock_passwords')===true)
|
||||||
<p class="text-warning"><i class="fas fa-lock" aria-hidden="true"></i> {{ trans('general.feature_disabled') }}</p>
|
<p class="text-warning"><i class="fas fa-lock" aria-hidden="true"></i> {{ trans('general.feature_disabled') }}</p>
|
||||||
@endif
|
@endif
|
||||||
|
@ -443,7 +458,9 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-8">
|
<div class="col-md-8">
|
||||||
{{ Form::text('ldap_manager', old('ldap_manager', $setting->ldap_manager), ['class' => 'form-control','placeholder' => trans('general.example') .'manager', $setting->demoMode]) }}
|
{{ Form::text('ldap_manager', old('ldap_manager', $setting->ldap_manager), ['class' => 'form-control','placeholder' => trans('general.example') .'manager', $setting->demoMode]) }}
|
||||||
{!! $errors->first('ldap_manager', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
@error('ldap_manager')
|
||||||
|
<span class="alert-msg" aria-hidden="true">{{ $message }}</span>
|
||||||
|
@enderror
|
||||||
@if (config('app.lock_passwords')===true)
|
@if (config('app.lock_passwords')===true)
|
||||||
<p class="text-warning"><i class="fas fa-lock" aria-hidden="true"></i> {{ trans('general.feature_disabled') }}</p>
|
<p class="text-warning"><i class="fas fa-lock" aria-hidden="true"></i> {{ trans('general.feature_disabled') }}</p>
|
||||||
@endif
|
@endif
|
||||||
|
@ -457,7 +474,9 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-8">
|
<div class="col-md-8">
|
||||||
{{ Form::text('ldap_email', old('ldap_email', $setting->ldap_email), ['class' => 'form-control','placeholder' => trans('general.example') .'mail', $setting->demoMode]) }}
|
{{ Form::text('ldap_email', old('ldap_email', $setting->ldap_email), ['class' => 'form-control','placeholder' => trans('general.example') .'mail', $setting->demoMode]) }}
|
||||||
{!! $errors->first('ldap_email', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
@error('ldap_email')
|
||||||
|
<span class="alert-msg" aria-hidden="true">{{ $message }}</span>
|
||||||
|
@enderror
|
||||||
@if (config('app.lock_passwords')===true)
|
@if (config('app.lock_passwords')===true)
|
||||||
<p class="text-warning"><i class="fas fa-lock" aria-hidden="true"></i> {{ trans('general.feature_disabled') }}</p>
|
<p class="text-warning"><i class="fas fa-lock" aria-hidden="true"></i> {{ trans('general.feature_disabled') }}</p>
|
||||||
@endif
|
@endif
|
||||||
|
@ -471,7 +490,9 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-8">
|
<div class="col-md-8">
|
||||||
{{ Form::text('ldap_phone', old('ldap_phone', $setting->ldap_phone_field), ['class' => 'form-control','placeholder' => trans('general.example') .'telephonenumber', $setting->demoMode]) }}
|
{{ 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', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
@error('ldap_phone')
|
||||||
|
<span class="alert-msg" aria-hidden="true">{{ $message }}</span>
|
||||||
|
@enderror
|
||||||
@if (config('app.lock_passwords')===true)
|
@if (config('app.lock_passwords')===true)
|
||||||
<p class="text-warning"><i class="fas fa-lock" aria-hidden="true"></i> {{ trans('general.feature_disabled') }}</p>
|
<p class="text-warning"><i class="fas fa-lock" aria-hidden="true"></i> {{ trans('general.feature_disabled') }}</p>
|
||||||
@endif
|
@endif
|
||||||
|
@ -485,8 +506,9 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-8">
|
<div class="col-md-8">
|
||||||
{{ Form::text('ldap_jobtitle', old('ldap_jobtitle', $setting->ldap_jobtitle), ['class' => 'form-control','placeholder' => trans('general.example') .'title', $setting->demoMode]) }}
|
{{ Form::text('ldap_jobtitle', old('ldap_jobtitle', $setting->ldap_jobtitle), ['class' => 'form-control','placeholder' => trans('general.example') .'title', $setting->demoMode]) }}
|
||||||
{!! $errors->first('ldap_jobtitle', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
@error('ldap_jobtitle')
|
||||||
@if (config('app.lock_passwords')===true)
|
<span class="alert-msg" aria-hidden="true">{{ $message }}</span>
|
||||||
|
@enderror @if (config('app.lock_passwords')===true)
|
||||||
<p class="text-warning"><i class="fas fa-lock" aria-hidden="true"></i> {{ trans('general.feature_disabled') }}</p>
|
<p class="text-warning"><i class="fas fa-lock" aria-hidden="true"></i> {{ trans('general.feature_disabled') }}</p>
|
||||||
@endif
|
@endif
|
||||||
</div>
|
</div>
|
||||||
|
@ -499,8 +521,9 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-8">
|
<div class="col-md-8">
|
||||||
{{ Form::text('ldap_country', old('ldap_country', $setting->ldap_country), ['class' => 'form-control','placeholder' => trans('general.example') .'c', $setting->demoMode]) }}
|
{{ Form::text('ldap_country', old('ldap_country', $setting->ldap_country), ['class' => 'form-control','placeholder' => trans('general.example') .'c', $setting->demoMode]) }}
|
||||||
{!! $errors->first('ldap_country', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
@error('ldap_country')
|
||||||
@if (config('app.lock_passwords')===true)
|
<span class="alert-msg" aria-hidden="true">{{ $message }}</span>
|
||||||
|
@enderror @if (config('app.lock_passwords')===true)
|
||||||
<p class="text-warning"><i class="fas fa-lock" aria-hidden="true"></i> {{ trans('general.feature_disabled') }}</p>
|
<p class="text-warning"><i class="fas fa-lock" aria-hidden="true"></i> {{ trans('general.feature_disabled') }}</p>
|
||||||
@endif
|
@endif
|
||||||
</div>
|
</div>
|
||||||
|
@ -513,7 +536,9 @@
|
||||||
<div class="col-md-8">
|
<div class="col-md-8">
|
||||||
{{ Form::text('ldap_location', old('ldap_location', $setting->ldap_location), ['class' => 'form-control','placeholder' => trans('general.example') .'physicaldeliveryofficename', $setting->demoMode]) }}
|
{{ Form::text('ldap_location', old('ldap_location', $setting->ldap_location), ['class' => 'form-control','placeholder' => trans('general.example') .'physicaldeliveryofficename', $setting->demoMode]) }}
|
||||||
<p class="help-block">{!! trans('admin/settings/general.ldap_location_help') !!}</p>
|
<p class="help-block">{!! trans('admin/settings/general.ldap_location_help') !!}</p>
|
||||||
{!! $errors->first('ldap_location', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
@error('ldap_location')
|
||||||
|
<span class="alert-msg" aria-hidden="true">{{ $message }}</span>
|
||||||
|
@enderror
|
||||||
@if (config('app.lock_passwords')===true)
|
@if (config('app.lock_passwords')===true)
|
||||||
<p class="text-warning"><i class="fas fa-lock" aria-hidden="true"></i> {{ trans('general.feature_disabled') }}</p>
|
<p class="text-warning"><i class="fas fa-lock" aria-hidden="true"></i> {{ trans('general.feature_disabled') }}</p>
|
||||||
@endif
|
@endif
|
||||||
|
@ -584,7 +609,9 @@
|
||||||
<div class="col-md-8">
|
<div class="col-md-8">
|
||||||
{{ 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]) }}
|
{{ 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]) }}
|
||||||
<p class="help-block">{{ trans('admin/settings/general.custom_forgot_pass_url_help') }}</p>
|
<p class="help-block">{{ trans('admin/settings/general.custom_forgot_pass_url_help') }}</p>
|
||||||
{!! $errors->first('custom_forgot_pass_url', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
@error('custom_forgot_pass_url')
|
||||||
|
<span class="alert-msg" aria-hidden="true">{{ $message }}</span>
|
||||||
|
@enderror
|
||||||
@if (config('app.lock_passwords')===true)
|
@if (config('app.lock_passwords')===true)
|
||||||
<p class="text-warning"><i class="fas fa-lock" aria-hidden="true"></i> {{ trans('general.feature_disabled') }}</p>
|
<p class="text-warning"><i class="fas fa-lock" aria-hidden="true"></i> {{ trans('general.feature_disabled') }}</p>
|
||||||
@endif
|
@endif
|
||||||
|
@ -624,9 +651,41 @@
|
||||||
$(function() {
|
$(function() {
|
||||||
if( $('#is_ad').prop('checked') === false) {
|
if( $('#is_ad').prop('checked') === false) {
|
||||||
$('#ad_domain').prop('disabled', 'disabled');
|
$('#ad_domain').prop('disabled', 'disabled');
|
||||||
} else {
|
$("#ad_domain").prop('required',false);
|
||||||
//$('#ldap_server').prop('disabled', 'disabled');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Mark fields as required if LDAP is enabled
|
||||||
|
if ($('#ldap_enabled').prop('checked') === false) {
|
||||||
|
$("#ldap_server").prop('required',false);
|
||||||
|
$("#ldap_auth_filter_query").prop('required',false);
|
||||||
|
$("#ldap_filter").prop('required',false);
|
||||||
|
$("#ldap_uname").prop('required',false);
|
||||||
|
$("#ldap_pword").prop('required',false);
|
||||||
|
$("#ldap_basedn").prop('required',false);
|
||||||
|
$("#ldap_fname_field").prop('required',false);
|
||||||
|
}
|
||||||
|
|
||||||
|
$("#ldap_enabled").change(function() {
|
||||||
|
|
||||||
|
if (this.checked) {
|
||||||
|
$("#ldap_server").prop('required',true);
|
||||||
|
$("#ldap_auth_filter_query").prop('required',true);
|
||||||
|
$("#ldap_filter").prop('required',true);
|
||||||
|
$("#ldap_uname").prop('required',true);
|
||||||
|
$("#ldap_pword").prop('required',true);
|
||||||
|
$("#ldap_basedn").prop('required',true);
|
||||||
|
} else {
|
||||||
|
$("#ldap_server").prop('required',false);
|
||||||
|
$("#ldap_auth_filter_query").prop('required',false);
|
||||||
|
$("#ldap_filter").prop('required',false);
|
||||||
|
$("#ldap_uname").prop('required',false);
|
||||||
|
$("#ldap_pword").prop('required',false);
|
||||||
|
$("#ldap_basedn").prop('required',false);
|
||||||
|
$("#ldap_fname_field").prop('required',false);
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#is_ad").change(function() {
|
$("#is_ad").change(function() {
|
||||||
|
@ -742,6 +801,7 @@
|
||||||
return body;
|
return body;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$("#ldaptestlogin").click(function(){
|
$("#ldaptestlogin").click(function(){
|
||||||
$("#ldaptestloginrow").removeClass('text-success');
|
$("#ldaptestloginrow").removeClass('text-success');
|
||||||
$("#ldaptestloginrow").removeClass('text-danger');
|
$("#ldaptestloginrow").removeClass('text-danger');
|
||||||
|
|
Loading…
Reference in a new issue