Merge pull request #16792 from grokability/add_pa11y

Added pa11y
This commit is contained in:
snipe 2025-04-23 21:17:35 +01:00 committed by GitHub
commit 8fcf7e3b9d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
19 changed files with 363 additions and 201 deletions

103
.pa11yci.json Normal file
View file

@ -0,0 +1,103 @@
{
"standard": "WCAG2AA",
"level": "error",
"defaults": {
"useIncognitoBrowserContext": false,
"timeout": 500000,
"wait": 5000,
"ignore" : [
"WCAG2AA.Principle1.Guideline1_4.1_4_3.G145.Fail",
"WCAG2AA.Principle1.Guideline1_4.1_4_3.G18.Fail"
],
"viewport": {
"width": 1280,
"height": 1024
}
},
"urls": [
{
"__NOTE" : "this should always be FIRST (if browser context is preserved)",
"url": "https://snipe-it.test/login",
"actions": [
"navigate to https://snipe-it.test/login",
"screen capture tests/pa11y/login.png",
"set field input[name='username'] to admin",
"set field input[name='password'] to password",
"click element button[type=submit]",
"wait for url to be https://snipe-it.test/",
"screen capture tests/pa11y/dashboard.png"
]
},
{
"url" : "https://snipe-it.test/admin",
"actions" : [
"navigate to https://snipe-it.test/admin",
"screen capture tests/pa11y/admin-settings.png"
]
},
{
"url" : "https://snipe-it.test/hardware/create",
"actions" : [
"navigate to https://snipe-it.test/hardware/create",
"screen capture tests/pa11y/asset-create.png"
]
},
{
"url" : "https://snipe-it.test/hardware",
"actions" : [
"navigate to https://snipe-it.test/hardware",
"screen capture tests/pa11y/asset-list.png"
]
},
{
"url" : "https://snipe-it.test/hardware/1",
"actions" : [
"navigate to https://snipe-it.test/hardware/1",
"screen capture tests/pa11y/asset-detail.png"
]
},
{
"url" : "https://snipe-it.test/account/view-assets",
"actions" : [
"navigate to https://snipe-it.test/account/view-assets",
"screen capture tests/pa11y/profile.png"
]
},
{
"url" : "https://snipe-it.test/licences",
"actions" : [
"navigate to https://snipe-it.test/licenses",
"screen capture tests/pa11y/license-list.png"
]
},
{
"url" : "https://snipe-it.test/licences/create",
"actions" : [
"navigate to https://snipe-it.test/licenses/create",
"screen capture tests/pa11y/license-create.png"
]
},
{
"url" : "https://snipe-it.test/licences/1",
"actions" : [
"navigate to https://snipe-it.test/licenses/1",
"screen capture tests/pa11y/license-view.png"
]
},
{
"url" : "https://snipe-it.test/accessories",
"actions" : [
"navigate to https://snipe-it.test/accessories",
"screen capture tests/pa11y/accessory-list.png"
]
},
{
"url" : "https://snipe-it.test/accessories/create",
"actions" : [
"navigate to https://snipe-it.test/accessories/create",
"screen capture tests/pa11y/accessory-create.png"
]
}
]
}

24
pa11y.js Normal file
View file

@ -0,0 +1,24 @@
const pa11y = require('pa11y');
pa11y('http://snipe-it.test', {
standard: "WCAG2AA",
level: "error",
defaults: {
"timeout": 500000,
"wait": 2000,
"ignore": [
"WCAG2AA.Principle1.Guideline1_4.1_4_3.G18",
"WCAG2AA.Principle1.Guideline1_4.1_4_3.G18.Fail",
],
"viewport": {
"width": 1280,
"height": 1024
},
},
actions: [
'set field #username to admin',
'set field #password to password',
'click element #submit',
'wait for path to be /',
]
});

View file

