mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-25 13:44:06 -08:00
Disable the edit button if permission is not allowed
Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
parent
71ebade641
commit
1dfa1da0ee
|
@ -296,6 +296,10 @@
|
|||
|
||||
if ((row.available_actions) && (row.available_actions.update === true)) {
|
||||
actions += '<a href="{{ config('app.url') }}/' + dest + '/' + row.id + '/edit" class="actions btn btn-sm btn-warning" data-tooltip="true" title="{{ trans('general.update') }}"><i class="fas fa-pencil-alt" aria-hidden="true"></i><span class="sr-only">{{ trans('general.update') }}</span></a> ';
|
||||
} else {
|
||||
if ((row.available_actions) && (row.available_actions.update != true)) {
|
||||
actions += '<span data-tooltip="true" title="{{ trans('general.cannot_be_edited') }}"><a class="btn btn-warning btn-sm disabled" onClick="return false;"><i class="fas fa-pencil-alt"></i></a></span> ';
|
||||
}
|
||||
}
|
||||
|
||||
if ((row.available_actions) && (row.available_actions.delete === true)) {
|
||||
|
|
Loading…
Reference in a new issue