From 9a3e727390e4b926c286758cfb61f824e07feac7 Mon Sep 17 00:00:00 2001 From: snipe Date: Mon, 3 Apr 2023 22:38:56 -0700 Subject: [PATCH] Updated other form fields to use new label class, fixed HTML for accessibility Signed-off-by: snipe --- .../views/account/accept/create.blade.php | 36 +- resources/views/account/profile.blade.php | 10 +- .../views/asset_maintenances/edit.blade.php | 7 +- .../views/custom_fields/fields/edit.blade.php | 72 ++-- .../custom_fields/fieldsets/view.blade.php | 4 +- resources/views/hardware/quickscan.blade.php | 9 +- resources/views/licenses/edit.blade.php | 18 +- resources/views/livewire/login-form.blade.php | 5 +- resources/views/modals/user.blade.php | 12 +- .../views/models/custom_fields_form.blade.php | 8 +- .../partials/forms/edit/uploadLogo.blade.php | 4 +- resources/views/reports/custom.blade.php | 350 ++++++++---------- resources/views/settings/alerts.blade.php | 22 +- resources/views/settings/asset_tags.blade.php | 8 +- resources/views/settings/barcodes.blade.php | 23 +- resources/views/settings/branding.blade.php | 22 +- resources/views/settings/general.blade.php | 53 ++- resources/views/settings/labels.blade.php | 30 +- resources/views/settings/saml.blade.php | 49 +-- resources/views/settings/security.blade.php | 72 ++-- resources/views/statuslabels/edit.blade.php | 26 +- resources/views/users/bulk-edit.blade.php | 65 ++-- .../views/users/confirm-bulk-delete.blade.php | 11 +- resources/views/users/confirm-merge.blade.php | 3 +- 24 files changed, 462 insertions(+), 457 deletions(-) diff --git a/resources/views/account/accept/create.blade.php b/resources/views/account/accept/create.blade.php index e5725e4897..c05bc3a892 100644 --- a/resources/views/account/accept/create.blade.php +++ b/resources/views/account/accept/create.blade.php @@ -43,35 +43,39 @@
+
@if ($acceptance->checkoutable->getEula())
{!! $acceptance->checkoutable->getEula() !!}
@endif - +
+

{{$acceptance->checkoutable->present()->name()}}

-
-
+
+ -
-
-
@if ($snipeSettings->require_accept_signature=='1') -

{{trans('general.sign_tos')}}

-
-
- - -
-
- +
+

{{trans('general.sign_tos')}}