@ -1448,4 +1448,8 @@ legend.highlight {
fieldset.bottom-padded { fieldset.bottom-padded {
padding-bottom: 20px; padding-bottom: 20px;
} }
caption.tableCaption {
font-size: 18px;
padding-left: 8px;
}

View file

@ -1079,4 +1079,8 @@ legend.highlight {
fieldset.bottom-padded { fieldset.bottom-padded {
padding-bottom: 20px; padding-bottom: 20px;
} }
caption.tableCaption {
font-size: 18px;
padding-left: 8px;
}

View file

@ -22783,6 +22783,10 @@ legend.highlight {
fieldset.bottom-padded { fieldset.bottom-padded {
padding-bottom: 20px; padding-bottom: 20px;
} }
caption.tableCaption {
font-size: 18px;
padding-left: 8px;
}
.select2-container { .select2-container {
@ -24348,4 +24352,8 @@ legend.highlight {
fieldset.bottom-padded { fieldset.bottom-padded {
padding-bottom: 20px; padding-bottom: 20px;
} }
caption.tableCaption {
font-size: 18px;
padding-left: 8px;
}

View file

@ -2,8 +2,8 @@
"/js/build/app.js": "/js/build/app.js?id=19253af36b58ed3fb6770c7bb944f079", "/js/build/app.js": "/js/build/app.js?id=19253af36b58ed3fb6770c7bb944f079",
"/css/dist/skins/skin-black-dark.css": "/css/dist/skins/skin-black-dark.css?id=06c13e817cc022028b3f4a33c0ca303a", "/css/dist/skins/skin-black-dark.css": "/css/dist/skins/skin-black-dark.css?id=06c13e817cc022028b3f4a33c0ca303a",
"/css/dist/skins/_all-skins.css": "/css/dist/skins/_all-skins.css?id=79aa889a1a6691013be6c342ca7391cd", "/css/dist/skins/_all-skins.css": "/css/dist/skins/_all-skins.css?id=79aa889a1a6691013be6c342ca7391cd",
"/css/build/overrides.css": "/css/build/overrides.css?id=7a32a6189e49ee50acd00a43a8b70362", "/css/build/overrides.css": "/css/build/overrides.css?id=c05ff69c5fa7cae36e9235c2f1521a55",
"/css/build/app.css": "/css/build/app.css?id=0e00c581b472b65d800121881b835994", "/css/build/app.css": "/css/build/app.css?id=b9bb079547d79412ea5a5127855c41fb",
"/css/build/AdminLTE.css": "/css/build/AdminLTE.css?id=4ea0068716c1bb2434d87a16d51b98c9", "/css/build/AdminLTE.css": "/css/build/AdminLTE.css?id=4ea0068716c1bb2434d87a16d51b98c9",
"/css/dist/skins/skin-yellow.css": "/css/dist/skins/skin-yellow.css?id=7b315b9612b8fde8f9c5b0ddb6bba690", "/css/dist/skins/skin-yellow.css": "/css/dist/skins/skin-yellow.css?id=7b315b9612b8fde8f9c5b0ddb6bba690",
"/css/dist/skins/skin-yellow-dark.css": "/css/dist/skins/skin-yellow-dark.css?id=ea22079836a432d7f46a5d390c445e13", "/css/dist/skins/skin-yellow-dark.css": "/css/dist/skins/skin-yellow-dark.css?id=ea22079836a432d7f46a5d390c445e13",
@ -19,7 +19,7 @@
"/css/dist/skins/skin-blue.css": "/css/dist/skins/skin-blue.css?id=a82b065847bf3cd5d713c04ee8dc86c6", "/css/dist/skins/skin-blue.css": "/css/dist/skins/skin-blue.css?id=a82b065847bf3cd5d713c04ee8dc86c6",
"/css/dist/skins/skin-blue-dark.css": "/css/dist/skins/skin-blue-dark.css?id=6ea836d8126de101081c49abbdb89417", "/css/dist/skins/skin-blue-dark.css": "/css/dist/skins/skin-blue-dark.css?id=6ea836d8126de101081c49abbdb89417",
"/css/dist/skins/skin-black.css": "/css/dist/skins/skin-black.css?id=76482123f6c70e866d6b971ba91de7bb", "/css/dist/skins/skin-black.css": "/css/dist/skins/skin-black.css?id=76482123f6c70e866d6b971ba91de7bb",
"/css/dist/all.css": "/css/dist/all.css?id=f5373a88aa3482e9496e54ab1c103ec8", "/css/dist/all.css": "/css/dist/all.css?id=1845b570a7e2d03b331998c453d30361",
"/css/dist/signature-pad.css": "/css/dist/signature-pad.css?id=6a89d3cd901305e66ced1cf5f13147f7", "/css/dist/signature-pad.css": "/css/dist/signature-pad.css?id=6a89d3cd901305e66ced1cf5f13147f7",
"/css/dist/signature-pad.min.css": "/css/dist/signature-pad.min.css?id=6a89d3cd901305e66ced1cf5f13147f7", "/css/dist/signature-pad.min.css": "/css/dist/signature-pad.min.css?id=6a89d3cd901305e66ced1cf5f13147f7",
"/js/select2/i18n/af.js": "/js/select2/i18n/af.js?id=4f6fcd73488ce79fae1b7a90aceaecde", "/js/select2/i18n/af.js": "/js/select2/i18n/af.js?id=4f6fcd73488ce79fae1b7a90aceaecde",

View file

@ -1205,3 +1205,9 @@ legend.highlight {
fieldset.bottom-padded { fieldset.bottom-padded {
padding-bottom: 20px; padding-bottom: 20px;
} }
caption.tableCaption {
font-size: 18px;
padding-left: 8px;
}

View file

@ -9,6 +9,7 @@
{{-- Account page content --}} {{-- Account page content --}}
@section('content') @section('content')
@if ($acceptances = \App\Models\CheckoutAcceptance::forUser(Auth::user())->pending()->count()) @if ($acceptances = \App\Models\CheckoutAcceptance::forUser(Auth::user())->pending()->count())
<div class="row"> <div class="row">
<div class="col-md-12"> <div class="col-md-12">
@ -32,20 +33,23 @@
<li class="active"> <li class="active">
<a href="#details" data-toggle="tab"> <a href="#details" data-toggle="tab">
<span class="hidden-lg hidden-md"> <span class="hidden-lg hidden-md" aria-hidden="true">
<i class="fas fa-info-circle fa-2x"></i> <i class="fas fa-info-circle fa-2x"></i>
</span> </span>
<span class="hidden-xs hidden-sm">{{ trans('admin/users/general.info') }}</span> <span class="hidden-xs hidden-sm">
{{ trans('admin/users/general.info') }}
</span>
</a> </a>
</li> </li>
<li> <li>
<a href="#asset" data-toggle="tab"> <a href="#assets" data-toggle="tab">
<span class="hidden-lg hidden-md"> <span class="hidden-lg hidden-md" aria-hidden="true">
<x-icon type="assets" class="fa-2x" /> <x-icon type="assets" class="fa-2x" />
</span> </span>
<span class="hidden-xs hidden-sm">{{ trans('general.assets') }} <span class="hidden-xs hidden-sm">
{!! ($user->assets()->AssetsForShow()->count() > 0 ) ? '<badge class="badge badge-secondary">'.number_format($user->assets()->AssetsForShow()->count()).'</badge>' : '' !!} {{ trans('general.assets') }}
{!! ($user->assets()->AssetsForShow()->count() > 0 ) ? '<span class="badge badge-secondary">'.number_format($user->assets()->AssetsForShow()->count()).'</span>' : '' !!}
</span> </span>
</a> </a>
</li> </li>
@ -56,7 +60,7 @@
<i class="far fa-save fa-2x"></i> <i class="far fa-save fa-2x"></i>
</span> </span>
<span class="hidden-xs hidden-sm">{{ trans('general.licenses') }} <span class="hidden-xs hidden-sm">{{ trans('general.licenses') }}
{!! ($user->licenses->count() > 0 ) ? '<badge class="badge badge-secondary">'.number_format($user->licenses->count()).'</badge>' : '' !!} {!! ($user->licenses->count() > 0 ) ? '<span class="badge badge-secondary">'.number_format($user->licenses->count()).'</span>' : '' !!}
</span> </span>
</a> </a>
</li> </li>
@ -67,18 +71,18 @@
<x-icon type="accessories" class="fa-2x" /> <x-icon type="accessories" class="fa-2x" />
</span> </span>
<span class="hidden-xs hidden-sm">{{ trans('general.accessories') }} <span class="hidden-xs hidden-sm">{{ trans('general.accessories') }}
{!! ($user->accessories->count() > 0 ) ? '<badge class="badge badge-secondary">'.number_format($user->accessories->count()).'</badge>' : '' !!} {!! ($user->accessories->count() > 0 ) ? '<span class="badge badge-secondary">'.number_format($user->accessories->count()).'</span>' : '' !!}
</span> </span>
</a> </a>
</li> </li>
<li> <li>
<a href="#consumables" data-toggle="tab"> <a href="#consumables" data-toggle="tab">
<span class="hidden-lg hidden-md"> <span class="hidden-lg hidden-md" aria-hidden="true">
<i class="fas fa-tint fa-2x"></i> <x-icon type="consumables" class="fa-2x" />
</span> </span>
<span class="hidden-xs hidden-sm">{{ trans('general.consumables') }} <span class="hidden-xs hidden-sm">{{ trans('general.consumables') }}
{!! ($user->consumables->count() > 0 ) ? '<badge class="badge badge-secondary">'.number_format($user->consumables->count()).'</badge>' : '' !!} {!! ($user->consumables->count() > 0 ) ? '<span class="badge badge-secondary">'.number_format($user->consumables->count()).'</span>' : '' !!}
</span> </span>
</a> </a>
</li> </li>
@ -93,13 +97,8 @@
<!-- Start button column --> <!-- Start button column -->
<div class="col-md-3 col-xs-12 col-sm-push-9"> <div class="col-md-3 col-xs-12 col-sm-push-9">
<div class="col-md-12 text-center"> <div class="col-md-12 text-center">
<img src="{{ $user->present()->gravatar() }}" class=" img-thumbnail hidden-print" style="margin-bottom: 20px;" alt="{{ $user->present()->fullName() }}" alt="User avatar">
</div>
<div class="col-md-12 text-center">
<img src="{{ $user->present()->gravatar() }}" class=" img-thumbnail hidden-print" style="margin-bottom: 20px;" alt="{{ $user->present()->fullName() }}">
</div> </div>
@can('self.profile') @can('self.profile')
<div class="col-md-12"> <div class="col-md-12">
@ -376,35 +375,31 @@
</div> <!--/.row--> </div> <!--/.row-->
</div><!-- /.tab-pane --> </div><!-- /.tab-pane -->
<div class="tab-pane" id="asset"> <div class="tab-pane" id="assets">
<!-- checked out assets table --> <!-- checked out assets table -->
<table
<div class="table table-responsive"> data-toolbar="#userAssetToolbar"
@if ($user->id) data-pagination="true"
<div class="box-header with-border"> data-id-table="userAssets"
</div><!-- /.box-header --> data-search="true"
@endif data-side-pagination="client"
<!-- checked out assets table --> data-show-columns="true"
<div class="table-responsive"> data-show-export="true"
data-show-footer="true"
<table data-sort-order="asc"
data-cookie="true" id="userAssets"
data-cookie-id-table="userAssets" class="table table-striped snipe-table"
data-pagination="true" data-show-fullscreen="true"
data-id-table="userAssets" data-export-options='{
data-search="true"
data-side-pagination="client"
data-show-columns="true"
data-show-export="true"
data-show-footer="true"
data-sort-order="asc"
id="userAssets"
class="table table-striped snipe-table"
data-export-options='{
"fileName": "my-assets-{{ date('Y-m-d') }}", "fileName": "my-assets-{{ date('Y-m-d') }}",
"ignoreColumn": ["actions","image","change","checkbox","checkincheckout","icon"] "ignoreColumn": ["actions","image","change","checkbox","checkincheckout","icon"]
}'> }'>
<caption id="userAssetToolbar" class="tableCaption">
{{ trans('general.assets') }}
</caption>
<thead> <thead>
<tr> <tr>
<th class="col-md-1"> <th class="col-md-1">
@ -468,9 +463,9 @@
<td>{{ $counter }}</td> <td>{{ $counter }}</td>
<td> <td>
@if (($asset->image) && ($asset->image!='')) @if (($asset->image) && ($asset->image!=''))
<img src="{{ Storage::disk('public')->url(app('assets_upload_path').e($asset->image)) }}" style="max-height: 30px; width: auto" class="img-responsive"> <img src="{{ Storage::disk('public')->url(app('assets_upload_path').e($asset->image)) }}" style="max-height: 30px; width: auto" class="img-responsive" alt="">
@elseif (($asset->model) && ($asset->model->image!='')) @elseif (($asset->model) && ($asset->model->image!=''))
<img src="{{ Storage::disk('public')->url(app('models_upload_path').e($asset->model->image)) }}" style="max-height: 30px; width: auto" class="img-responsive"> <img src="{{ Storage::disk('public')->url(app('models_upload_path').e($asset->model->image)) }}" style="max-height: 30px; width: auto" class="img-responsive" alt="">
@endif @endif
</td> </td>
<td> <td>
@ -530,13 +525,11 @@
@endforeach @endforeach
</tbody> </tbody>
</table> </table>
</div>
</div> <!-- .table-responsive-->
</div><!-- /asset --> </div><!-- /asset -->
<div class="tab-pane" id="licenses"> <div class="tab-pane" id="licenses">
<div class="table-responsive">
<table <table
data-toolbar="#userLicensesToolbar"
data-cookie-id-table="userLicenses" data-cookie-id-table="userLicenses"
data-pagination="true" data-pagination="true"
data-id-table="userLicenses" data-id-table="userLicenses"
@ -547,11 +540,17 @@
data-show-refresh="false" data-show-refresh="false"
data-sort-order="asc" data-sort-order="asc"
id="userLicenses" id="userLicenses"
data-show-fullscreen="true"
class="table table-striped snipe-table" class="table table-striped snipe-table"
data-export-options='{ data-export-options='{
"fileName": "my-licenses-{{ date('Y-m-d') }}", "fileName": "my-licenses-{{ date('Y-m-d') }}",
"ignoreColumn": ["actions","image","change","checkbox","checkincheckout","icon"] "ignoreColumn": ["actions","image","change","checkbox","checkincheckout","icon"]
}'> }'>
<caption id="userLicensesToolbar" class="tableCaption">
{{ trans('general.licenses') }}
</caption>
<thead> <thead>
<tr> <tr>
<th class="col-md-2">{{ trans('general.name') }}</th> <th class="col-md-2">{{ trans('general.name') }}</th>
@ -593,12 +592,11 @@
@endforeach @endforeach
</tbody> </tbody>
</table> </table>
</div> <!-- .table-responsive-->
</div> </div>
<div class="tab-pane" id="accessories"> <div class="tab-pane" id="accessories">
<div class="table-responsive">
<table <table
data-toolbar="#userAccessoryToolbar"
data-cookie-id-table="userAccessoryTable" data-cookie-id-table="userAccessoryTable"
data-id-table="userAccessoryTable" data-id-table="userAccessoryTable"
id="userAccessoryTable" id="userAccessoryTable"
@ -617,6 +615,12 @@
"fileName": "export-accessory-{{ str_slug($user->username) }}-{{ date('Y-m-d') }}", "fileName": "export-accessory-{{ str_slug($user->username) }}-{{ date('Y-m-d') }}",
"ignoreColumn": ["actions","image","change","checkbox","checkincheckout","delete","download","icon"] "ignoreColumn": ["actions","image","change","checkbox","checkincheckout","delete","download","icon"]
}'> }'>
<caption id="userAccessoryToolbar" class="tableCaption">
{{ trans('general.accessories') }}
</caption>
<thead> <thead>
<tr> <tr>
<th class="col-md-5">{{ trans('general.name') }}</th> <th class="col-md-5">{{ trans('general.name') }}</th>
@ -644,12 +648,11 @@
@endforeach @endforeach
</tbody> </tbody>
</table> </table>
</div>
</div><!-- /accessories-tab --> </div><!-- /accessories-tab -->
<div class="tab-pane" id="consumables"> <div class="tab-pane" id="consumables">
<div class="table-responsive">
<table <table
data-toolbar="#userConsumableToolbar"
data-cookie-id-table="userConsumableTable" data-cookie-id-table="userConsumableTable"
data-id-table="userConsumableTable" data-id-table="userConsumableTable"
id="userConsumableTable" id="userConsumableTable"
@ -668,6 +671,11 @@
"fileName": "export-consumable-{{ str_slug($user->username) }}-{{ date('Y-m-d') }}", "fileName": "export-consumable-{{ str_slug($user->username) }}-{{ date('Y-m-d') }}",
"ignoreColumn": ["actions","image","change","checkbox","checkincheckout","delete","download","icon"] "ignoreColumn": ["actions","image","change","checkbox","checkincheckout","delete","download","icon"]
}'> }'>
<caption id="userConsumableToolbar" class="tableCaption">
{{ trans('general.consumables') }}
</caption>
<thead> <thead>
<tr> <tr>
<th class="col-md-3">{{ trans('general.name') }}</th> <th class="col-md-3">{{ trans('general.name') }}</th>
@ -693,8 +701,10 @@
@endforeach @endforeach
</tbody> </tbody>
</table> </table>
</div>
</div><!-- /consumables-tab --> </div><!-- /consumables-tab -->
<div class="tab-pane" id="test">
<p>fdlkgjljg</p>
</div>
</div><!-- /.tab-content --> </div><!-- /.tab-content -->
</div><!-- nav-tabs-custom --> </div><!-- nav-tabs-custom -->

View file

@ -54,7 +54,8 @@
<!-- CSRF Token --> <!-- CSRF Token -->
<fieldset> <fieldset name="login" aria-label="login">
<legend></legend>
<div class="form-group{{ $errors->has('username') ? ' has-error' : '' }}"> <div class="form-group{{ $errors->has('username') ? ' has-error' : '' }}">
<label for="username"> <label for="username">
@ -74,7 +75,7 @@
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="form-control"> <label class="form-control">
<input name="remember" type="checkbox" value="1"> {{ trans('auth/general.remember_me') }} <input name="remember" type="checkbox" value="1" id="remember"> {{ trans('auth/general.remember_me') }}
</label> </label>
</div> </div>
</fieldset> </fieldset>
@ -94,7 +95,9 @@
@if (config('app.require_saml')) @if (config('app.require_saml'))
<a class="btn btn-primary btn-block" href="{{ route('saml.login') }}">{{ trans('auth/general.saml_login') }}</a> <a class="btn btn-primary btn-block" href="{{ route('saml.login') }}">{{ trans('auth/general.saml_login') }}</a>
@else @else
<button class="btn btn-primary btn-block">{{ trans('auth/general.login') }}</button> <button class="btn btn-primary btn-block" type="submit" id="submit">
{{ trans('auth/general.login') }}
</button>
@endif @endif
@if ($snipeSettings->custom_forgot_pass_url) @if ($snipeSettings->custom_forgot_pass_url)

View file

@ -9,9 +9,9 @@
<!-- begin non-ajaxed file listing table --> <!-- begin non-ajaxed file listing table -->
<div class="table-responsive"> <div class="table-responsive">
<table <table
data-cookie-id-table="{{ str_slug($object->name) }}UploadsTable" data-cookie-id-table="{{ str_slug($object->name ?? $object->id) }}UploadsTable"
data-id-table="{{ str_slug($object->name) }}UploadsTable" data-id-table="{{ str_slug($object->name ?? $object->id) }}UploadsTable"
id="{{ str_slug($object->name) }}}UploadsTable" id="{{ str_slug($object->name ?? $object->id) }}UploadsTable"
data-search="true" data-search="true"
data-pagination="true" data-pagination="true"
data-side-pagination="client" data-side-pagination="client"

View file

@ -27,127 +27,122 @@
@endif @endif
<div class="row"> <div class="row">
<!-- panel -->
<div class="col-lg-2 col-xs-6"> <!-- panel -->
<a href="{{ route('hardware.index') }}"> <div class="col-lg-2 col-xs-6">
<!-- small box --> <a href="{{ route('hardware.index') }}">
<div class="dashboard small-box bg-teal"> <!-- small hardware box -->
<div class="inner"> <div class="dashboard small-box bg-teal">
<h3>{{ number_format(\App\Models\Asset::AssetsForShow()->count()) }}</h3> <div class="inner">
<p>{{ trans('general.assets') }}</p> <h3>{{ number_format(\App\Models\Asset::AssetsForShow()->count()) }}</h3>
</div> <p>{{ trans('general.assets') }}</p>
<div class="icon" aria-hidden="true"> </div>
<x-icon type="assets" /> <div class="icon" aria-hidden="true">
</div> <x-icon type="assets" />
@can('index', \App\Models\Asset::class) </div>
<a href="{{ route('hardware.index') }}" class="small-box-footer">{{ trans('general.view_all') }} <span class="small-box-footer">
<x-icon type="arrow-circle-right" /> {{ trans('general.view_all') }}
<x-icon type="arrow-circle-right" />
</span>
</div>
</a> </a>
@endcan </div><!-- ./col -->
</div>
</a>
</div><!-- ./col -->
<div class="col-lg-2 col-xs-6"> <div class="col-lg-2 col-xs-6">
<a href="{{ route('licenses.index') }}"> <a href="{{ route('licenses.index') }}" aria-hidden="true">
<!-- small box --> <!-- small license box -->
<div class="dashboard small-box bg-maroon"> <div class="dashboard small-box bg-maroon">
<div class="inner"> <div class="inner">
<h3>{{ number_format($counts['license']) }}</h3> <h3>{{ number_format($counts['license']) }}</h3>
<p>{{ trans('general.licenses') }}</p> <p>{{ trans('general.licenses') }}</p>
</div> </div>
<div class="icon" aria-hidden="true"> <div class="icon" aria-hidden="true">
<x-icon type="licenses" /> <x-icon type="licenses" />
</div> </div>
@can('view', \App\Models\License::class) <span class="small-box-footer">
<a href="{{ route('licenses.index') }}" class="small-box-footer">{{ trans('general.view_all') }} {{ trans('general.view_all') }}
<x-icon type="arrow-circle-right" /> <x-icon type="arrow-circle-right" />
</a> </span>
@endcan </div>
</div>
</a>
</div><!-- ./col -->
<div class="col-lg-2 col-xs-6">
<!-- small box -->
<a href="{{ route('accessories.index') }}">
<div class="dashboard small-box bg-orange">
<div class="inner">
<h3> {{ number_format($counts['accessory']) }}</h3>
<p>{{ trans('general.accessories') }}</p>
</div>
<div class="icon" aria-hidden="true">
<x-icon type="accessories" />
</div>
@can('index', \App\Models\Accessory::class)
<a href="{{ route('accessories.index') }}" class="small-box-footer">{{ trans('general.view_all') }}
<x-icon type="arrow-circle-right" />
</a>
@endcan
</div>
</a>
</div><!-- ./col -->
<div class="col-lg-2 col-xs-6">
<!-- small box -->
<a href="{{ route('consumables.index') }}">
<div class="dashboard small-box bg-purple">
<div class="inner">
<h3> {{ number_format($counts['consumable']) }}</h3>
<p>{{ trans('general.consumables') }}</p>
</div>
<div class="icon" aria-hidden="true">
<x-icon type="consumables" />
</div>
@can('index', \App\Models\Consumable::class)
<a href="{{ route('consumables.index') }}" class="small-box-footer">{{ trans('general.view_all') }}
<x-icon type="arrow-circle-right" />
</a> </a>
@endcan </div><!-- ./col -->
</div>
</div><!-- ./col -->
<div class="col-lg-2 col-xs-6">
<a href="{{ route('components.index') }}">
<!-- small box -->
<div class="dashboard small-box bg-yellow">
<div class="inner">
<h3>{{ number_format($counts['component']) }}</h3>
<p>{{ trans('general.components') }}</p>
</div>
<div class="icon" aria-hidden="true">
<x-icon type="components" />
</div>
@can('view', \App\Models\License::class)
<a href="{{ route('components.index') }}" class="small-box-footer">{{ trans('general.view_all') }}
<x-icon type="arrow-circle-right" />
</a>
@endcan
</div>
</a>
</div><!-- ./col -->
<div class="col-lg-2 col-xs-6"> <div class="col-lg-2 col-xs-6">
<a href="{{ route('users.index') }}"> <!-- small accessories box -->
<!-- small box --> <a href="{{ route('accessories.index') }}">
<div class="dashboard small-box bg-light-blue"> <div class="dashboard small-box bg-orange">
<div class="inner"> <div class="inner">
<h3>{{ number_format($counts['user']) }}</h3> <h3> {{ number_format($counts['accessory']) }}</h3>
<p>{{ trans('general.people') }}</p> <p>{{ trans('general.accessories') }}</p>
</div> </div>
<div class="icon" aria-hidden="true"> <div class="icon" aria-hidden="true">
<x-icon type="users" /> <x-icon type="accessories" />
</div> </div>
@can('view', \App\Models\License::class) <span class="small-box-footer">
<a href="{{ route('users.index') }}" class="small-box-footer">{{ trans('general.view_all') }} {{ trans('general.view_all') }}
<x-icon type="arrow-circle-right" /> <x-icon type="arrow-circle-right" />
</a> </span>
@endcan </div>
</div> </a>
</a> </div><!-- ./col -->
</div><!-- ./col -->
<div class="col-lg-2 col-xs-6">
<!-- small consumables box -->
<a href="{{ route('consumables.index') }}">
<div class="dashboard small-box bg-purple">
<div class="inner">
<h3> {{ number_format($counts['consumable']) }}</h3>
<p>{{ trans('general.consumables') }}</p>
</div>
<div class="icon" aria-hidden="true">
<x-icon type="consumables" />
</div>
<span class="small-box-footer">
{{ trans('general.view_all') }}
<x-icon type="arrow-circle-right" />
</span>
</div>
</a>
</div><!-- ./col -->
<div class="col-lg-2 col-xs-6">
<!-- small components box -->
<a href="{{ route('components.index') }}">
<div class="dashboard small-box bg-yellow">
<div class="inner">
<h3>{{ number_format($counts['component']) }}</h3>
<p>{{ trans('general.components') }}</p>
</div>
<div class="icon" aria-hidden="true">
<x-icon type="components" />
</div>
<span class="small-box-footer">
{{ trans('general.view_all') }}
<x-icon type="arrow-circle-right" />
</span>
</div>
</a>
</div><!-- ./col -->
<div class="col-lg-2 col-xs-6">
<!-- small users box -->
<a href="{{ route('users.index') }}">
<div class="dashboard small-box bg-light-blue">
<div class="inner">
<h3>{{ number_format($counts['user']) }}</h3>
<p>{{ trans('general.people') }}</p>
</div>
<div class="icon" aria-hidden="true">
<x-icon type="users" />
</div>
<span class="small-box-footer">
{{ trans('general.view_all') }}
<x-icon type="arrow-circle-right" />
</span>
</div>
</a>
</div><!-- ./col -->
</div> </div>
</div> </div>

View file

@ -42,8 +42,11 @@
{!! $errors->first('asset_tag', '<span class="alert-msg"><i class="fas fa-times"></i> :message</span>') !!} {!! $errors->first('asset_tag', '<span class="alert-msg"><i class="fas fa-times"></i> :message</span>') !!}
</div> </div>
<div class="col-md-2 col-sm-12"> <div class="col-md-2 col-sm-12">
<button class="add_field_button btn btn-default btn-sm"> <button class="add_field_button btn btn-default btn-sm" name="add_field_button">
<x-icon type="plus" /> <x-icon type="plus" />
<span class="sr-only">
{{ trans('general.new') }}
</span>
</button> </button>
</div> </div>
@endif @endif
@ -116,7 +119,7 @@
<!-- Datepicker --> <!-- Datepicker -->
<div class="form-group{{ $errors->has('next_audit_date') ? ' has-error' : '' }}"> <div class="form-group{{ $errors->has('next_audit_date') ? ' has-error' : '' }}">
<label class="col-md-3 control-label"> <label class="col-md-3 control-label" for="next_audit_date">
{{ trans('general.next_audit_date') }} {{ trans('general.next_audit_date') }}
</label> </label>

View file

@ -46,15 +46,15 @@
<body class="hold-transition login-page"> <body class="hold-transition login-page">
@if (($snipeSettings) && ($snipeSettings->logo!='')) @if (($snipeSettings) && ($snipeSettings->logo!=''))
<center> <div class="text-center">
<a href="{{ config('app.url') }}"><img id="login-logo" src="{{ Storage::disk('public')->url('').e($snipeSettings->logo) }}"></a> <a href="{{ config('app.url') }}">
</center> <img id="login-logo" src="{{ Storage::disk('public')->url('').e($snipeSettings->logo) }}" alt="{{ $snipeSettings->site_name }}">
</a>
</div>
@endif @endif
<!-- Content --> <!-- Content -->
@yield('content') @yield('content')
<div class="text-center" style="padding-top: 100px;"> <div class="text-center" style="padding-top: 100px;">
@if (($snipeSettings) && ($snipeSettings->privacy_policy_link!='')) @if (($snipeSettings) && ($snipeSettings->privacy_policy_link!=''))
<a target="_blank" rel="noopener" href="{{ $snipeSettings->privacy_policy_link }}" target="_new">{{ trans('admin/settings/general.privacy_policy') }}</a> <a target="_blank" rel="noopener" href="{{ $snipeSettings->privacy_policy_link }}" target="_new">{{ trans('admin/settings/general.privacy_policy') }}</a>

View file

@ -400,8 +400,8 @@ dir="{{ Helper::determineLanguageDirection() }}">
{{ trans('general.logout') }} {{ trans('general.logout') }}
</a> </a>
<form id="logout-form" action="{{ route('logout.post') }}" method="POST" <form id="logout-form" action="{{ route('logout.post') }}" method="POST" style="display: none;">
style="display: none;"> <button type="submit" style="display: none;" title="logout"></button>
{{ csrf_field() }} {{ csrf_field() }}
</form> </form>

View file

@ -45,7 +45,7 @@
</div> </div>
@if (isset($topSubmit) && ($topSubmit=='true')) @if (isset($topSubmit) && ($topSubmit=='true'))
<div class="col-md-3 text-right" style="padding-right: 10px;"> <div class="col-md-3 text-right" style="padding-right: 10px;">
<button type="submit" class="btn btn-primary pull-right"> <button type="submit" class="btn btn-primary pull-right" name="submit">
<x-icon type="checkmark" /> <x-icon type="checkmark" />
{{ trans('general.save') }} {{ trans('general.save') }}
</button> </button>

View file

@ -1,5 +1,5 @@
@if ($errors->any()) @if ($errors->any())
<div class="col-md-12"> <div class="col-md-12" id="error-notification">
<div class="alert alert-danger fade in"> <div class="alert alert-danger fade in">
<button type="button" class="close" data-dismiss="alert">&times;</button> <button type="button" class="close" data-dismiss="alert">&times;</button>
<i class="fas fa-exclamation-triangle faa-pulse animated"></i> <i class="fas fa-exclamation-triangle faa-pulse animated"></i>
@ -12,7 +12,7 @@
@if ($message = session()->get('status')) @if ($message = session()->get('status'))
<div class="col-md-12"> <div class="col-md-12" id="success-notification">
<div class="alert alert-success fade in"> <div class="alert alert-success fade in">
<button type="button" class="close" data-dismiss="alert">&times;</button> <button type="button" class="close" data-dismiss="alert">&times;</button>
<i class="fas fa-check faa-pulse animated"></i> <i class="fas fa-check faa-pulse animated"></i>
@ -24,7 +24,7 @@
@if ($message = session()->get('success')) @if ($message = session()->get('success'))
<div class="col-md-12"> <div class="col-md-12" id="success-notification">
<div class="alert alert-success fade in"> <div class="alert alert-success fade in">
<button type="button" class="close" data-dismiss="alert">&times;</button> <button type="button" class="close" data-dismiss="alert">&times;</button>
<i class="fas fa-check faa-pulse animated"></i> <i class="fas fa-check faa-pulse animated"></i>
@ -37,7 +37,7 @@
@if ($message = session()->get('success-unescaped')) @if ($message = session()->get('success-unescaped'))
<div class="col-md-12"> <div class="col-md-12" id="success-notification">
<div class="alert alert-success fade in"> <div class="alert alert-success fade in">
<button type="button" class="close" data-dismiss="alert">&times;</button> <button type="button" class="close" data-dismiss="alert">&times;</button>
<i class="fas fa-check faa-pulse animated"></i> <i class="fas fa-check faa-pulse animated"></i>
@ -51,7 +51,7 @@
@if ($assets = session()->get('assets')) @if ($assets = session()->get('assets'))
@foreach ($assets as $asset) @foreach ($assets as $asset)
<div class="col-md-12"> <div class="col-md-12" id="multi-error-notification">
<div class="alert alert-info fade in"> <div class="alert alert-info fade in">
<button type="button" class="close" data-dismiss="alert">&times;</button> <button type="button" class="close" data-dismiss="alert">&times;</button>
<i class="fas fa-info-circle faa-pulse animated"></i> <i class="fas fa-info-circle faa-pulse animated"></i>
@ -77,7 +77,7 @@
@if ($consumables = session()->get('consumables')) @if ($consumables = session()->get('consumables'))
@foreach ($consumables as $consumable) @foreach ($consumables as $consumable)
<div class="col-md-12"> <div class="col-md-12" id="success-notification">
<div class="alert alert-info fade in"> <div class="alert alert-info fade in">
<button type="button" class="close" data-dismiss="alert">&times;</button> <button type="button" class="close" data-dismiss="alert">&times;</button>
<i class="fas fa-info-circle faa-pulse animated"></i> <i class="fas fa-info-circle faa-pulse animated"></i>

View file

@ -322,7 +322,7 @@
</fieldset> </fieldset>
<fieldset class="bottom-padded"> <fieldset name="checkin-preferences" class="bottom-padded">
<legend class="highlight"> <legend class="highlight">
{{ trans('admin/settings/general.legends.checkin') }} {{ trans('admin/settings/general.legends.checkin') }}
</legend> </legend>
@ -342,7 +342,7 @@
<fieldset class="bottom-padded"> <fieldset name="dashboard" class="bottom-padded">
<legend class="highlight"> <legend class="highlight">
{{ trans('admin/settings/general.legends.dashboard') }} {{ trans('admin/settings/general.legends.dashboard') }}
</legend> </legend>

View file

@ -14,9 +14,9 @@
<div class="pull-right"> <div class="pull-right">
<form onsubmit="return false;"> <form onsubmit="return false;" role="search" aria-label="Admin Options" id="setting-search">
<div class="btn-group"> <div class="btn-group">
<input id="searchinput" name="search" type="search" class="search form-control" placeholder="{{ trans('admin/settings/general.filter_by_keyword') }}"> <input id="searchinput" name="search" type="search" class="search form-control" placeholder="{{ trans('admin/settings/general.filter_by_keyword') }}" aria-label="keyword search">
<span id="searchclear" class="fas fa-times" aria-hidden="true"></span> <span id="searchclear" class="fas fa-times" aria-hidden="true"></span>
<button type="submit" disabled style="display: none" aria-hidden="true"></button> <button type="submit" disabled style="display: none" aria-hidden="true"></button>
</div> </div>

2
tests/pa11y/.gitignore vendored Executable file
View file

@ -0,0 +1,2 @@
*
!.gitignore