A free open source IT asset/license management system
adds an option to bulk edit actual location for bulk edit and fixes update issue
Godfrey Me73b16846e79
diff --git a/app/Http/Controllers/Assets/BulkAssetsController.php b/app/Http/Controllers/Assets/BulkAssetsController.phpindex a744db5788..c3c7e21ab0 100644--- a/app/Http/Controllers/Assets/BulkAssetsController.php+++ b/app/Http/Controllers/Assets/BulkAssetsController.php@@ -189,9 +189,15 @@ class BulkAssetsController extends Controller}if ($request->filled('rtd_location_id')) {- $this->update_array['rtd_location_id'] = $request->input('rtd_location_id');+ if (($request->filled('update_real_loc')) && (($request->input('update_real_loc')) == '0')) {+ $this->update_array['rtd_location_id'] = $request->input('rtd_location_id');+ }if (($request->filled('update_real_loc')) && (($request->input('update_real_loc')) == '1')) {$this->update_array['location_id'] = $request->input('rtd_location_id');+ $this->update_array['rtd_location_id'] = $request->input('rtd_location_id');+ }+ if (($request->filled('update_real_loc')) && (($request->input('update_real_loc')) == '2')) {+ $this->update_array['location_id'] = $request->input('rtd_location_id');}}diff --git a/resources/lang/en/admin/hardware/form.php b/resources/lang/en/admin/hardware/form.phpindex ef877c8377..ee3fa20fb0 100644--- a/resources/lang/en/admin/hardware/form.php+++ b/resources/lang/en/admin/hardware/form.php@@ -49,6 +49,7 @@ return ['asset_location' => 'Update Asset Location','asset_location_update_default_current' => 'Update default location AND actual location','asset_location_update_default' => 'Update only default location',+ 'asset_location_update_actual' => 'Update only actual location','asset_not_deployable' => 'That asset status is not deployable. This asset cannot be checked out.','asset_deployable' => 'That status is deployable. This asset can be checked out.','processing_spinner' => 'Processing... (This might take a bit of time on large files)',diff --git a/resources/views/hardware/bulk.blade.php b/resources/views/hardware/bulk.blade.phpindex 667126ec99..e26b957057 100755--- a/resources/views/hardware/bulk.blade.php+++ b/resources/views/hardware/bulk.blade.php@@ -92,9 +92,13 @@{{ Form::radio('update_real_loc', '1', old('update_real_loc'), ['checked'=> 'checked', 'aria-label'=>'update_real_loc']) }}{{ trans('admin/hardware/form.asset_location_update_default_current') }}</label>+ <label class="form-control">+ {{ Form::radio('update_real_loc', '0', old('update_real_loc'), ['aria-label'=>'update_default_loc']) }}+ {{ trans('admin/hardware/form.asset_location_update_default') }}+ </label><label class="form-control">- {{ Form::radio('update_real_loc', '0', old('update_real_loc'), ['aria-label'=>'update_default_loc']) }}- {{ trans('admin/hardware/form.asset_location_update_default') }}+ {{ Form::radio('update_real_loc', '2', old('update_real_loc'), ['aria-label'=>'update_default_loc']) }}+ {{ trans('admin/hardware/form.asset_location_update_actual') }}</label></div>