diff --git a/resources/views/blade/input/location-select.blade.php b/resources/views/blade/input/location-select.blade.php new file mode 100644 index 000000000..3b513b95d --- /dev/null +++ b/resources/views/blade/input/location-select.blade.php @@ -0,0 +1,62 @@ +@use('App\Models\Location', 'Location') +@use('Illuminate\Support\Arr', 'Arr') + +@props([ + 'label', + 'name', + 'selected', + 'required' => false, + 'multiple' => false, + 'helpText' => null, + 'hideNewButton' => false, +]) + +
$errors->has($name), + ]) +> + + +
+ +
+ +
+ @unless($hideNewButton) + @can('create', Location::class) + {{ trans('button.new') }} + @endcan + @endunless +
+ + {!! $errors->first($name, '
') !!} + + @if ($helpText) +
+

{{ $helpText }}

+
+ @endif + +
diff --git a/resources/views/hardware/checkin.blade.php b/resources/views/hardware/checkin.blade.php index 5510ff89a..fbf2aa75c 100755 --- a/resources/views/hardware/checkin.blade.php +++ b/resources/views/hardware/checkin.blade.php @@ -95,7 +95,26 @@ - @include ('partials.forms.edit.location-select', ['translated_name' => trans('general.location'), 'fieldname' => 'location_id', 'help_text' => ($asset->defaultLoc) ? trans('general.checkin_to_diff_location', ['default_location' => $asset->defaultLoc->name]) : null, 'hide_location_radio' => true]) + + + +
+
+ + +
+