+
+
+ + +
+
+ +
@endif diff --git a/resources/views/account/profile.blade.php b/resources/views/account/profile.blade.php index 86abc7aff9..887624c85f 100755 --- a/resources/views/account/profile.blade.php +++ b/resources/views/account/profile.blade.php @@ -107,11 +107,11 @@ @if (($user->avatar) && ($user->avatar!=''))
-
@@ -132,9 +132,9 @@
@can('self.two_factor') -
+ @if (!$field->id) + +
+
+ +
+ +
+ @endif +
-
@@ -125,8 +143,8 @@
-
@@ -136,8 +154,8 @@
-
@@ -145,24 +163,6 @@
- @if (!$field->id) - -
-
- -
- -
- @endif -
{{ Form::close() }} @@ -425,28 +388,9 @@ format: 'yyyy-mm-dd' }); - // Check-all / Uncheck all - $(function () { - var checkAll = $('input.all'); - var checkboxes = $('input.minimal'); - - - checkAll.on('ifChecked ifUnchecked', function(event) { - if (event.type == 'ifChecked') { - checkboxes.iCheck('check'); - } else { - checkboxes.iCheck('uncheck'); - } - }); - - checkboxes.on('ifChanged', function(event){ - if(checkboxes.filter(':checked').length == checkboxes.length) { - checkAll.prop('checked', 'checked'); - } else { - checkAll.removeProp('checked'); - } - checkAll.iCheck('update'); - }); + $("#checkAll").change(function () { + $("input:checkbox").prop('checked', $(this).prop("checked")); }); + @stop diff --git a/resources/views/settings/alerts.blade.php b/resources/views/settings/alerts.blade.php index aa6f94f672..9b2f57a1c6 100644 --- a/resources/views/settings/alerts.blade.php +++ b/resources/views/settings/alerts.blade.php @@ -42,23 +42,21 @@
-
- {{ Form::label('alerts_enabled', trans('admin/settings/general.alerts_enabled')) }} -
-
- {{ Form::checkbox('alerts_enabled', '1', Request::old('alerts_enabled', $setting->alerts_enabled),array('class' => 'minimal')) }} - {{ trans('general.yes') }} +
+
-
- {{ Form::label('show_alerts_in_menu', trans('admin/settings/general.show_alerts_in_menu')) }} -
-
- {{ Form::checkbox('show_alerts_in_menu', '1', Request::old('show_alerts_in_menu', $setting->show_alerts_in_menu),array('class' => 'minimal')) }} - {{ trans('general.yes') }} +
+
diff --git a/resources/views/settings/asset_tags.blade.php b/resources/views/settings/asset_tags.blade.php index ec11053e9f..858ad718cb 100644 --- a/resources/views/settings/asset_tags.blade.php +++ b/resources/views/settings/asset_tags.blade.php @@ -43,11 +43,13 @@
- {{ Form::label('auto_increment_assets', trans('admin/settings/general.auto_increment_assets')) }} + {{ trans('admin/settings/general.auto_increment_assets') }}
- {{ Form::checkbox('auto_increment_assets', '1', old('auto_increment_assets', $setting->auto_increment_assets),array('class' => 'minimal', 'aria-label'=>'auto_increment_assets')) }} - {{ trans('admin/settings/general.enabled') }} +
diff --git a/resources/views/settings/barcodes.blade.php b/resources/views/settings/barcodes.blade.php index 4a421eec74..2d79ef484d 100644 --- a/resources/views/settings/barcodes.blade.php +++ b/resources/views/settings/barcodes.blade.php @@ -43,12 +43,11 @@ @if ($is_gd_installed)
-
- {{ Form::label('qr_code', trans('admin/settings/general.display_qr')) }} -
-
- {{ Form::checkbox('qr_code', '1', old('qr_code', $setting->qr_code),array('class' => 'minimal', 'aria-label'=>'qr_code')) }} - {{ trans('general.yes') }} +
+
@@ -65,12 +64,12 @@
-
- {{ Form::label('alt_barcode_enabled', trans('admin/settings/general.display_alt_barcode')) }} -
-
- {{ Form::checkbox('alt_barcode_enabled', '1', old('alt_barcode_enabled', $setting->alt_barcode_enabled),array('class' => 'minimal', 'aria-label'=>'alt_barcode_enabled')) }} - {{ trans('general.yes') }} + +
+
diff --git a/resources/views/settings/branding.blade.php b/resources/views/settings/branding.blade.php index 104e426a7c..56865d451f 100644 --- a/resources/views/settings/branding.blade.php +++ b/resources/views/settings/branding.blade.php @@ -112,11 +112,13 @@
- {{ Form::label('logo_print_assets', trans('admin/settings/general.logo_print_assets')) }} + {{ trans('admin/settings/general.logo_print_assets') }}
- {{ Form::checkbox('logo_print_assets', '1', old('logo_print_assets', $setting->logo_print_assets),array('class' => 'minimal', 'aria-label'=>'logo_print_assets')) }} +
@@ -125,11 +127,13 @@
- {{ Form::label('show_url_in_emails', trans('admin/settings/general.show_url_in_emails')) }} + {{ trans('admin/settings/general.show_url_in_emails') }}
- {{ Form::checkbox('show_url_in_emails', '1', old('show_url_in_emails', $setting->show_url_in_emails),array('class' => 'minimal', 'aria-label'=>'show_url_in_emails')) }} - {{ trans('general.yes') }} +

