3
0
mirror of https://github.com/snipe/snipe-it.git synced 2026-02-04 21:05:23 +00:00

Add display name to bulk user edit

This commit is contained in:
snipe
2026-01-13 12:00:46 +00:00
parent b396da3f33
commit 26347ac41e
2 changed files with 21 additions and 1 deletions

View File

@ -169,6 +169,7 @@ class BulkUsersController extends Controller
->conditionallyAddItem('remote')
->conditionallyAddItem('ldap_import')
->conditionallyAddItem('activated')
->conditionallyAddItem('display_name')
->conditionallyAddItem('start_date')
->conditionallyAddItem('end_date')
->conditionallyAddItem('city')
@ -214,6 +215,10 @@ class BulkUsersController extends Controller
$this->update_array['locale'] = null;
}
if ($request->input('null_display_name')=='1') {
$this->update_array['display_name'] = null;
}
if (! $manager_conflict) {
$this->conditionallyAddItem('manager_id');
}

View File

@ -214,7 +214,7 @@
<label class="col-md-3 control-label" for="groups"> {{ trans('general.groups') }}</label>
<div class="col-md-6">
@if ((config('app.lock_passwords') || (!Auth::user()->isSuperUser())))
<span class="help-block">{{ trans('admin/users/general.group_memberships_helpblock') }}</p>
<p class="help-block">{{ trans('admin/users/general.group_memberships_helpblock') }}</p>
@else
<div class="controls">
<select name="groups[]" id="groups[]" multiple="multiple" class="form-control" aria-label="groups">
@ -233,6 +233,21 @@
</div> <!--/col-md-5-->
</div>
<!-- Display Name -->
<div class="form-group {{ $errors->has('display_name') ? ' has-error' : '' }}">
<label for="display_name" class="col-md-3 control-label">{{ trans('admin/users/table.display_name') }}</label>
<div class="col-md-4">
<input type="text" class="form-control" placeholder="{{ trans('admin/users/table.display_name') }}" name="display_name" id="display_name" value="{{ old('display_name') }}">
{!! $errors->first('display_name', '<span class="alert-msg"><i class="fas fa-times"></i> :message</span>') !!}
</div>
<div class="col-md-5">
<label class="form-control">
<input type="checkbox" name="null_display_name" value="1" />
{{ trans_choice('general.set_to_null', count($users),['selection_count' => count($users)]) }}
</label>
</div>
</div>
<!-- Start Date -->
<div class="form-group {{ $errors->has('start_date') ? ' has-error' : '' }}">