Skip to content

A free open source IT asset/license management system

Fixed parameter for audit

snipe75db0d9e66ea
diff --git a/resources/views/hardware/audit.blade.php b/resources/views/hardware/audit.blade.php
index 2801a9ed89..baeb56d59f 100644
--- a/resources/views/hardware/audit.blade.php
+++ b/resources/views/hardware/audit.blade.php
@@ -21,7 +21,7 @@
<div class="col-md-8 col-md-offset-2">
<div class="box box-default">
- <form method="POST" action="{{ route('asset.audit.store', $asset->id) }}" accept-charset="UTF-8" class="form-horizontal" enctype="multipart/form-data">
+ <form method="POST" action="{{ route('asset.audit.store', $asset) }}" accept-charset="UTF-8" class="form-horizontal" enctype="multipart/form-data">
<div class="box-header with-border">
<h2 class="box-title"> {{ trans('admin/hardware/form.tag') }} {{ $asset->asset_tag }}</h2>
@@ -54,6 +54,8 @@
<!-- Asset Name -->
+
+ @if ($asset->name)
<div class="form-group{{ $errors->has('name') ? ' has-error' : '' }}">
<label for="name" class="col-sm-3 control-label">
{{ trans('general.name') }}
@@ -62,6 +64,7 @@
<p class="form-control-static">{{ $asset->name }}</p>
</div>
</div>
+ @endif
<!-- Locations -->
@include ('partials.forms.edit.location-select', ['translated_name' => trans('general.location'), 'fieldname' => 'location_id'])