{{ trans('admin/settings/general.show_url_in_emails_help_text') }}

@@ -164,11 +168,13 @@
- {{ Form::label('allow_user_skin', trans('admin/settings/general.allow_user_skin')) }} + {{ trans('admin/settings/general.allow_user_skin') }}
- {{ Form::checkbox('allow_user_skin', '1', old('allow_user_skin', $setting->allow_user_skin),array('class' => 'minimal')) }} - {{ trans('general.yes') }} +

{{ trans('admin/settings/general.allow_user_skin_help_text') }}

diff --git a/resources/views/settings/general.blade.php b/resources/views/settings/general.blade.php index 6c0655abd5..433f6c8123 100644 --- a/resources/views/settings/general.blade.php +++ b/resources/views/settings/general.blade.php @@ -45,11 +45,13 @@
- {{ Form::label('full_multiple_companies_support', trans('admin/settings/general.full_multiple_companies_support_text')) }} + {{ trans('admin/settings/general.full_multiple_companies_support_text') }}
- {{ Form::checkbox('full_multiple_companies_support', '1', old('full_multiple_companies_support', $setting->full_multiple_companies_support),array('class' => 'minimal', 'aria-label'=>'full_multiple_companies_support')) }} - {{ trans('admin/settings/general.full_multiple_companies_support_text') }} + {!! $errors->first('full_multiple_companies_support', '') !!}

{{ trans('admin/settings/general.full_multiple_companies_support_help_text') }} @@ -62,12 +64,13 @@

- {{ Form::label('require_accept_signature', - trans('admin/settings/general.require_accept_signature')) }} + {{ trans('admin/settings/general.require_accept_signature') }}
- {{ Form::checkbox('require_accept_signature', '1', Request::old('require_accept_signature', $setting->require_accept_signature),array('class' => 'minimal')) }} - {{ trans('general.yes') }} + {!! $errors->first('require_accept_signature', '') !!}

{{ trans('admin/settings/general.require_accept_signature_help_text') }}

@@ -117,12 +120,14 @@
- {{ Form::label('show_images_in_email', trans('admin/settings/general.show_images_in_email')) }} + {{ trans('admin/settings/general.show_images_in_email') }}
- {{ Form::checkbox('show_images_in_email', '1', Request::old('show_images_in_email', $setting->show_images_in_email),array('class' => 'minimal')) }} - {{ trans('general.yes') }} - {!! $errors->first('show_images_in_email', '') !!} +
@@ -130,11 +135,13 @@
- {{ Form::label('unique_serial', trans('admin/settings/general.unique_serial')) }} + {{ trans('admin/settings/general.unique_serial') }}
- {{ Form::checkbox('unique_serial', '1', Request::old('unique_serial', $setting->unique_serial),array('class' => 'minimal')) }} - {{ trans('general.yes') }} + {!! $errors->first('unique_serial', '') !!}

{{ trans('admin/settings/general.unique_serial_help_text') }} @@ -277,14 +284,20 @@

