Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion resources/lang/en-US/admin/users/general.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
'info' => 'Info',
'restore_user' => 'Click here to restore them.',
'last_login' => 'Last Login',
'ldap_config_text' => 'LDAP configuration settings can be found Admin > Settings. The (optional) selected location will be set for all imported users.',
'ldap_config_text' => 'The selected location will be set for ALL imported users. This will overwrite their existing location, and is an unusual use-case, so leaving this blank is typically best.',
'ldap_sync_intro' => 'Click on the button below to manually sync your LDAP users. To learn more about configuring LDAP sync to run automatically, please see the <a href=":link" target="_blank">documentation <i class="fa fa-external-link"></i></a> .',
'print_assigned' => 'Print All Assigned',
'email_assigned' => 'Email List of All Assigned',
'user_notified' => 'User has been emailed a list of their currently assigned items.',
Expand Down
1 change: 1 addition & 0 deletions resources/lang/en-US/general.php
Original file line number Diff line number Diff line change
Expand Up @@ -618,6 +618,7 @@
'from' => 'From',
'by' => 'By',
'by_user' => 'By',
'ldap_sync_location' => 'Sync All Users to This Location (Optional)',
'version' => 'Version',
'build' => 'build',
'use_cloned_image' => 'Clone image from original',
Expand Down
2 changes: 1 addition & 1 deletion resources/views/settings/general.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@

<div class="col-md-12">

<fieldset">
<fieldset>
<x-form-legend>
{{ trans('admin/settings/general.legends.scoping') }}
</x-form-legend>
Expand Down
21 changes: 12 additions & 9 deletions resources/views/users/ldap.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,27 @@
@section('content')

<div class="row">
<div class="col-md-9">
<div class="col-md-12">
@if ($snipeSettings->ldap_enabled == 0)
{{ trans('admin/users/message.ldap_not_configured') }}
@else
<form class="form-horizontal" role="form" method="post" action="" id="ldap-form">
{{csrf_field()}}
<div class="box box-default">
<div class="box-body">

<div class="callout callout-legend col-md-12">

<p>
<i class="fa-solid fa-lightbulb"></i>
<strong>{!! trans('admin/users/general.ldap_sync_intro', ['link' => 'https://snipe-it.readme.io/docs/ldap-sync#/']) !!}</strong>
</p>
</div>

<!-- location_id-->
<div class="form-group {{ $errors->has('location_id') ? 'has-error' : '' }}">

<div class="col-md-12">
<!-- Location -->
@include ('partials.forms.edit.location-select', ['translated_name' => trans('general.location'), 'fieldname' => 'location_id[]', 'multiple' => true])
</div>
@include ('partials.forms.edit.location-select', ['translated_name' => trans('general.ldap_sync_location'), 'help_text' => trans('admin/users/general.ldap_config_text'), 'fieldname' => 'location_id[]', 'multiple' => true])
</div>

<div class="box-footer">
Expand All @@ -50,10 +56,7 @@
</form>
</div>
<div class="col-md-3">
<p>
{{ trans('admin/users/general.ldap_config_text') }}
</p>
<p><a href="{{ route('settings.ldap.index') }}">{{ trans('admin/settings/general.ldap_settings_link') }}</a></p>

</div>
</div>

Expand Down
6 changes: 5 additions & 1 deletion routes/web/users.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

use App\Http\Controllers\Users;
use Illuminate\Support\Facades\Route;
use Tabuna\Breadcrumbs\Trail;

// User Management

Expand All @@ -13,7 +14,10 @@
Users\LDAPImportController::class,
'create'
]
)->name('ldap/user');
)->name('ldap/user')
->breadcrumbs(fn (Trail $trail) =>
$trail->parent('users.index')
->push(trans('general.ldap_user_sync'), route('ldap/user')));;

Route::post(
'ldap',
Expand Down
Loading