Skip to content

Commit

Permalink
Merge pull request #14824 from Godmartinz/select-2-redirect-fix
Browse files Browse the repository at this point in the history
Fixed select 2 Behavior
  • Loading branch information
snipe committed Jun 5, 2024
2 parents 697ac83 + 6202f61 commit 7688c43
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,16 @@
<div class="col-md-9 text-right">
<div class="btn-group text-left">

<select class="redirect-options form-control select2" name="redirect_option" style="min-width: 200px"{{ (!$asset->model ? ' disabled' : '') }}>
<select class="redirect-options form-control select2" data-minimum-results-for-search="Infinity" name="redirect_option" style="min-width: 200px"{{ (!$asset->model ? ' disabled' : '') }}>

<option {{ (Session::get('redirect_option')=="0" || (Session::get('redirect_option')=="2" && $checkin)) ? 'selected' : '' }} value="0">
{{ trans('admin/hardware/form.redirect_to_all', ['type' => $table_name]) }}
</option>
<option {{ Session::get('redirect_option')=="1" ? 'selected' : ''}} value="1">
{{ trans('admin/hardware/form.redirect_to_type', ['type' => $type]) }}
</option>
<option {{ Session::get('redirect_option')=="2" && !$checkin ? 'selected' : ''}}{{ $checkin ? 'disabled hidden' : '' }} value="2" >
{{ trans('admin/hardware/form.redirect_to_checked_out_to') }}
<option {{ Session::get('redirect_option')=="2" && !$checkin ? 'selected' : ''}}{{ $checkin ? 'hidden disabled' : '' }} value="2" >
{{ !$checkin ? trans('admin/hardware/form.redirect_to_checked_out_to') : '' }}
</option>

</select>
Expand Down

0 comments on commit 7688c43

Please sign in to comment.