mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-24 21:24:13 -08:00
makes shortcuts optional
This commit is contained in:
parent
46a6a84ecb
commit
6b1784f2ee
|
@ -324,6 +324,7 @@ class SettingsController extends Controller
|
|||
|
||||
$setting->full_multiple_companies_support = $request->input('full_multiple_companies_support', '0');
|
||||
$setting->unique_serial = $request->input('unique_serial', '0');
|
||||
$setting->shortcuts_enabled = $request->input('shortcuts_enabled', '0');
|
||||
$setting->show_images_in_email = $request->input('show_images_in_email', '0');
|
||||
$setting->show_archived_in_list = $request->input('show_archived_in_list', '0');
|
||||
$setting->dashboard_message = $request->input('dashboard_message');
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
@section('header_right')
|
||||
@can('create', \App\Models\Accessory::class)
|
||||
<a href="{{ route('accessories.create') }}" accesskey="n" class="btn btn-primary pull-right"> {{ trans('general.create') }}</a>
|
||||
<a href="{{ route('accessories.create') }}" {{$snipeSettings->shortcuts_enabled == 1 ? "accesskey=n" : ''}} class="btn btn-primary pull-right"> {{ trans('general.create') }}</a>
|
||||
@endcan
|
||||
@stop
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
@section('header_right')
|
||||
@can('create', \App\Models\Component::class)
|
||||
<a href="{{ route('components.create') }}" accesskey="n" class="btn btn-primary pull-right"> {{ trans('general.create') }}</a>
|
||||
<a href="{{ route('components.create') }}" {{$snipeSettings->shortcuts_enabled == 1 ? "accesskey=n" : ''}} class="btn btn-primary pull-right"> {{ trans('general.create') }}</a>
|
||||
@endcan
|
||||
@stop
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
@section('header_right')
|
||||
@can('create', \App\Models\Consumable::class)
|
||||
<a href="{{ route('consumables.create') }}" accesskey="n" class="btn btn-primary pull-right"> {{ trans('general.create') }}</a>
|
||||
<a href="{{ route('consumables.create') }}" {{$snipeSettings->shortcuts_enabled == 1 ? "accesskey=n" : ''}} class="btn btn-primary pull-right"> {{ trans('general.create') }}</a>
|
||||
@endcan
|
||||
@stop
|
||||
|
||||
|
|
|
@ -47,7 +47,7 @@
|
|||
<a href="{{ route('reports/custom') }}" style="margin-right: 5px;" class="btn btn-default">
|
||||
{{ trans('admin/hardware/general.custom_export') }}</a>
|
||||
@can('create', \App\Models\Asset::class)
|
||||
<a href="{{ route('hardware.create') }}" accesskey="n" class="btn btn-primary pull-right"></i> {{ trans('general.create') }}</a>
|
||||
<a href="{{ route('hardware.create') }}" {{$snipeSettings->shortcuts_enabled == 1 ? "n" : ''}} class="btn btn-primary pull-right"></i> {{ trans('general.create') }}</a>
|
||||
@endcan
|
||||
|
||||
@stop
|
||||
|
|
|
@ -144,7 +144,7 @@ dir="{{ Helper::determineLanguageDirection() }}">
|
|||
<ul class="nav navbar-nav">
|
||||
@can('index', \App\Models\Asset::class)
|
||||
<li aria-hidden="true"{!! (Request::is('hardware*') ? ' class="active"' : '') !!}>
|
||||
<a href="{{ url('hardware') }}" accesskey="1" tabindex="-1">
|
||||
<a href="{{ url('hardware') }}" {{$snipeSettings->shortcuts_enabled == 1 ? "accesskey=1" : ''}} tabindex="-1">
|
||||
<i class="fas fa-barcode fa-fw"></i>
|
||||
<span class="sr-only">{{ trans('general.assets') }}</span>
|
||||
</a>
|
||||
|
@ -152,7 +152,7 @@ dir="{{ Helper::determineLanguageDirection() }}">
|
|||
@endcan
|
||||
@can('view', \App\Models\License::class)
|
||||
<li aria-hidden="true"{!! (Request::is('licenses*') ? ' class="active"' : '') !!}>
|
||||
<a href="{{ route('licenses.index') }}" accesskey="2" tabindex="-1">
|
||||
<a href="{{ route('licenses.index') }}" {{$snipeSettings->shortcuts_enabled == 1 ? "accesskey=2" : ''}} tabindex="-1">
|
||||
<i class="far fa-save fa-fw"></i>
|
||||
<span class="sr-only">{{ trans('general.licenses') }}</span>
|
||||
</a>
|
||||
|
@ -160,7 +160,7 @@ dir="{{ Helper::determineLanguageDirection() }}">
|
|||
@endcan
|
||||
@can('index', \App\Models\Accessory::class)
|
||||
<li aria-hidden="true"{!! (Request::is('accessories*') ? ' class="active"' : '') !!}>
|
||||
<a href="{{ route('accessories.index') }}" accesskey="3" tabindex="-1">
|
||||
<a href="{{ route('accessories.index') }}" {{$snipeSettings->shortcuts_enabled == 1 ? "accesskey=3" : ''}} tabindex="-1">
|
||||
<i class="far fa-keyboard fa-fw"></i>
|
||||
<span class="sr-only">{{ trans('general.accessories') }}</span>
|
||||
</a>
|
||||
|
@ -168,7 +168,7 @@ dir="{{ Helper::determineLanguageDirection() }}">
|
|||
@endcan
|
||||
@can('index', \App\Models\Consumable::class)
|
||||
<li aria-hidden="true"{!! (Request::is('consumables*') ? ' class="active"' : '') !!}>
|
||||
<a href="{{ url('consumables') }}" accesskey="4" tabindex="-1">
|
||||
<a href="{{ url('consumables') }}" {{$snipeSettings->shortcuts_enabled == 1 ? "accesskey=4" : ''}} tabindex="-1">
|
||||
<i class="fas fa-tint fa-fw"></i>
|
||||
<span class="sr-only">{{ trans('general.consumables') }}</span>
|
||||
</a>
|
||||
|
@ -176,7 +176,7 @@ dir="{{ Helper::determineLanguageDirection() }}">
|
|||
@endcan
|
||||
@can('view', \App\Models\Component::class)
|
||||
<li aria-hidden="true"{!! (Request::is('components*') ? ' class="active"' : '') !!}>
|
||||
<a href="{{ route('components.index') }}" accesskey="5" tabindex="-1">
|
||||
<a href="{{ route('components.index') }}" {{$snipeSettings->shortcuts_enabled == 1 ? "accesskey=5" : ''}} tabindex="-1">
|
||||
<i class="far fa-hdd fa-fw"></i>
|
||||
<span class="sr-only">{{ trans('general.components') }}</span>
|
||||
</a>
|
||||
|
@ -622,7 +622,7 @@ dir="{{ Helper::determineLanguageDirection() }}">
|
|||
|
||||
@can('view', \App\Models\User::class)
|
||||
<li{!! (Request::is('users*') ? ' class="active"' : '') !!}>
|
||||
<a href="{{ route('users.index') }}" accesskey="6">
|
||||
<a href="{{ route('users.index') }}" {{$snipeSettings->shortcuts_enabled == 1 ? "accesskey=6" : ''}}>
|
||||
<i class="fas fa-users fa-fw"></i>
|
||||
<span>{{ trans('general.people') }}</span>
|
||||
</a>
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
@can('delete', \App\Models\Asset::class)
|
||||
<option value="delete">{{ trans('button.delete') }}</option>
|
||||
@endcan
|
||||
<option value="labels" accesskey="l">{{ trans_choice('button.generate_labels', 2) }}</option>
|
||||
<option value="labels" {{$snipeSettings->shortcuts_enabled == 1 ? "accesskey=l" : ''}}>{{ trans_choice('button.generate_labels', 2) }}</option>
|
||||
@endif
|
||||
</select>
|
||||
|
||||
|
|
|
@ -2,6 +2,6 @@
|
|||
|
||||
<div class="box-footer text-right" style="padding-bottom: 0px;">
|
||||
<a class="btn btn-link pull-left" href="{{ URL::previous() }}">{{ trans('button.cancel') }}</a>
|
||||
<button type="submit" accesskey="s" class="btn btn-primary"><i class="fas fa-check icon-white" aria-hidden="true"></i> {{ trans('general.save') }}</button>
|
||||
<button type="submit" {{$snipeSettings->shortcuts_enabled == 1 ? "accesskey=s" : ''}} class="btn btn-primary"><i class="fas fa-check icon-white" aria-hidden="true"></i> {{ trans('general.save') }}</button>
|
||||
</div>
|
||||
<!-- / partials/forms/edit/submit.blade.php -->
|
||||
|
|
|
@ -170,7 +170,7 @@
|
|||
</div>
|
||||
<div class="col-md-9">
|
||||
<label class="form-control">
|
||||
{{ Form::checkbox('shortcuts_enabled', '0', old('shortcuts_enabled', $setting->require_accept_signature)) }}
|
||||
{{ Form::checkbox('shortcuts_enabled', '1', old('shortcuts_enabled', $setting->shortcuts_enabled)) }}
|
||||
{{ trans('general.yes') }}
|
||||
</label>
|
||||
{!! $errors->first('shortcuts_enabled', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
@if ($snipeSettings->ldap_enabled == 1)
|
||||
<a href="{{ route('ldap/user') }}" class="btn btn-default pull-right"><span class="fas fa-sitemap"></span>{{trans('general.ldap_sync')}}</a>
|
||||
@endif
|
||||
<a href="{{ route('users.create') }}" accesskey="n" class="btn btn-primary pull-right" style="margin-right: 5px;"> {{ trans('general.create') }}</a>
|
||||
<a href="{{ route('users.create') }}" {{$snipeSettings->shortcuts_enabled == 1 ? "n" : ''}} class="btn btn-primary pull-right" style="margin-right: 5px;"> {{ trans('general.create') }}</a>
|
||||
@endcan
|
||||
|
||||
@if (request('status')=='deleted')
|
||||
|
|
Loading…
Reference in a new issue