- {{ Form::label('show_in_model_list', - trans('admin/settings/general.show_in_model_list')) }} + {{ trans('admin/settings/general.show_in_model_list') }}
- {{ Form::checkbox('show_in_model_list[]', 'image', old('show_in_model_list', $snipeSettings->modellistCheckedValue('image')),array('class' => 'minimal', 'aria-label'=>'show_in_model_list' )) }} {{ trans('general.image') }}
- {{ Form::checkbox('show_in_model_list[]', 'category', old('show_in_model_list', $snipeSettings->modellistCheckedValue('category')),array('class' => 'minimal', 'aria-label'=>'show_in_model_list' )) }} {{ trans('general.category') }}
- {{ Form::checkbox('show_in_model_list[]', 'manufacturer', old('show_in_model_list', $snipeSettings->modellistCheckedValue('manufacturer')),array('class' => 'minimal', 'aria-label'=>'show_in_model_list' )) }} {{ trans('general.manufacturer') }}
- {{ Form::checkbox('show_in_model_list[]', 'model_number', old('show_in_model_list', $snipeSettings->modellistCheckedValue('model_number')),array('class' => 'minimal', 'aria-label'=>'show_in_model_list' )) }} {{ trans('general.model_no') }}
+ + + +
diff --git a/resources/views/settings/labels.blade.php b/resources/views/settings/labels.blade.php index a509769dee..e214ce0f41 100644 --- a/resources/views/settings/labels.blade.php +++ b/resources/views/settings/labels.blade.php @@ -54,7 +54,7 @@
{{ Form::label('labels_fontsize', trans('admin/settings/general.labels_fontsize')) }}
-
+
{{ Form::text('labels_fontsize', old('labels_fontsize', $setting->labels_fontsize), ['class' => 'form-control', 'aria-label'=>'labels_fontsize']) }}
{{ trans('admin/settings/general.text_pt') }}
@@ -69,13 +69,13 @@
{{ Form::label('labels_width', trans('admin/settings/general.label_dimensions')) }}
-
+
{{ Form::text('labels_width', old('labels_width', $setting->labels_width), ['class' => 'form-control', 'aria-label'=>'labels_width']) }}
{{ trans('admin/settings/general.width_w') }}
-
+
{{ Form::text('labels_height', old('labels_height', $setting->labels_height), ['class' => 'form-control', 'aria-label'=>'labels_height']) }}
{{ trans('admin/settings/general.height_h') }}
@@ -91,13 +91,13 @@
{{ Form::label('labels_display_sgutter', trans('admin/settings/general.label_gutters')) }}
-
+
{{ Form::text('labels_display_sgutter', old('labels_display_sgutter', $setting->labels_display_sgutter), ['class' => 'form-control', 'aria-label'=>'labels_display_sgutter']) }}
{{ trans('admin/settings/general.horizontal') }}
-
+
{{ Form::text('labels_display_bgutter', old('labels_display_bgutter', $setting->labels_display_bgutter), ['class' => 'form-control', 'aria-label'=>'labels_display_bgutter']) }}
{{ trans('admin/settings/general.vertical') }}
@@ -113,7 +113,7 @@
{{ Form::label('labels_pmargin_top', trans('admin/settings/general.page_padding')) }}
-
+
{{ Form::text('labels_pmargin_top', old('labels_pmargin_top', $setting->labels_pmargin_top), ['class' => 'form-control', 'aria-label'=>'labels_pmargin_top']) }}
{{ trans('admin/settings/general.top') }}
@@ -123,7 +123,7 @@
{{ trans('admin/settings/general.right') }}
-
+
{{ Form::text('labels_pmargin_bottom', old('labels_pmargin_bottom', $setting->labels_pmargin_bottom), ['class' => 'form-control', 'aria-label'=>'labels_pmargin_bottom']) }}
{{ trans('admin/settings/general.bottom') }}
@@ -144,7 +144,7 @@
{{ Form::label('labels_pagewidth', trans('admin/settings/general.page_dimensions')) }}
-
+
{{ Form::text('labels_pagewidth', old('labels_pagewidth', $setting->labels_pagewidth), ['class' => 'form-control', 'aria-label'=>'labels_pagewidth']) }}
{{ trans('admin/settings/general.width_w') }}
@@ -167,29 +167,27 @@ {{ Form::label('labels_display', trans('admin/settings/general.label_fields')) }}
-
-
diff --git a/resources/views/settings/saml.blade.php b/resources/views/settings/saml.blade.php index 09990db2e9..6a193a635f 100644 --- a/resources/views/settings/saml.blade.php +++ b/resources/views/settings/saml.blade.php @@ -43,27 +43,29 @@
- -
- -
+
- {{ Form::label('saml_integration', trans('admin/settings/general.saml_integration')) }} + {{ trans('admin/settings/general.saml_integration') }}
- {{ Form::checkbox('saml_enabled', '1', Request::old('saml_enabled', $setting->saml_enabled), [((config('app.lock_passwords')===true)) ? 'disabled ': '', 'class' => 'minimal '. $setting->demoMode, $setting->demoMode]) }} - {{ trans('admin/settings/general.saml_enabled') }} - {!! $errors->first('saml_integration', '') !!}
- @if (config('app.lock_passwords')===true) -

