@extends('layouts/default') {{-- Page title --}} @section('title') @if ($asset->id) {{ trans('admin/hardware/form.update') }} @else {{ trans('admin/hardware/form.create') }} @endif @parent @stop @section('header_right') {{ trans('general.back') }} @stop @include('partials/modals') {{-- Page content --}} @section('content')
@if ($asset->id)
@else @endif
@if ($asset->id)

{{ $asset->showAssetName() }}

@endif
@if ($asset->id) @else @endif {!! $errors->first('asset_tag', ' :message') !!}
@if (isset($selected_model)) {{ Form::select('model_id', $model_list , $selected_model->id, array('class'=>'select2 model', 'style'=>'width:100%','id' =>'model_select_id')) }} @else {{ Form::select('model_id', $model_list , Input::old('model_id', $asset->model_id), array('class'=>'select2 model', 'style'=>'width:100%','id' =>'model_select_id')) }} @endif {!! $errors->first('model_id', ' :message') !!}
@if ($asset->model && $asset->model->fieldset) model; ?> @endif @if (Input::old('model_id')) @elseif (isset($selected_model)) @endif @if (isset($model) && $model) @include("models/custom_fields_form",["model" => $model]) @endif
{{ Form::select('status_id', $statuslabel_list , Input::old('status_id', $asset->status_id), array('class'=>'select2 status_id', 'style'=>'width:100%','id'=>'status_select_id')) }}

{{ trans('admin/hardware/form.help_checkout') }}

{!! $errors->first('status_id', ' :message') !!}
@if (!$asset->id) @endif
{!! $errors->first('serial', ' :message') !!}
{!! $errors->first('name', ' :message') !!}
@if (\App\Models\Company::isCurrentUserAuthorized())
{{ Form::label('company_id', trans('general.company')) }}
{{ Form::select('company_id', $company_list , Input::old('company_id', $asset->company_id), ['class'=>'select2', 'style'=>'width:100%']) }} {!! $errors->first('company_id', ' :message') !!}
@endif
{!! $errors->first('purchase_date', ' :message') !!}
{{ Form::select('supplier_id', $supplier_list , Input::old('supplier_id', $asset->supplier_id), array('class'=>'select2', 'style'=>'width:100%','id'=>'supplier_select_id')) }} {!! $errors->first('supplier_id', ' :message') !!}
{!! $errors->first('order_number', ' :message') !!}
@if (($asset->id) && ($asset->assetloc)) {{ $asset->assetloc->currency }} @else {{ \App\Models\Setting::first()->default_currency }} @endif {!! $errors->first('purchase_cost', ' :message') !!}
{{ trans('admin/hardware/form.months') }}
{!! $errors->first('warranty_months', ' :message') !!}
{!! $errors->first('notes', ' :message') !!}
{{ Form::select('rtd_location_id', $location_list , Input::old('rtd_location_id', $asset->rtd_location_id), array('class'=>'select2', 'style'=>'width:100%','id'=>'rtd_location_select')) }} {!! $errors->first('rtd_location_id', ' :message') !!}
@if ($asset->image)
{{ Form::checkbox('image_delete'),array('class' => 'minimal') }} {!! $errors->first('image_delete', ':message') !!}
@endif
{!! $errors->first('image', ':message') !!}
@section('moar_scripts') @stop @stop