mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-28 06:59:41 -08:00
296de34e8a
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
112 lines
5 KiB
PHP
112 lines
5 KiB
PHP
@extends('layouts/default')
|
|
|
|
{{-- Page title --}}
|
|
@section('title')
|
|
{{ trans('general.audit') }}
|
|
@parent
|
|
@stop
|
|
|
|
{{-- Page content --}}
|
|
@section('content')
|
|
|
|
<style>
|
|
|
|
.input-group {
|
|
padding-left: 0px !important;
|
|
}
|
|
</style>
|
|
|
|
<div class="row">
|
|
<!-- left column -->
|
|
<div class="col-md-7">
|
|
<div class="box box-default">
|
|
|
|
{{ Form::open([
|
|
'method' => 'POST',
|
|
'route' => ['asset.audit.store', $asset->id],
|
|
'files' => true,
|
|
'class' => 'form-horizontal' ]) }}
|
|
|
|
<div class="box-header with-border">
|
|
<h3 class="box-title"> {{ trans('admin/hardware/form.tag') }} {{ $asset->asset_tag }}</h3>
|
|
</div>
|
|
<div class="box-body">
|
|
{{csrf_field()}}
|
|
@if ($asset->model->name)
|
|
<!-- Asset name -->
|
|
<div class="form-group {{ $errors->has('name') ? 'error' : '' }}">
|
|
{{ Form::label('name', trans('admin/hardware/form.model'), array('class' => 'col-md-3 control-label')) }}
|
|
<div class="col-md-8">
|
|
<p class="form-control-static">{{ $asset->model->name }}</p>
|
|
</div>
|
|
</div>
|
|
@endif
|
|
|
|
<!-- Asset Name -->
|
|
<div class="form-group {{ $errors->has('name') ? 'error' : '' }}">
|
|
{{ Form::label('name', trans('admin/hardware/form.name'), array('class' => 'col-md-3 control-label')) }}
|
|
<div class="col-md-8">
|
|
<p class="form-control-static">{{ $asset->name }}</p>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Locations -->
|
|
@include ('partials.forms.edit.location-select', ['translated_name' => trans('general.location'), 'fieldname' => 'location_id'])
|
|
|
|
<!-- Update location -->
|
|
<div class="form-group">
|
|
<div class="col-sm-offset-3 col-md-9">
|
|
<label>
|
|
<input type="checkbox" value="1" name="update_location" class="minimal" {{ Request::old('update_location') == '1' ? ' checked="checked"' : '' }}> Update asset location
|
|
</label>
|
|
|
|
@include ('partials.more-info', ['helpText' => trans('help.audit_help'), 'helpPosition' => 'right'])
|
|
|
|
|
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<!-- Next Audit -->
|
|
<div class="form-group {{ $errors->has('next_audit_date') ? 'error' : '' }}">
|
|
{{ Form::label('name', trans('general.next_audit_date'), array('class' => 'col-md-3 control-label')) }}
|
|
<div class="col-md-9">
|
|
<div class="input-group date col-md-5" data-provide="datepicker" data-date-format="yyyy-mm-dd">
|
|
<input type="text" class="form-control" placeholder="{{ trans('general.next_audit_date') }}" name="next_audit_date" id="next_audit_date" value="{{ Request::old('next_audit_date', $next_audit_date) }}">
|
|
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
|
</div>
|
|
{!! $errors->first('next_audit_date', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<!-- Note -->
|
|
<div class="form-group {{ $errors->has('note') ? 'error' : '' }}">
|
|
{{ Form::label('note', trans('admin/hardware/form.notes'), array('class' => 'col-md-3 control-label')) }}
|
|
<div class="col-md-8">
|
|
<textarea class="col-md-6 form-control" id="note" name="note">{{ Request::old('note', $asset->note) }}</textarea>
|
|
{!! $errors->first('note', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<!-- Images -->
|
|
@include ('partials.forms.edit.image-upload')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div> <!--/.box-body-->
|
|
<div class="box-footer">
|
|
<a class="btn btn-link" href="{{ URL::previous() }}"> {{ trans('button.cancel') }}</a>
|
|
<button type="submit" class="btn btn-success pull-right"><i class="fa fa-check icon-white"></i> {{ trans('general.audit') }}</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div> <!--/.col-md-7-->
|
|
</div>
|
|
@stop
|