Added aria-label to form fields

This commit is contained in:
snipe 2020-04-01 00:15:33 -07:00
parent b079d0d6d5
commit be93b23488
23 changed files with 44 additions and 35 deletions

View file

@ -18,9 +18,9 @@
<label for="asset_tag" class="col-md-3 control-label">{{ trans('admin/hardware/form.tag') }}</label>
<div class="col-md-7 col-sm-12{{ (\App\Helpers\Helper::checkIfRequired($item, 'asset_tag')) ? ' required' : '' }}">
@if ($item->id)
<input class="form-control" type="text" name="asset_tag" id="asset_tag" value="{{ Input::old('asset_tag', $item->asset_tag) }}" />
<input class="form-control" type="text" name="asset_tag" aria-label="asset_tag" id="asset_tag" value="{{ Input::old('asset_tag', $item->asset_tag) }}" />
@else
<input class="form-control" type="text" name="asset_tag" id="asset_tag" value="{{ Input::old('asset_tag', \App\Models\Asset::autoincrement_asset()) }}">
<input class="form-control" type="text" name="asset_tag" aria-label="asset_tag" id="asset_tag" value="{{ Input::old('asset_tag', \App\Models\Asset::autoincrement_asset()) }}">
@endif
{!! $errors->first('asset_tag', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
</div>
@ -86,7 +86,7 @@
{!! $errors->first('image_delete', '<span class="alert-msg">:message</span>') !!}
</label>
<div style="margin-top: 0.5em">
<img src="{{ url('/') }}/uploads/assets/{{ $item->image }}" class="img-responsive"/>
<img src="{{ url('/') }}/uploads/assets/{{ $item->image }}" class="img-responsive" alt="Existing uploaded image thumbnail">
</div>
</div>
</div>

View file

@ -24,15 +24,19 @@
<div class="row">
<div class="col-md-8 col-md-offset-2">
<div class="box box-default">
<div class="box-header with-border">
<h2 class="box-title">
<div class="box-header{{ ($item->id) ? ' with-border' : '' }}">
@if ($item->id)
{{ $item->display_name }}
<h2 class="box-title">
{{ $item->display_name }}
</h2>
@endif
</h2>
@if (isset($helpText))
<div class="box-tools pull-right">
<button class="slideout-menu-toggle btn btn-box-tool btn-box-tool-lg" data-toggle="tooltip" title="Help"><i class="fa fa-question"></i></button>
<button class="slideout-menu-toggle btn btn-box-tool btn-box-tool-lg" data-toggle="tooltip" title="Help"><i class="fa fa-question" aria-hidden="true"></i>
<span class="sr-only">Help</span>
</button>
</div>
@endif
</div><!-- /.box-header -->

View file

@ -59,7 +59,7 @@
<div class="form-group {{ $errors->has('reassignable') ? ' has-error' : '' }}">
<label for="reassignable" class="col-md-3 control-label">{{ trans('admin/licenses/form.reassignable') }}</label>
<div class="col-md-7 input-group">
{{ Form::Checkbox('reassignable', '1', Input::old('reassignable', $item->id ? $item->reassignable : '1'),array('class' => 'minimal')) }}
{{ Form::Checkbox('reassignable', '1', Input::old('reassignable', $item->id ? $item->reassignable : '1'),array('class' => 'minimal', 'aria-label'=>'reassignable')) }}
{{ trans('general.yes') }}
</div>
</div>
@ -113,7 +113,7 @@
<div class="form-group {{ $errors->has('maintained') ? ' has-error' : '' }}">
<label for="maintained" class="col-md-3 control-label">{{ trans('admin/licenses/form.maintained') }}</label>
<div class="checkbox col-md-7">
{{ Form::Checkbox('maintained', '1', Input::old('maintained', $item->maintained),array('class' => 'minimal')) }}
{{ Form::Checkbox('maintained', '1', Input::old('maintained', $item->maintained),array('class' => 'minimal', 'aria-label'=>'maintained')) }}
{{ trans('general.yes') }}
</div>
</div>

View file

@ -1,20 +1,20 @@
<div class="form-group" id="assignto_selector"{!! (isset($style)) ? ' style="'.e($style).'"' : '' !!}>
{{ Form::label('name', trans('admin/hardware/form.checkout_to'), array('class' => 'col-md-3 control-label')) }}
{{ Form::label('checkout_to_type', trans('admin/hardware/form.checkout_to'), array('class' => 'col-md-3 control-label')) }}
<div class="col-md-8">
<div class="btn-group" data-toggle="buttons">
@if ((isset($user_select)) && ($user_select!='false'))
<label class="btn btn-default active">
<input name="checkout_to_type" value="user" type="radio" checked="checked"><i class="fa fa-user"></i> {{ trans('general.user') }}
<input name="checkout_to_type" value="user" aria-label="checkout_to_type" type="radio" checked="checked"><i class="fa fa-user"></i> {{ trans('general.user') }}
</label>
@endif
@if ((isset($asset_select)) && ($asset_select!='false'))
<label class="btn btn-default">
<input name="checkout_to_type" value="asset" type="radio"><i class="fa fa-barcode"></i> {{ trans('general.asset') }}
<input name="checkout_to_type" value="asset" aria-label="checkout_to_type" type="radio"><i class="fa fa-barcode"></i> {{ trans('general.asset') }}
</label>
@endif
@if ((isset($location_select)) && ($location_select!='false'))
<label class="btn btn-default">
<input name="checkout_to_type" value="location" class="active" type="radio"><i class="fa fa-map-marker"></i> {{ trans('general.location') }}
<input name="checkout_to_type" value="location" aria-label="checkout_to_type" class="active" type="radio"><i class="fa fa-map-marker"></i> {{ trans('general.location') }}
</label>
@endif

View file

@ -2,7 +2,7 @@
<div id="assigned_asset" class="form-group{{ $errors->has($fieldname) ? ' has-error' : '' }}"{!! (isset($style)) ? ' style="'.e($style).'"' : '' !!}>
{{ Form::label($fieldname, $translated_name, array('class' => 'col-md-3 control-label')) }}
<div class="col-md-7{{ ((isset($required) && ($required =='true'))) ? ' required' : '' }}">
<select class="js-data-ajax select2" data-endpoint="hardware" data-placeholder="{{ trans('general.select_asset') }}" name="{{ $fieldname }}" style="width: 100%" id="{{ (isset($select_id)) ? $select_id : 'assigned_asset_select' }}"{{ (isset($multiple)) ? ' multiple' : '' }}{!! (!empty($asset_status_type)) ? ' data-asset-status-type="' . $asset_status_type . '"' : '' !!}>
<select class="js-data-ajax select2" data-endpoint="hardware" data-placeholder="{{ trans('general.select_asset') }}" aria-label="{{ $fieldname }}" name="{{ $fieldname }}" style="width: 100%" id="{{ (isset($select_id)) ? $select_id : 'assigned_asset_select' }}"{{ (isset($multiple)) ? ' multiple' : '' }}{!! (!empty($asset_status_type)) ? ' data-asset-status-type="' . $asset_status_type . '"' : '' !!}>
@if ((!isset($unselect)) && ($asset_id = Input::old($fieldname, (isset($asset) ? $asset->id : (isset($item) ? $item->{$fieldname} : '')))))
<option value="{{ $asset_id }}" selected="selected">

View file

@ -4,7 +4,7 @@
{{ Form::label($fieldname, $translated_name, array('class' => 'col-md-3 control-label')) }}
<div class="col-md-7{{ ((isset($required)) && ($required=='true')) ? ' required' : '' }}">
<select class="js-data-ajax" data-endpoint="categories/{{ (isset($category_type)) ? $category_type : 'assets' }}" data-placeholder="{{ trans('general.select_category') }}" name="{{ $fieldname }}" style="width: 100%" id="category_select_id">
<select class="js-data-ajax" data-endpoint="categories/{{ (isset($category_type)) ? $category_type : 'assets' }}" data-placeholder="{{ trans('general.select_category') }}" name="{{ $fieldname }}" style="width: 100%" id="category_select_id" aria-label="{{ $fieldname }}">
@if ($category_id = Input::old($fieldname, (isset($item)) ? $item->{$fieldname} : ''))
<option value="{{ $category_id }}" selected="selected">
{{ (\App\Models\Category::find($category_id)) ? \App\Models\Category::find($category_id)->name : '' }}

View file

@ -1,6 +1,8 @@
@if (\App\Models\Company::isCurrentUserAuthorized())
<div class="form-group {{ $errors->has('company_id') ? ' has-error' : '' }}">
<div class="col-md-3 control-label">{{ Form::label('company_id', trans('general.company')) }}</div>
<div class="col-md-3 control-label">
{{ Form::label('company_id', trans('general.company'), array('class' => 'col-md-3 control-label', 'for' => 'company_id')) }}
</div>
<div class="col-md-7 col-sm-12{{ (\App\Helpers\Helper::checkIfRequired($item, 'company_id')) ? ' required' : '' }}">
{{ Form::select('company_id', $company_list , Input::old('company_id', $item->company_id), array('class'=>'select2', 'style'=>'width:100%')) }}
{!! $errors->first('company_id', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}

View file

@ -2,7 +2,7 @@
<div class="form-group {{ $errors->has('depreciation_id') ? ' has-error' : '' }}">
<label for="depreciation_id" class="col-md-3 control-label">{{ trans('general.depreciation') }}</label>
<div class="col-md-7">
{{ Form::select('depreciation_id', $depreciation_list , Input::old('depreciation_id', $item->depreciation_id), array('class'=>'select2', 'style'=>'width:350px')) }}
{{ Form::select('depreciation_id', $depreciation_list , Input::old('depreciation_id', $item->depreciation_id), array('class'=>'select2', 'style'=>'width:350px', 'aria-label'=>'depreciation_id')) }}
{!! $errors->first('depreciation_id', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
</div>
</div>

View file

@ -11,7 +11,7 @@
{!! $errors->first('image', '<span class="alert-msg">:message</span>') !!}
</div>
<div class="col-md-4 col-md-offset-3">
<img id="imagePreview" style="max-width: 200px;">
<img id="imagePreview" style="max-width: 200px;" alt="Uploaded image thumbnail">
</div>
</div>

View file

@ -3,7 +3,7 @@
<label for="asset_maintenance_type" class="col-md-3 control-label">{{ trans('admin/asset_maintenances/form.asset_maintenance_type') }}
</label>
<div class="col-md-7{{ (\App\Helpers\Helper::checkIfRequired($item, 'asset_maintenance_type')) ? ' required' : '' }}">
{{ Form::select('asset_maintenance_type', $assetMaintenanceType , Input::old('asset_maintenance_type', $item->asset_maintenance_type), ['class'=>'select2', 'style'=>'min-width:350px']) }}
{{ Form::select('asset_maintenance_type', $assetMaintenanceType , Input::old('asset_maintenance_type', $item->asset_maintenance_type), ['class'=>'select2', 'style'=>'min-width:350px', 'aria-label'=>'asset_maintenance_type']) }}
{!! $errors->first('asset_maintenance_type', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
</div>
</div>

View file

@ -4,7 +4,7 @@
{{ Form::label($fieldname, $translated_name, array('class' => 'col-md-3 control-label')) }}
<div class="col-md-7{{ ((isset($required)) && ($required=='true')) ? ' required' : '' }}">
<select class="js-data-ajax" data-endpoint="manufacturers" data-placeholder="{{ trans('general.select_manufacturer') }}" name="{{ $fieldname }}" style="width: 100%" id="manufacturer_select_id">
<select class="js-data-ajax" data-endpoint="manufacturers" data-placeholder="{{ trans('general.select_manufacturer') }}" name="{{ $fieldname }}" style="width: 100%" id="manufacturer_select_id" aria-label="{{ $fieldname }}">
@if ($manufacturer_id = Input::old($fieldname, (isset($item)) ? $item->{$fieldname} : ''))
<option value="{{ $manufacturer_id }}" selected="selected">
{{ (\App\Models\Manufacturer::find($manufacturer_id)) ? \App\Models\Manufacturer::find($manufacturer_id)->name : '' }}

View file

@ -3,10 +3,13 @@
<label for="min_amt" class="col-md-3 control-label">{{ trans('general.min_amt') }}</label>
<div class="col-md-9{{ (\App\Helpers\Helper::checkIfRequired($item, 'min_amt')) ? ' required' : '' }}">
<div class="col-md-2" style="padding-left:0px">
<input class="form-control col-md-3" type="text" name="min_amt" id="min_amt" value="{{ Input::old('min_amt', $item->min_amt) }}" />
<input class="form-control col-md-3" type="text" name="min_amt" id="min_amt" aria-label="min_amt" value="{{ Input::old('min_amt', $item->min_amt) }}" />
</div>
<div class="col-md-7" style="margin-left: -15px;">
<a href="#" data-toggle="tooltip" title="{{ trans('general.min_amt_help') }}"><i class="fa fa-info-circle"></i></a>
<a href="#" data-toggle="tooltip" title="{{ trans('general.min_amt_help') }}"><i class="fa fa-info-circle" aria-hidden="true"></i>
<span class="sr-only">{{ trans('general.min_amt_help') }}</span>
</a>
</div>
<div class="col-md-12">
{!! $errors->first('min_amt', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}

View file

@ -4,7 +4,7 @@
{{ Form::label($fieldname, $translated_name, array('class' => 'col-md-3 control-label')) }}
<div class="col-md-7{{ ((isset($required) && ($required =='true'))) ? ' required' : '' }}">
<select class="js-data-ajax" data-endpoint="models" data-placeholder="{{ trans('general.select_model') }}" name="{{ $fieldname }}" style="width: 100%" id="model_select_id">
<select class="js-data-ajax" data-endpoint="models" data-placeholder="{{ trans('general.select_model') }}" name="{{ $fieldname }}" style="width: 100%" id="model_select_id" aria-label="{{ $fieldname }}">
@if ($model_id = Input::old($fieldname, (isset($item)) ? $item->{$fieldname} : ''))
<option value="{{ $model_id }}" selected="selected">
{{ (\App\Models\AssetModel::find($model_id)) ? \App\Models\AssetModel::find($model_id)->name : '' }}

View file

@ -2,7 +2,7 @@
<div class="form-group {{ $errors->has('model_number') ? ' has-error' : '' }}">
<label for="model_number" class="col-md-3 control-label">{{ trans('general.model_no') }}</label>
<div class="col-md-7">
<input class="form-control" type="text" name="model_number" id="model_number" value="{{ Input::old('model_number', $item->model_number) }}" />
<input class="form-control" type="text" name="model_number" aria-label="model_number" id="model_number" value="{{ Input::old('model_number', $item->model_number) }}" />
{!! $errors->first('model_number', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
</div>
</div>

View file

@ -2,7 +2,7 @@
<div class="form-group {{ $errors->has('name') ? ' has-error' : '' }}">
<label for="name" class="col-md-3 control-label">{{ $translated_name }}</label>
<div class="col-md-7 col-sm-12{{ (\App\Helpers\Helper::checkIfRequired($item, 'name')) ? ' required' : '' }}">
<input class="form-control" type="text" name="name" id="name" value="{{ Input::old('name', $item->name) }}" />
<input class="form-control" type="text" name="name" aria-label="name" id="name" value="{{ Input::old('name', $item->name) }}" />
{!! $errors->first('name', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
</div>
</div>

View file

@ -2,7 +2,7 @@
<div class="form-group {{ $errors->has('notes') ? ' has-error' : '' }}">
<label for="notes" class="col-md-3 control-label">{{ trans('admin/hardware/form.notes') }}</label>
<div class="col-md-7 col-sm-12">
<textarea class="col-md-6 form-control" id="notes" name="notes">{{ Input::old('notes', $item->notes) }}</textarea>
<textarea class="col-md-6 form-control" id="notes" aria-label="notes" name="notes">{{ Input::old('notes', $item->notes) }}</textarea>
{!! $errors->first('notes', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
</div>
</div>

View file

@ -2,7 +2,7 @@
<div class="form-group {{ $errors->has('order_number') ? ' has-error' : '' }}">
<label for="order_number" class="col-md-3 control-label">{{ trans('general.order_number') }}</label>
<div class="col-md-7 col-sm-12">
<input class="form-control" type="text" name="order_number" id="order_number" value="{{ Input::old('order_number', $item->order_number) }}" />
<input class="form-control" type="text" name="order_number" aria-label="order_number" id="order_number" value="{{ Input::old('order_number', $item->order_number) }}" />
{!! $errors->first('order_number', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
</div>
</div>

View file

@ -1,7 +1,7 @@
<div class="form-group {{ $errors->has('phone') ? ' has-error' : '' }}">
{{ Form::label('phone', trans('admin/suppliers/table.phone'), array('class' => 'col-md-3 control-label')) }}
<div class="col-md-7">
{{Form::text('phone', Input::old('phone', $item->phone), array('class' => 'form-control')) }}
{{Form::text('phone', Input::old('phone', $item->phone), array('class' => 'form-control', 'aria-label'=>'phone')) }}
{!! $errors->first('phone', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
</div>
</div>

View file

@ -2,8 +2,8 @@
<div class="form-group {{ $errors->has('purchase_cost') ? ' has-error' : '' }}">
<label for="purchase_cost" class="col-md-3 control-label">{{ trans('general.purchase_cost') }}</label>
<div class="col-md-9">
<div class="input-group col-md-3" style="padding-left: 0px;">
<input class="form-control" type="text" name="purchase_cost" id="purchase_cost" value="{{ Input::old('purchase_cost', \App\Helpers\Helper::formatCurrencyOutput($item->purchase_cost)) }}" />
<div class="input-group col-md-4" style="padding-left: 0px;">
<input class="form-control" type="text" name="purchase_cost" aria-label="purchase_cost" id="purchase_cost" value="{{ Input::old('purchase_cost', \App\Helpers\Helper::formatCurrencyOutput($item->purchase_cost)) }}" />
<span class="input-group-addon">
@if (isset($currency_type))
{{ $currency_type }}

View file

@ -4,7 +4,7 @@
<label for="qty" class="col-md-3 control-label">{{ trans('general.quantity') }}</label>
<div class="col-md-7{{ (\App\Helpers\Helper::checkIfRequired($item, 'qty')) ? ' required' : '' }}">
<div class="col-md-2" style="padding-left:0px">
<input class="form-control" type="text" name="qty" id="qty" value="{{ Input::old('qty', $item->qty) }}" />
<input class="form-control" type="text" name="qty" aria-label="qty" id="qty" value="{{ Input::old('qty', $item->qty) }}" />
</div>
{!! $errors->first('qty', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
</div>

View file

@ -2,7 +2,7 @@
<div class="form-group {{ $errors->has('status_id') ? ' has-error' : '' }}">
<label for="status_id" class="col-md-3 control-label">{{ trans('admin/hardware/form.status') }}</label>
<div class="col-md-7 col-sm-11{{ (\App\Helpers\Helper::checkIfRequired($item, 'status_id')) ? ' required' : '' }}">
{{ Form::select('status_id', $statuslabel_list , Input::old('status_id', $item->status_id), array('class'=>'select2 status_id', 'style'=>'width:100%','id'=>'status_select_id')) }}
{{ Form::select('status_id', $statuslabel_list , Input::old('status_id', $item->status_id), array('class'=>'select2 status_id', 'style'=>'width:100%','id'=>'status_select_id', 'aria-label'=>'status_id')) }}
{!! $errors->first('status_id', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
</div>
<div class="col-md-2 col-sm-2 text-left">

View file

@ -1,4 +1,4 @@
<div class="box-footer text-right">
<a class="btn btn-link text-left" href="{{ URL::previous() }}">{{ trans('button.cancel') }}</a>
<button type="submit" class="btn btn-success"><i class="fa fa-check icon-white"></i> {{ trans('general.save') }}</button>
<button type="submit" class="btn btn-primary"><i class="fa fa-check icon-white"></i> {{ trans('general.save') }}</button>
</div>

View file

@ -3,7 +3,7 @@
{{ Form::label($fieldname, $translated_name, array('class' => 'col-md-3 control-label')) }}
<div class="col-md-7{{ ((isset($required)) && ($required=='true')) ? ' required' : '' }}">
<select class="js-data-ajax" data-endpoint="suppliers" data-placeholder="{{ trans('general.select_supplier') }}" name="{{ $fieldname }}" style="width: 100%" id="supplier_select">
<select class="js-data-ajax" data-endpoint="suppliers" data-placeholder="{{ trans('general.select_supplier') }}" name="{{ $fieldname }}" style="width: 100%" id="supplier_select" aria-label="{{ $fieldname }}">
@if ($supplier_id = Input::old($fieldname, (isset($item)) ? $item->{$fieldname} : ''))
<option value="{{ $supplier_id }}" selected="selected">
{{ (\App\Models\Supplier::find($supplier_id)) ? \App\Models\Supplier::find($supplier_id)->name : '' }}