snipe-it/resources/views/users/confirm-bulk-delete.blade.php
snipe 296de34e8a
WIP: Upgrade develop to Laravel 6.6.1 (#7637)
I'm going ahead and merging this, since the upgrade doesn't break Flysystem any worse than the current develop is broken, so far as I can tell. 


* Upgraded framework to Laravel 6

### TO DO:

- Fix password restriction rules- the old library isn’t compatible with Laravel 6 :(
- Figure out why in-app API calls are returning “Unauthorized”

* More updates from Input:: to Request:: helper

* Switch to Request:: from Input

* Added passport config

* Fixed goofy password minimum in seeder

* Added laravel/helpers

* Changed ($item)  to ($item->id) in forms

I have no idea why this is necessary

* Changed ($item) to ($item->id) in forms

* Updated API middleware to auth:api

* Updated with added laravel auth.php values

* FIxed *&!^$%^&$^%!!!! ajax issue

* Switch to Request::get from Input::get

* Switched to Request facade

* Added password security minimums back in

The package we were using has not been updated to Laravel v6, so I created custom validators instead

* Added language strings for error messages for password rules

* Fixed `($item)` issue in formActions for partials
2019-12-10 19:32:50 -08:00

111 lines
4.3 KiB
PHP

@extends('layouts/default')
{{-- Page title --}}
@section('title')
Bulk Checkin & Delete
@parent
@stop
{{-- Page content --}}
@section('content')
<div class="row">
<div class="col-md-8 col-md-offset-2">
<div class="box box-default">
<form class="form-horizontal" role="form" method="post" action="{{ route('users/bulksave') }}">
<div class="box-body">
<!-- CSRF Token -->
{{csrf_field()}}
<div class="col-md-12">
<div class="callout callout-danger">
<i class="fa fa-exclamation-circle"></i>
<strong>WARNING: </strong>
You are about to delete the {{ count($users) }} user(s) listed below. Super admin names are highlighted in red.
</div>
</div>
@if (config('app.lock_passwords'))
<div class="col-md-12">
<div class="callout callout-warning">
<p>{{ trans('feature_disabled') }}</p>
</div>
</div>
@endif
<div class="col-md-12">
<div class="table-responsive">
<table class="display table table-hover">
<thead>
<tr>
<th class="col-md-1"></th>
<th class="col-md-6">Name</th>
<th class="col-md-5">Groups</th>
<th class="col-md-5">Assets</th>
<th class="col-md-5">Accessories</th>
<th class="col-md-5">Licenses</th>
</tr>
</thead>
<tbody>
@foreach ($users as $user)
<tr {!! ($user->isSuperUser() ? ' class="danger"':'') !!}>
<td>
@if (Auth::id()!=$user->id)
<input type="checkbox" name="ids[]" value="{{ $user->id }}" checked="checked">
@else
<input type="checkbox" name="ids[]" value="{{ $user->id }}" disabled>
@endif
</td>
<td>
<span {{ (Auth::user()->id==$user->id ? ' style="text-decoration: line-through"' : '') }}>
{{ $user->present()->fullName() }} ({{ $user->username }})
</span>
{{ (Auth::id()==$user->id ? ' (cannot delete yourself)' : '') }}
</td>
<td>
@foreach ($user->groups as $group)
<a href=" {{ route('groups.update', $group->id) }}" class="label label-default">
{{ $group->name }}
</a>&nbsp;
@endforeach
</td>
<td>
{{ number_format($user->assets()->count()) }}
</td>
<td>
{{ number_format($user->accessories()->count()) }}
</td>
<td>
{{ number_format($user->licenses()->count()) }}
</td>
</tr>
@endforeach
</tbody>
<tfoot>
<tr>
<td colspan="6" class="warning">
{{ Form::select('status_id', $statuslabel_list , Request::old('status_id'), array('class'=>'select2', 'style'=>'width:250px')) }}
<label>Update all assets for these users to this status</label>
</td>
</tr>
<tr>
<td colspan="6" class="warning">
<label><input type="checkbox" name="ids['.e($user->id).']" checked> Check in all properties associated with these users</label>
</td>
</tr>
</tfoot>
</table>
</div> <!--/table-responsive-->
</div><!--/col-md-12-->
</div> <!--/box-body-->
<div class="box-footer text-right">
<a class="btn btn-link" href="{{ URL::previous() }}">{{ trans('button.cancel') }}</a>
<button type="submit" class="btn btn-success"><i class="fa fa-check icon-white"></i> {{ trans('button.submit') }}</button>
</div><!-- /.box-footer -->
</form>
</div>
</div>
</div>
@stop