Improve radio button values in custom report form

This commit is contained in:
Marcus Moore 2024-01-16 12:33:16 -08:00
parent adba2d5b6c
commit 8aa5cf530b
No known key found for this signature in database
2 changed files with 5 additions and 5 deletions

View file

@ -718,10 +718,10 @@ class ReportsController extends Controller
if ($request->filled('exclude_archived')) {
$assets->notArchived();
}
if ($request->input('deleted_assets') == '1') {
if ($request->input('deleted_assets') == 'include_deleted') {
$assets->withTrashed();
}
if ($request->input('deleted_assets') == '0') {
if ($request->input('deleted_assets') == 'only_deleted') {
$assets->onlyTrashed();
}

View file

@ -434,15 +434,15 @@
<div class="col-md-9 col-md-offset-3">
<label class="form-control">
{{ Form::radio('deleted_assets', '', true, ['aria-label'=>'deleted_assets', 'id'=>'deleted_assets_exclude_deleted'])}}
{{ Form::radio('deleted_assets', 'exclude_deleted', true, ['aria-label'=>'deleted_assets', 'id'=>'deleted_assets_exclude_deleted'])}}
{{ trans('general.exclude_deleted') }}
</label>
<label class="form-control">
{{ Form::radio('deleted_assets', '1', old('deleted_assets'), ['aria-label'=>'deleted_assets', 'id'=>'deleted_assets_include_deleted']) }}
{{ Form::radio('deleted_assets', 'include_deleted', old('deleted_assets'), ['aria-label'=>'deleted_assets', 'id'=>'deleted_assets_include_deleted']) }}
{{ trans('general.include_deleted') }}
</label>
<label class="form-control">
{{ Form::radio('deleted_assets', '0', old('deleted_assets'), ['aria-label'=>'deleted_assets','id'=>'deleted_assets_only_deleted']) }}
{{ Form::radio('deleted_assets', 'only_deleted', old('deleted_assets'), ['aria-label'=>'deleted_assets','id'=>'deleted_assets_only_deleted']) }}
{{ trans('general.only_deleted') }}
</label>
</div>