Show or hide all eulas at once when printing multiple users

This commit is contained in:
Marcus Moore 2024-09-23 16:43:14 -07:00
parent 4b02db5031
commit 8b3b68b308
No known key found for this signature in database
2 changed files with 22 additions and 8 deletions

View file

@ -282,6 +282,7 @@ return [
'status_label' => 'Status Label', 'status_label' => 'Status Label',
'status' => 'Status', 'status' => 'Status',
'accept_eula' => 'Acceptance Agreement', 'accept_eula' => 'Acceptance Agreement',
'show_or_hide_eulas' => 'Show/Hide EULAs',
'supplier' => 'Supplier', 'supplier' => 'Supplier',
'suppliers' => 'Suppliers', 'suppliers' => 'Suppliers',
'sure_to_delete' => 'Are you sure you wish to delete', 'sure_to_delete' => 'Are you sure you wish to delete',

View file

@ -62,6 +62,16 @@
</head> </head>
<body> <body>
{{-- If we are rendering multiple users we'll add the ability to show/hide EULAs for all of them at once via this button --}}
@if (count($users) > 1)
<div class="pull-right">
<span>{{ trans('general.show_or_hide_eulas') }}</span>
<button class="btn btn-default hidden-print" type="button" data-toggle="collapse" data-target=".eula-row" aria-expanded="false" aria-controls="eula-row" title="EULAs">
<i class="fa fa-eye-slash"></i>
</button>
</div>
@endif
@if ($snipeSettings->logo_print_assets=='1') @if ($snipeSettings->logo_print_assets=='1')
@if ($snipeSettings->brand == '3') @if ($snipeSettings->brand == '3')
@ -374,15 +384,18 @@
</table> </table>
@endif @endif
{{-- This may have been render at the top of the page if we're rendering more than one user... --}}
@if (count($users) === 1)
<p></p> <p></p>
<div class="pull-right"> <div class="pull-right">
<button class="btn btn-default hidden-print" type="button" data-toggle="collapse" data-target="#eula-row" aria-expanded="false" aria-controls="eula-row" title="EULAs"> <button class="btn btn-default hidden-print" type="button" data-toggle="collapse" data-target=".eula-row" aria-expanded="false" aria-controls="eula-row" title="EULAs">
<i class="fa fa-eye-slash"></i> <i class="fa fa-eye-slash"></i>
</button> </button>
</div> </div>
@endif
<table style="margin-top: 80px;"> <table style="margin-top: 80px;">
<tr class="collapse" id="eula-row"> <tr class="collapse eula-row">
<td style="padding-right: 10px; vertical-align: top; font-weight: bold;">EULA</td> <td style="padding-right: 10px; vertical-align: top; font-weight: bold;">EULA</td>
<td style="padding-right: 10px; vertical-align: top; padding-bottom: 80px;" colspan="3"> <td style="padding-right: 10px; vertical-align: top; padding-bottom: 80px;" colspan="3">
@php @php