Disable the Checkin All Seats button if License is not reassignable
This commit is contained in:
parent
6161a0d76d
commit
7bfb5a0667
2 changed files with 14 additions and 7 deletions
|
@ -26,6 +26,7 @@ return array(
|
|||
'modal' => 'This will action checkin one seat. | This action will checkin all :checkedout_seats_count seats for this license.',
|
||||
'enabled_tooltip' => 'Checkin ALL seats for this license from both users and assets',
|
||||
'disabled_tooltip' => 'This is disabled because there are no seats currently checked out',
|
||||
'disabled_tooltip_reassignable' => 'This is disabled because the License is not reassignable',
|
||||
'success' => 'License successfully checked in! | All licenses were successfully checked in!',
|
||||
'log_msg' => 'Checked in via bulk license checkout in license GUI',
|
||||
],
|
||||
|
|
|
@ -577,17 +577,23 @@
|
|||
@endcan
|
||||
|
||||
@can('checkin', $license)
|
||||
|
||||
@if (($license->seats - $license->availCount()->count()) > 0 )
|
||||
<a href="#" class="btn btn-block bg-purple" style="margin-bottom: 25px;" data-toggle="modal" data-tooltip="true" data-target="#checkinFromAllModal" data-content="{{ trans('general.sure_to_delete') }} data-title="{{ trans('general.delete') }}" onClick="return false;">
|
||||
{{ trans('admin/licenses/general.bulk.checkin_all.button') }}
|
||||
</a>
|
||||
@else
|
||||
|
||||
@if (($license->seats - $license->availCount()->count()) <= 0 )
|
||||
<span data-tooltip="true" title=" {{ trans('admin/licenses/general.bulk.checkin_all.disabled_tooltip') }}">
|
||||
<a href="#" class="btn btn-block bg-purple disabled" style="margin-bottom: 25px;">
|
||||
{{ trans('admin/licenses/general.bulk.checkin_all.button') }}
|
||||
</a>
|
||||
</span>
|
||||
</span>
|
||||
@elseif (! $license->reassignable)
|
||||
<span data-tooltip="true" title=" {{ trans('admin/licenses/general.bulk.checkin_all.disabled_tooltip_reassignable') }}">
|
||||
<a href="#" class="btn btn-block bg-purple disabled" style="margin-bottom: 25px;">
|
||||
{{ trans('admin/licenses/general.bulk.checkin_all.button') }}
|
||||
</a>
|
||||
</span>
|
||||
@else
|
||||
<a href="#" class="btn btn-block bg-purple" style="margin-bottom: 25px;" data-toggle="modal" data-tooltip="true" data-target="#checkinFromAllModal" data-content="{{ trans('general.sure_to_delete') }} data-title="{{ trans('general.delete') }}" onClick="return false;">
|
||||
{{ trans('admin/licenses/general.bulk.checkin_all.button') }}
|
||||
</a>
|
||||
@endif
|
||||
@endcan
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue