Skip to content

Commit 6399433

Browse files
authored
Merge pull request grokability#18111 from grokability/grokability#16914-better-ldap-sync-phrasing
Fixed grokability#16914: better ldap sync phrasing
2 parents 23e6909 + da4c7d8 commit 6399433

File tree

5 files changed

+21
-12
lines changed

5 files changed

+21
-12
lines changed

resources/lang/en-US/admin/users/general.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
'info' => 'Info',
1616
'restore_user' => 'Click here to restore them.',
1717
'last_login' => 'Last Login',
18-
'ldap_config_text' => 'LDAP configuration settings can be found Admin > Settings. The (optional) selected location will be set for all imported users.',
18+
'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.',
19+
'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> .',
1920
'print_assigned' => 'Print All Assigned',
2021
'email_assigned' => 'Email List of All Assigned',
2122
'user_notified' => 'User has been emailed a list of their currently assigned items.',

resources/lang/en-US/general.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -618,6 +618,7 @@
618618
'from' => 'From',
619619
'by' => 'By',
620620
'by_user' => 'By',
621+
'ldap_sync_location' => 'Sync All Users to This Location (Optional)',
621622
'version' => 'Version',
622623
'build' => 'build',
623624
'use_cloned_image' => 'Clone image from original',

resources/views/settings/general.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434

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

37-
<fieldset">
37+
<fieldset>
3838
<x-form-legend>
3939
{{ trans('admin/settings/general.legends.scoping') }}
4040
</x-form-legend>

resources/views/users/ldap.blade.php

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,21 +16,27 @@
1616
@section('content')
1717

1818
<div class="row">
19-
<div class="col-md-9">
19+
<div class="col-md-12">
2020
@if ($snipeSettings->ldap_enabled == 0)
2121
{{ trans('admin/users/message.ldap_not_configured') }}
2222
@else
2323
<form class="form-horizontal" role="form" method="post" action="" id="ldap-form">
2424
{{csrf_field()}}
2525
<div class="box box-default">
2626
<div class="box-body">
27+
28+
<div class="callout callout-legend col-md-12">
29+
30+
<p>
31+
<i class="fa-solid fa-lightbulb"></i>
32+
<strong>{!! trans('admin/users/general.ldap_sync_intro', ['link' => 'https://snipe-it.readme.io/docs/ldap-sync#/']) !!}</strong>
33+
</p>
34+
</div>
35+
2736
<!-- location_id-->
2837
<div class="form-group {{ $errors->has('location_id') ? 'has-error' : '' }}">
29-
30-
<div class="col-md-12">
3138
<!-- Location -->
32-
@include ('partials.forms.edit.location-select', ['translated_name' => trans('general.location'), 'fieldname' => 'location_id[]', 'multiple' => true])
33-
</div>
39+
@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])
3440
</div>
3541

3642
<div class="box-footer">
@@ -50,10 +56,7 @@
5056
</form>
5157
</div>
5258
<div class="col-md-3">
53-
<p>
54-
{{ trans('admin/users/general.ldap_config_text') }}
55-
</p>
56-
<p><a href="{{ route('settings.ldap.index') }}">{{ trans('admin/settings/general.ldap_settings_link') }}</a></p>
59+
5760
</div>
5861
</div>
5962

routes/web/users.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
use App\Http\Controllers\Users;
44
use Illuminate\Support\Facades\Route;
5+
use Tabuna\Breadcrumbs\Trail;
56

67
// User Management
78

@@ -13,7 +14,10 @@
1314
Users\LDAPImportController::class,
1415
'create'
1516
]
16-
)->name('ldap/user');
17+
)->name('ldap/user')
18+
->breadcrumbs(fn (Trail $trail) =>
19+
$trail->parent('users.index')
20+
->push(trans('general.ldap_user_sync'), route('ldap/user')));;
1721

1822
Route::post(
1923
'ldap',

0 commit comments

Comments
 (0)