mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-25 21:54:14 -08:00
* Fixed #6301: Do not allow duplicate asset tags * Display error message for single asset_tag failure
This commit is contained in:
parent
b8f8d49927
commit
704209de9c
|
@ -171,8 +171,8 @@ class AssetsController extends Controller
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Was the asset created?
|
// Validate the asset before saving
|
||||||
if ($asset->save()) {
|
if ($asset->isValid() && $asset->save()) {
|
||||||
|
|
||||||
if (request('assigned_user')) {
|
if (request('assigned_user')) {
|
||||||
$target = User::find(request('assigned_user'));
|
$target = User::find(request('assigned_user'));
|
||||||
|
|
|
@ -35,6 +35,7 @@
|
||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
{!! $errors->first('asset_tags', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
{!! $errors->first('asset_tags', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||||
|
{!! $errors->first('asset_tag', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||||
</div>
|
</div>
|
||||||
@include ('partials.forms.edit.serial', ['fieldname'=> 'serials[1]', 'translated_serial' => trans('admin/hardware/form.serial')])
|
@include ('partials.forms.edit.serial', ['fieldname'=> 'serials[1]', 'translated_serial' => trans('admin/hardware/form.serial')])
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue