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,13 +37,17 @@
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
<!-- Asset Name -->
|
<!-- Asset Name -->
|
||||||
<div class="form-group {{ $errors->has('name') ? 'error' : '' }}">
|
<!-- Only allow an asset name to be changed if the checker-outer has permission to edit the asset -->
|
||||||
{{ Form::label('name', trans('admin/hardware/form.name'), array('class' => 'col-md-3 control-label')) }}
|
@can('update', $asset)
|
||||||
<div class="col-md-8">
|
<div class="form-group {{ $errors->has('name') ? 'error' : '' }}">
|
||||||
<input class="form-control" type="text" name="name" id="name" value="{{ Input::old('name', $asset->name) }}" tabindex="1">
|
{{ Form::label('name', trans('admin/hardware/form.name'), array('class' => 'col-md-3 control-label')) }}
|
||||||
{!! $errors->first('name', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
<div class="col-md-8">
|
||||||
</div>
|
<input class="form-control" type="text" name="name" id="name" value="{{ Input::old('name', $asset->name) }}" tabindex="1">
|
||||||
</div>
|
{!! $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.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'])
|
@include ('partials.forms.edit.user-select', ['translated_name' => trans('general.user'), 'fieldname' => 'assigned_user', 'required'=>'true'])
|
||||||
|
|
Loading…
Reference in a new issue