Merge remote-tracking branch 'origin/develop'
Some checks failed
CodeQL Security Scan / CodeQL Security Scan (javascript) (push) Has been cancelled
Codacy Security Scan / Codacy Security Scan (push) Has been cancelled
Docker images (Alpine) / docker (push) Has been cancelled
Docker images / docker (push) Has been cancelled
Tests in MySQL / PHP ${{ matrix.php-version }} (8.1) (push) Has been cancelled
Tests in MySQL / PHP ${{ matrix.php-version }} (8.2) (push) Has been cancelled
Tests in MySQL / PHP ${{ matrix.php-version }} (8.3) (push) Has been cancelled
Tests in SQLite / PHP ${{ matrix.php-version }} (8.1.1) (push) Has been cancelled

This commit is contained in:
snipe 2024-08-23 17:58:08 +01:00
commit 4ef85bd529
2 changed files with 34 additions and 38 deletions

View file

@ -237,6 +237,20 @@
</div> </div>
@endcan @endcan
<div class="col-md-12 hidden-print" style="padding-top: 5px;">
{{ Form::open([
'method' => 'POST',
'route' => ['hardware/bulkedit'],
'class' => 'form-inline',
'id' => 'bulkForm']) }}
<input type="hidden" name="bulk_actions" value="labels" />
<input type="hidden" name="ids[{{$asset->id}}]" value="{{ $asset->id }}" />
<button class="btn btn-block btn-social btn-sm btn-default" id="bulkEdit"{{ (!$asset->model ? ' disabled' : '') }}{!! (!$asset->model ? ' data-tooltip="true" title="'.trans('admin/hardware/general.model_invalid').'"' : '') !!}>
<x-icon type="assets" />
{{ trans_choice('button.generate_labels', 1) }}</button>
{{ Form::close() }}
</div>
@can('delete', $asset) @can('delete', $asset)
<div class="col-md-12 hidden-print" style="padding-top: 30px; padding-bottom: 30px;"> <div class="col-md-12 hidden-print" style="padding-top: 30px; padding-bottom: 30px;">
@if ($asset->deleted_at=='') @if ($asset->deleted_at=='')
@ -1052,28 +1066,6 @@
{{ ($asset->userRequests) ? (int) $asset->userRequests->count() : '0' }} {{ ($asset->userRequests) ? (int) $asset->userRequests->count() : '0' }}
</div> </div>
</div> </div>
<div class="row hidden-print">
<div class="col-md-3">
<strong>
{{ trans('general.label') }}
</strong>
</div>
<div class="col-md-9 hidden-print">
{{ Form::open([
'method' => 'POST',
'route' => ['hardware/bulkedit'],
'class' => 'form-inline',
'id' => 'bulkForm']) }}
<input type="hidden" name="bulk_actions" value="labels" />
<input type="hidden" name="ids[{{$asset->id}}]" value="{{ $asset->id }}" />
<button class="btn btn-sm btn-default" id="bulkEdit"{{ (!$asset->model ? ' disabled' : '') }}{!! (!$asset->model ? ' data-tooltip="true" title="'.trans('admin/hardware/general.model_invalid').'"' : '') !!}>
<x-icon type="assets" />
{{ trans_choice('button.generate_labels', 1) }}</button>
{{ Form::close() }}
</div>
</div>
</div> <!--/end striped container--> </div> <!--/end striped container-->
</div> <!-- end col-md-9 --> </div> <!-- end col-md-9 -->

View file

