A free open source IT asset/license management system
commit for testing
akemidxdd223fc21579
diff --git a/app/Http/Controllers/Assets/AssetCheckinController.php b/app/Http/Controllers/Assets/AssetCheckinController.phpindex 1d64da98e2..f84a468a60 100644--- a/app/Http/Controllers/Assets/AssetCheckinController.php+++ b/app/Http/Controllers/Assets/AssetCheckinController.php@@ -116,12 +116,6 @@ class AssetCheckinController extends Controller$seat->update(['assigned_to' => null]);});- $settings = \App\Models\Setting::getSettings();-- if($settings->require_checkinout_notes && (is_null($request->note))) {- return redirect()->to("hardware/$assetId/checkin")->with('error', trans('admin/hardware/message.update.no_note'));- }-// Get all pending Acceptances for this asset and delete them$acceptances = CheckoutAcceptance::pending()->whereHasMorph('checkoutable',[Asset::class],diff --git a/app/Http/Controllers/Assets/AssetCheckoutController.php b/app/Http/Controllers/Assets/AssetCheckoutController.phpindex ef60a589d7..05b766916b 100644--- a/app/Http/Controllers/Assets/AssetCheckoutController.php+++ b/app/Http/Controllers/Assets/AssetCheckoutController.php@@ -102,10 +102,6 @@ class AssetCheckoutController extends Controller$settings = \App\Models\Setting::getSettings();- if($settings->require_checkinout_notes && (is_null($request->note))) {- return redirect()->to("hardware/$assetId/checkout")->with('error', trans('admin/hardware/message.update.no_note'));- }-// We have to check whether $target->company_id is null here since locations don't have a company yetif (($settings->full_multiple_companies_support) && ((!is_null($target->company_id)) && (!is_null($asset->company_id)))) {if ($target->company_id != $asset->company_id){diff --git a/app/Http/Requests/AssetCheckinRequest.php b/app/Http/Requests/AssetCheckinRequest.phpindex ea2a6e0b01..2a716e00a8 100644--- a/app/Http/Requests/AssetCheckinRequest.php+++ b/app/Http/Requests/AssetCheckinRequest.php@@ -26,7 +26,7 @@ class AssetCheckinRequest extends Request$rules = [];if($settings->require_checkinout_notes) {- $rules['notes'] = 'string|nullable';+ $rules['note'] = 'string|nullable';}return $rules;}diff --git a/app/Http/Requests/AssetCheckoutRequest.php b/app/Http/Requests/AssetCheckoutRequest.phpindex f7c3382455..c8245682a2 100644--- a/app/Http/Requests/AssetCheckoutRequest.php+++ b/app/Http/Requests/AssetCheckoutRequest.php@@ -40,7 +40,7 @@ class AssetCheckoutRequest extends Request];if($settings->require_checkinout_notes) {- $rules['notes'] = 'required|string|nullable';+ $rules['note'] = 'required|string';}return $rules;diff --git a/resources/views/hardware/checkin.blade.php b/resources/views/hardware/checkin.blade.phpindex 7569a42cd0..9188d81eaa 100755--- a/resources/views/hardware/checkin.blade.php+++ b/resources/views/hardware/checkin.blade.php@@ -118,13 +118,11 @@<label for="note" class="col-md-3 control-label">{{ trans('general.notes') }}</label>- @if($snipeSettings->require_checkinout_notes=="1")<div class="col-md-8">- <textarea class="col-md-6 form-control" id="note" required="true"+ <textarea class="col-md-6 form-control" id="note" @required($snipeSettings->require_checkinout_notes)name="note">{{ old('note', $asset->note) }}</textarea>{!! $errors->first('note', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}</div>- @endif</div></div> <!--/.box-body--></div> <!--/.box-body-->diff --git a/resources/views/hardware/checkout.blade.php b/resources/views/hardware/checkout.blade.phpindex fadb7a1abc..e0dc8ef519 100755--- a/resources/views/hardware/checkout.blade.php+++ b/resources/views/hardware/checkout.blade.php@@ -141,19 +141,12 @@<label for="note" class="col-md-3 control-label">{{ trans('general.notes') }}</label>- @if($snipeSettings->require_checkinout_notes=="1")- <div class="col-md-8">- <textarea class="col-md-6 form-control" id="note" required="true"- name="note">{{ old('note', $asset->note) }}</textarea>- {!! $errors->first('note', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}- </div>- @else+<div class="col-md-8">- <textarea class="col-md-6 form-control" id="note"+ <textarea class="col-md-6 form-control" id="note" @required($snipeSettings->require_checkinout_notes)name="note">{{ old('note', $asset->note) }}</textarea>{!! $errors->first('note', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}</div>- @endif</div>@if ($asset->requireAcceptance() || $asset->getEula() || ($snipeSettings->webhook_endpoint!=''))