{{ trans('general.feature_disabled') }}

+ + + {!! $errors->first('saml_integration', '') !!} + @if (config('app.lock_passwords') === true) +

{{ trans('general.feature_disabled') }}

@endif +
@if ($setting->saml_enabled) +
{{ Form::label('saml_sp_entitiyid', trans('admin/settings/general.saml_sp_entityid')) }} @@ -95,6 +97,7 @@
+
@@ -103,10 +106,10 @@
{{ Form::textarea('saml_idp_metadata', old('saml_idp_metadata', $setting->saml_idp_metadata), ['class' => 'form-control','placeholder' => 'https://example.com/idp/metadata', 'wrap' => 'off', $setting->demoMode]) }} {!! $errors->first('saml_idp_metadata', '') !!}
- + + accept="text/xml,application/xml" style="display:none; max-width: 90%" {{ $setting->demoMode }}>

{{ trans('admin/settings/general.saml_idp_metadata_help') }}

@@ -118,7 +121,7 @@ {{ Form::label('saml_attr_mapping_username', trans('admin/settings/general.saml_attr_mapping_username')) }}
- {{ Form::text('saml_attr_mapping_username', Request::old('saml_attr_mapping_username', $setting->saml_attr_mapping_username), ['class' => 'form-control','placeholder' => '', $setting->demoMode]) }} + {{ Form::text('saml_attr_mapping_username', old('saml_attr_mapping_username', $setting->saml_attr_mapping_username), ['class' => 'form-control','placeholder' => '', $setting->demoMode]) }}

{{ trans('admin/settings/general.saml_attr_mapping_username_help') }}

{!! $errors->first('saml_attr_mapping_username', '') !!}
@@ -127,11 +130,13 @@
- {{ Form::label('saml_forcelogin', trans('admin/settings/general.saml_forcelogin_label')) }} + {{ trans('admin/settings/general.saml_forcelogin_label') }}
- {{ Form::checkbox('saml_forcelogin', '1', Request::old('saml_forcelogin', $setting->saml_forcelogin),['class' => 'minimal '. $setting->demoMode, $setting->demoMode]) }} - {{ trans('admin/settings/general.saml_forcelogin') }} +

{{ trans('admin/settings/general.saml_forcelogin_help') }}

{{ route('login', ['nosaml']) }}

{!! $errors->first('saml_forcelogin', '') !!} @@ -141,11 +146,13 @@
- {{ Form::label('saml_slo', trans('admin/settings/general.saml_slo_label')) }} + {{ trans('admin/settings/general.saml_slo_label') }}
- {{ Form::checkbox('saml_slo', '1', Request::old('saml_slo', $setting->saml_slo),['class' => 'minimal '. $setting->demoMode, $setting->demoMode]) }} - {{ trans('admin/settings/general.saml_slo') }} +

{{ trans('admin/settings/general.saml_slo_help') }}

{!! $errors->first('saml_slo', '') !!}
@@ -161,10 +168,8 @@

{{ trans('admin/settings/general.saml_custom_settings_help') }}

{!! $errors->first('saml_custom_settings', '') !!}
-
- -
+
-
-
+ + +
@@ -158,9 +173,15 @@ @endforeach
- +
diff --git a/resources/views/users/confirm-bulk-delete.blade.php b/resources/views/users/confirm-bulk-delete.blade.php index 0bccfada85..a3a37d4a35 100644 --- a/resources/views/users/confirm-bulk-delete.blade.php +++ b/resources/views/users/confirm-bulk-delete.blade.php @@ -36,7 +36,9 @@ - + @@ -122,9 +124,10 @@
+ + {{ trans('general.name') }} {{ trans('general.groups') }} {{ trans('general.assets') }}