Added - check whether the user can edit an asset before allowing them to change the name on checkout

This commit is contained in:
snipe 2018-10-15 16:52:45 -07:00
parent 78b6e84774
commit 539c3023b9

View file

@ -37,6 +37,8 @@
@endif
<!-- Asset Name -->
<!-- Only allow an asset name to be changed if the checker-outer has permission to edit the asset -->
@can('update', $asset)
<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">
@ -44,6 +46,8 @@
{!! $errors->first('name', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
</div>
</div>
@endcan
@include ('partials.forms.checkout-selector', ['user_select' => 'true','asset_select' => 'true', 'location_select' => 'true'])
@include ('partials.forms.edit.user-select', ['translated_name' => trans('general.user'), 'fieldname' => 'assigned_user', 'required'=>'true'])