mirror of
https://github.com/snipe/snipe-it.git
synced 2025-01-30 07:02:20 -08:00
commit for testing
This commit is contained in:
parent
9cb411c500
commit
dd223fc215
|
@ -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],
|
||||
|
|
|
@ -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 yet
|
||||
if (($settings->full_multiple_companies_support) && ((!is_null($target->company_id)) && (!is_null($asset->company_id)))) {
|
||||
if ($target->company_id != $asset->company_id){
|
||||
|
|
|
@ -26,7 +26,7 @@ class AssetCheckinRequest extends Request
|
|||
$rules = [];
|
||||
|
||||
if($settings->require_checkinout_notes) {
|
||||
$rules['notes'] = 'string|nullable';
|
||||
$rules['note'] = 'string|nullable';
|
||||
}
|
||||
return $rules;
|
||||
}
|
||||
|
|
|
@ -40,7 +40,7 @@ class AssetCheckoutRequest extends Request
|
|||
];
|
||||
|
||||
if($settings->require_checkinout_notes) {
|
||||
$rules['notes'] = 'required|string|nullable';
|
||||
$rules['note'] = 'required|string';
|
||||
}
|
||||
|
||||
return $rules;
|
||||
|
|
|
@ -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-->
|
||||
|
|
|
@ -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"
|
||||
<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>
|
||||
@else
|
||||
<div class="col-md-8">
|
||||
<textarea class="col-md-6 form-control" id="note"
|
||||
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!=''))
|
||||
|
|
Loading…
Reference in a new issue