replace checkboxes with radiobuttons

This commit is contained in:
Godfrey M 2022-08-02 10:27:55 -07:00
parent 842dafefec
commit ff080a2d8f
3 changed files with 12 additions and 9 deletions

View file

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

View file

@ -102,6 +102,7 @@ return [
'email_domain_help' => 'This is used to generate email addresses when importing',
'error' => 'Error',
'exclude_archived' => 'Exclude Archived Assets',
'exclude_deleted' => 'Exclude All Deleted Assets',
'example' => 'Example: ',
'filastname_format' => 'First Initial Last Name (jsmith@example.com)',
'firstname_lastname_format' => 'First Name Last Name (jane.smith@example.com)',

View file

@ -351,15 +351,17 @@
{{ trans('general.bom_remark') }}
</label>
</div>
<div class="col-md-9 col-md-offset-3">
<label>
{{ Form::checkbox('include_deleted', '1', old('include_deleted'), ['class' => 'minimal']) }}
<br>
<label for= "deleted_assets">
{{ Form::radio('deleted_assets', '', true, ['aria-label'=>'deleted_assets', 'class'=>'minimal'])}}
{{ trans('general.exclude_deleted') }}
<br>
{{ Form::radio('deleted_assets', '1', old('deleted_assets'), ['aria-label'=>'deleted_assets','class' => 'minimal']) }}
{{ trans('general.include_deleted') }}
</label>
</div>
<div class="col-md-9 col-md-offset-3">
<label>
{{ Form::checkbox('only_deleted', '1', old('only_deleted'), ['class' => 'minimal']) }}
<br>
{{ Form::radio('deleted_assets', '0', old('deleted_assets'), ['aria-label'=>'deleted_assets','class' => 'minimal']) }}
{{ trans('general.only_deleted') }}
</label>
</div>