diff --git a/resources/lang/en-US/admin/hardware/form.php b/resources/lang/en-US/admin/hardware/form.php index dc4754e71a9d..8210b91d2334 100644 --- a/resources/lang/en-US/admin/hardware/form.php +++ b/resources/lang/en-US/admin/hardware/form.php @@ -57,8 +57,8 @@ '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_not_deployable_checkin' => 'That asset status is not deployable. Using this status label will checkin the asset.', - 'asset_deployable' => 'This asset can be checked out.', + 'asset_not_deployable_checkin' => '{1} That asset status is not deployable. Using this status label will check in the asset.|[2,*] That asset status in not deployable. Using this status label will result in no change.', + 'asset_deployable' => '{1} This asset can be checked out.|[2,*] These assets can be checked out.', 'processing_spinner' => 'Processing... (This might take a bit of time on large files)', 'processing' => 'Processing... ', 'optional_infos' => 'Optional Information', diff --git a/resources/views/hardware/bulk.blade.php b/resources/views/hardware/bulk.blade.php index 2b18bb0e1c7e..ee8dc577e89e 100755 --- a/resources/views/hardware/bulk.blade.php +++ b/resources/views/hardware/bulk.blade.php @@ -133,6 +133,7 @@ aria-label="status_id" />
{{ trans('general.status_compatibility') }}
+ {!! $errors->first('status_id', '') !!} @@ -288,5 +289,39 @@ }); }); }); + function status_check() { + var status_id = $('select[name="status_id"]').val(); + if (status_id != '') { + $(".status_spinner").css("display", "inline"); + $.ajax({ + url: "{{config('app.url') }}/api/v1/statuslabels/" + status_id + "/deployable", + headers: { + "X-Requested-With": 'XMLHttpRequest', + "X-CSRF-TOKEN": $('meta[name="csrf-token"]').attr('content') + }, + success: function (data) { + $(".status_spinner").css("display", "none"); + $("#selected_status_status").fadeIn(); + + if (data == true) { + $("#selected_status_status").removeClass('text-danger'); + $("#selected_status_status").addClass('text-success'); + $("#selected_status_status").html('