mirror of
https://github.com/snipe/snipe-it.git
synced 2025-02-21 03:15:45 -08:00
Added - check whether the user can edit an asset before allowing them to change the name on checkout
This commit is contained in:
parent
78b6e84774
commit
539c3023b9
|
@ -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'])
|
||||
|
|
Loading…
Reference in a new issue