A free open source IT asset/license management system
Disable the Checkin All Seats button if License is not reassignable
Ivan Nieto Vivanco7bfb5a0667ba
diff --git a/resources/lang/en/admin/licenses/general.php b/resources/lang/en/admin/licenses/general.phpindex 0187d076a3..b2766d063e 100644--- a/resources/lang/en/admin/licenses/general.php+++ b/resources/lang/en/admin/licenses/general.php@@ -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',],diff --git a/resources/views/licenses/view.blade.php b/resources/views/licenses/view.blade.phpindex 8dcf10caf2..950ba1af2c 100755--- a/resources/views/licenses/view.blade.php+++ b/resources/views/licenses/view.blade.php@@ -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