Skip to content

A free open source IT asset/license management system

Add radio buttons to alter asset checkin location behavior

Ivan Nieto Vivanco743e852998b5
diff --git a/app/Http/Controllers/Assets/AssetCheckinController.php b/app/Http/Controllers/Assets/AssetCheckinController.php
index fa4fd52e7b..da4ebb9127 100644
--- a/app/Http/Controllers/Assets/AssetCheckinController.php
+++ b/app/Http/Controllers/Assets/AssetCheckinController.php
@@ -102,7 +102,6 @@ class AssetCheckinController extends Controller
if ($request->filled('location_id')) {
\Log::debug('NEW Location ID: '.$request->get('location_id'));
$asset->location_id = $request->get('location_id');
- $asset->rtd_location_id = $request->get('location_id');
}
$checkin_at = date('Y-m-d H:i:s');
diff --git a/resources/views/partials/forms/edit/location-select.blade.php b/resources/views/partials/forms/edit/location-select.blade.php
index 719370fe7c..cdc4bcf670 100644
--- a/resources/views/partials/forms/edit/location-select.blade.php
+++ b/resources/views/partials/forms/edit/location-select.blade.php
@@ -30,6 +30,21 @@
</div>
@endif
+<!-- Update actual location -->
+<div class="form-group">
+ <div class="col-md-9 col-md-offset-3">
+ <label class="form-control">
+ {{ Form::radio('update_default_location', '1', old('update_default_location'), ['checked'=> 'checked', 'aria-label'=>'update_default_location']) }}
+ {{ trans('admin/hardware/form.asset_location') }}
+ </label>
+ <label class="form-control">
+ {{ Form::radio('update_default_location', '0', old('update_default_location'), ['aria-label'=>'update_default_location']) }}
+ {{ trans('admin/hardware/form.asset_location_update_default_current') }}
+ </label>
+
+ </div>
+</div> <!--/form-group-->
+
</div>