mirror of
https://github.com/snipe/snipe-it.git
synced 2025-02-21 03:15:45 -08:00
Merge pull request #12709 from snipe/fixes/null_location_in_bulk_users
Ability to remove user location from users
This commit is contained in:
commit
e28d4fa588
|
@ -123,6 +123,11 @@ class BulkUsersController extends Controller
|
|||
'warning' => trans('admin/users/message.bulk_manager_warn'),
|
||||
];
|
||||
}
|
||||
|
||||
if ($request->input('null_location_id')=='1') {
|
||||
$this->update_array['location_id'] = null;
|
||||
}
|
||||
|
||||
if (! $manager_conflict) {
|
||||
$this->conditionallyAddItem('manager_id');
|
||||
}
|
||||
|
|
|
@ -385,7 +385,8 @@ return [
|
|||
'bulk_soft_delete' =>'Also soft-delete these users. Their asset history will remain intact unless/until you purge deleted records in the Admin Settings.',
|
||||
'bulk_checkin_delete_success' => 'Your selected users have been deleted and their items have been checked in.',
|
||||
'bulk_checkin_success' => 'The items for the selected users have been checked in.',
|
||||
'set_to_null' => 'Delete values for this asset|Delete values for all :asset_count assets ',
|
||||
'set_to_null' => 'Delete values for this asset|Delete values for all :asset_count assets ',
|
||||
'set_users_field_to_null' => 'Delete :field values for this user|Delete :field values for all :user_count users ',
|
||||
'na_no_purchase_date' => 'N/A - No purchase date provided',
|
||||
'assets_by_status' => 'Assets by Status',
|
||||
'assets_by_status_type' => 'Assets by Status Type',
|
||||
|
|
|
@ -145,7 +145,7 @@
|
|||
</div>
|
||||
|
||||
<!-- Next audit Date -->
|
||||
<div class="form-group {{ $errors->has('expected_checkin') ? ' has-error' : '' }}">
|
||||
<div class="form-group {{ $errors->has('next_audit_date') ? ' has-error' : '' }}">
|
||||
<label for="next_audit_date" class="col-md-3 control-label">{{ trans('general.next_audit_date') }}</label>
|
||||
<div class="col-md-3">
|
||||
<div class="input-group date" data-provide="datepicker" data-date-format="yyyy-mm-dd" data-autoclose="true">
|
||||
|
|
|
@ -42,6 +42,15 @@
|
|||
<!-- Location -->
|
||||
@include ('partials.forms.edit.location-select', ['translated_name' => trans('general.location'), 'fieldname' => 'location_id'])
|
||||
|
||||
<div class="form-group">
|
||||
<div class=" col-md-9 col-md-offset-3">
|
||||
<label>
|
||||
{{ Form::checkbox('null_location_id', '1', false, ['class' => 'minimal']) }}
|
||||
{{ trans_choice('general.set_users_field_to_null', count($users), ['field' => trans('general.location'), 'user_count' => count($users)]) }}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Company -->
|
||||
@if (\App\Models\Company::canManageUsersCompanies())
|
||||
|
|
Loading…
Reference in a new issue