snipe-it/resources/views/kits/edit.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

155 lines
7.3 KiB
PHP

@extends('layouts/edit-form', [
'createText' => trans('admin/kits/general.create'),
'updateText' => trans('admin/kits/general.update'),
'formAction' => (isset($item->id)) ? route('kits.update', ['kit' => $item->id]) : route('kits.store'),
])
{{-- Page content --}}
@section('inputFields')
@include ('partials.forms.edit.name', ['translated_name' => 'Name']) {{-- TODO: trans --}}
@stop
@section('content')
@parent
{{-- Assets by model --}}
<div class="row">
<div class="col-md-12">
<div class="box box-default">
<div class="box-header with-border">
<h3 class="box-title"><span>{{ trans('general.asset_models') }}</span></h3>
</div>
<div class="box-body">
<div class="table-responsive">
<table
data-cookie-id-table="kitModelsTable"
data-columns="{{ \App\Presenters\PredefinedKitPresenter::dataTableModels() }}"
data-pagination="true"
data-search="true"
data-side-pagination="server"
data-show-columns="true"
data-show-export="true"
data-show-refresh="true"
data-sort-order="asc"
data-sort-name="name"
id="kitModelsTable"
class="table table-striped snipe-table"
data-url="{{ route('api.kits.models.index', $item->id) }}"
data-export-options='{
"fileName": "export-kit-models-{{ date('Y-m-d') }}",
"ignoreColumn": ["actions","image","change","checkbox","checkincheckout","icon"]
}'>
</table>
<a href="{{ route('modal.kit.model', ['kit' => $item->id]) }}" data-refresh="kitModelsTable" data-toggle="modal" data-target="#createModal" class="btn btn-primary pull-right"><i class="fa fa-plus icon-white"></i> Append</a>
</div>
</div> <!--.box-body-->
</div> <!-- /.box.box-default-->
</div> <!-- .col-md-12-->
</div>
{{-- Licenses --}}
<div class="row">
<div class="col-md-12">
<div class="box box-default">
<div class="box-header with-border">
<h3 class="box-title">Licenses{{-- TODO: trans --}}</h3>
</div>
<div class="box-body">
<div class="table-responsive">
<table
data-cookie-id-table="kitLicensesTable"
data-columns="{{ \App\Presenters\PredefinedKitPresenter::dataTableLicenses() }}"
data-pagination="true"
data-search="true"
data-side-pagination="server"
data-show-columns="true"
data-show-export="true"
data-show-refresh="true"
data-sort-order="asc"
data-sort-name="name"
id="kitLicensesTable"
class="table table-striped snipe-table"
data-url="{{ route('api.kits.licenses.index', $item->id) }}"
data-export-options='{
"fileName": "export-kit-models-{{ date('Y-m-d') }}",
"ignoreColumn": ["actions","image","change","checkbox","checkincheckout","icon"]
}'>
</table>
<a href="{{ route('modal.kit.license', ['kit' => $item->id]) }}" data-refresh="kitLicensesTable" data-toggle="modal" data-target="#createModal" class="btn btn-primary pull-right"><i class="fa fa-plus icon-white"></i> Append{{-- TODO: trans --}}</a>
</div>
</div> <!--.box-body-->
</div> <!-- /.box.box-default-->
</div> <!-- .col-md-12-->
</div>
{{-- Consumables --}}
<div class="row">
<div class="col-md-12">
<div class="box box-default">
<div class="box-header with-border">
<h3 class="box-title">Consumables{{-- TODO: trans --}}</h3>
</div>
<div class="box-body">
<div class="table-responsive">
<table
data-cookie-id-table="kitConsumablesTable"
data-columns="{{ \App\Presenters\PredefinedKitPresenter::dataTableConsumables() }}"
data-pagination="true"
data-search="true"
data-side-pagination="server"
data-show-columns="true"
data-show-export="true"
data-show-refresh="true"
data-sort-order="asc"
data-sort-name="name"
id="kitConsumablesTable"
class="table table-striped snipe-table"
data-url="{{ route('api.kits.consumables.index', $item->id) }}"
data-export-options='{
"fileName": "export-kit-models-{{ date('Y-m-d') }}",
"ignoreColumn": ["actions","image","change","checkbox","checkincheckout","icon"]
}'>
</table>
<a href="{{ route('modal.kit.consumable', ['kit' => $item->id]) }}" data-refresh="kitConsumablesTable" data-toggle="modal" data-target="#createModal" class="btn btn-primary pull-right"><i class="fa fa-plus icon-white"></i> Append{{-- TODO: trans --}}</a>
</div>
</div> <!--.box-body-->
</div> <!-- /.box.box-default-->
</div> <!-- .col-md-12-->
</div>
{{-- Accessories --}}
<div class="row">
<div class="col-md-12">
<div class="box box-default">
<div class="box-header with-border">
<h3 class="box-title">Accessories{{-- TODO: trans --}}</h3>
</div>
<div class="box-body">
<div class="table-responsive">
<table
data-cookie-id-table="kitAccessoriesTable"
data-columns="{{ \App\Presenters\PredefinedKitPresenter::dataTableAccessories() }}"
data-pagination="true"
data-search="true"
data-side-pagination="server"
data-show-columns="true"
data-show-export="true"
data-show-refresh="true"
data-sort-order="asc"
data-sort-name="name"
id="kitAccessoriesTable"
class="table table-striped snipe-table"
data-url="{{ route('api.kits.accessories.index', $item->id) }}"
data-export-options='{
"fileName": "export-kit-models-{{ date('Y-m-d') }}",
"ignoreColumn": ["actions","image","change","checkbox","checkincheckout","icon"]
}'>
</table>
<a href="{{ route('modal.kit.accessory', ['kit' => $item->id]) }}" data-refresh="kitAccessoriesTable" data-toggle="modal" data-target="#createModal" class="btn btn-primary pull-right"><i class="fa fa-plus icon-white"></i> Append{{-- TODO: trans --}}</a>
</div>
</div> <!--.box-body-->
</div> <!-- /.box.box-default-->
</div> <!-- .col-md-12-->
</div>
@stop
@section('moar_scripts')
@include ('partials.bootstrap-table')
@stop