@ -209,18 +209,18 @@
@if(!empty($user->email) && ($user->allAssignedCount() != '0')) @if(!empty($user->email) && ($user->allAssignedCount() != '0'))
<form action="{{ route('users.email',['userId'=> $user->id]) }}" method="POST"> <form action="{{ route('users.email',['userId'=> $user->id]) }}" method="POST">
{{ csrf_field() }} {{ csrf_field() }}
<button style="width: 100%;" class="btn btn-sm btn-primary btn-social hidden-print" rel="noopener"> <button class="btn-block btn btn-sm btn-primary btn-social hidden-print" rel="noopener">
<x-icon type="email" /> <x-icon type="email" />
{{ trans('admin/users/general.email_assigned') }} {{ trans('admin/users/general.email_assigned') }}
</button> </button>
</form> </form>
@elseif(!empty($user->email) && ($user->allAssignedCount() == '0')) @elseif(!empty($user->email) && ($user->allAssignedCount() == '0'))
<button style="width: 100%;" class="btn btn-sm btn-primary btn-social hidden-print" rel="noopener" disabled title="{{ trans('admin/users/message.user_has_no_assets_assigned') }}"> <button class="btn btn-block btn-sm btn-primary btn-social hidden-print" rel="noopener" disabled title="{{ trans('admin/users/message.user_has_no_assets_assigned') }}">
<x-icon type="email" /> <x-icon type="email" />
{{ trans('admin/users/general.email_assigned') }} {{ trans('admin/users/general.email_assigned') }}
</button> </button>
@else @else
<button style="width: 100%;" class="btn btn-sm btn-primary btn-social hidden-print" rel="noopener" disabled title="{{ trans('admin/users/message.user_has_no_email') }}"> <button class="btn btn-block btn-sm btn-primary btn-social hidden-print" rel="noopener" disabled title="{{ trans('admin/users/message.user_has_no_email') }}">
<x-icon type="email" /> <x-icon type="email" />
{{ trans('admin/users/general.email_assigned') }} {{ trans('admin/users/general.email_assigned') }}
</button> </button>
@ -231,16 +231,16 @@
@can('update', $user) @can('update', $user)
@if (($user->activated == '1') && ($user->ldap_import == '0')) @if (($user->activated == '1') && ($user->ldap_import == '0'))
<div class="col-md-12" style="padding-top: 5px;"> <div class="col-md-12" style="padding-top: 5px;">
@if($user->email != '') @if (($user->email != '') && ($user->activated=='1'))
<form action="{{ route('users.password',['userId'=> $user->id]) }}" method="POST"> <form action="{{ route('users.password',['userId'=> $user->id]) }}" method="POST">
{{ csrf_field() }} {{ csrf_field() }}
<button style="width: 100%;" class="btn btn-sm btn-primary btn-social hidden-print"> <button class="btn btn-block btn-sm btn-primary btn-social hidden-print">
<x-icon type="password" /> <x-icon type="password" />
{{ trans('button.send_password_link') }} {{ trans('button.send_password_link') }}
</button> </button>
</form> </form>
@else @else
<button style="width: 100%;" class="btn btn-sm btn-primary btn-social hidden-print" rel="noopener" disabled title="{{ trans('admin/users/message.user_has_no_email') }}"> <button class="btn btn-block btn-sm btn-primary btn-social hidden-print" rel="noopener" disabled title="{{ trans('admin/users/message.user_has_no_email') }}">
<x-icon type="email" /> <x-icon type="email" />
{{ trans('button.send_password_link') }} {{ trans('button.send_password_link') }}
</button> </button>
@ -251,7 +251,7 @@
@can('create', $user) @can('create', $user)
<div class="col-md-12" style="padding-top: 5px;"> <div class="col-md-12" style="padding-top: 5px;">
<a href="{{ route('users.clone.show', $user->id) }}" style="width: 100%;" class="btn btn-sm btn-info btn-social hidden-print"> <a href="{{ route('users.clone.show', $user->id) }}" class="btn btn-block btn-sm btn-info btn-social hidden-print">
<x-icon type="clone" /> <x-icon type="clone" />
{{ trans('admin/users/general.clone') }} {{ trans('admin/users/general.clone') }}
</a> </a>
@ -263,16 +263,12 @@
@if ($user->deleted_at=='') @if ($user->deleted_at=='')
<div class="col-md-12" style="padding-top: 30px;"> <div class="col-md-12" style="padding-top: 30px;">
@if ($user->isDeletable()) @if ($user->isDeletable())
<form action="{{route('users.destroy',$user->id)}}" method="POST"> <a href="#" class="btn-block delete-asset btn btn-sm btn-danger btn-social hidden-print" data-toggle="modal" data-title="{{ trans('general.delete') }}" data-content="{{ trans('general.sure_to_delete_var', ['item' => $user->present()->fullName]) }}" data-target="#dataConfirmModal">
{{csrf_field()}}
{{ method_field("DELETE")}}
<button style="width: 100%;" class="btn btn-sm btn-warning btn-social hidden-print">
<x-icon type="delete" /> <x-icon type="delete" />
{{ trans('button.delete')}} {{ trans('button.delete')}}
</button> </a>
</form>
@else @else
<button style="width: 100%;" class="btn btn-sm btn-warning btn-social hidden-print disabled"> <button class="btn-block btn btn-sm btn-danger btn-social hidden-print disabled">
<x-icon type="delete" /> <x-icon type="delete" />
{{ trans('button.delete')}} {{ trans('button.delete')}}
</button> </button>
@ -285,7 +281,7 @@
<input type="hidden" name="bulk_actions" value="delete" /> <input type="hidden" name="bulk_actions" value="delete" />
<input type="hidden" name="ids[{{ $user->id }}]" value="{{ $user->id }}" /> <input type="hidden" name="ids[{{ $user->id }}]" value="{{ $user->id }}" />
<button style="width: 100%;" class="btn btn-sm btn-danger btn-social hidden-print"> <button class="btn btn-block btn-sm btn-danger btn-social hidden-print">
<x-icon type="checkin-and-delete" /> <x-icon type="checkin-and-delete" />
{{ trans('button.checkin_and_delete') }} {{ trans('button.checkin_and_delete') }}
</button> </button>
@ -295,7 +291,7 @@
<div class="col-md-12" style="padding-top: 5px;"> <div class="col-md-12" style="padding-top: 5px;">
<form method="POST" action="{{ route('users.restore.store', $user->id) }}"> <form method="POST" action="{{ route('users.restore.store', $user->id) }}">
@csrf @csrf
<button style="width: 100%;" class="btn btn-sm btn-warning btn-social hidden-print"> <button class="btn btn-block btn-sm btn-warning btn-social hidden-print">
<x-icon type="restore" /> <x-icon type="restore" />
{{ trans('button.restore') }} {{ trans('button.restore') }}
</button> </button>
@ -1201,6 +1197,14 @@
<script nonce="{{ csrf_token() }}"> <script nonce="{{ csrf_token() }}">
$(function () { $(function () {
$('#dataConfirmModal').on('show.bs.modal', function (event) {
var content = $(event.relatedTarget).data('content');
var title = $(event.relatedTarget).data('title');
$(this).find(".modal-body").text(content);
$(this).find(".modal-header").text(title);
});
$("#two_factor_reset").click(function(){ $("#two_factor_reset").click(function(){
$("#two_factor_resetrow").removeClass('success'); $("#two_factor_resetrow").removeClass('success');
$("#two_factor_resetrow").removeClass('danger'); $("#two_factor_resetrow").removeClass('danger');