From 4dcc1ffdbca101d7851bd246c77a1562ebf41af7 Mon Sep 17 00:00:00 2001 From: snipe Date: Wed, 1 Apr 2020 02:22:24 -0700 Subject: [PATCH] More form labels --- .../Transformers/ActionlogsTransformer.php | 2 +- resources/views/categories/edit.blade.php | 23 +++++++++++------- resources/views/companies/index.blade.php | 2 +- resources/views/locations/edit.blade.php | 13 ++++++---- resources/views/manufacturers/edit.blade.php | 24 +++++++++++-------- resources/views/models/edit.blade.php | 13 ++++++---- .../views/partials/bootstrap-table.blade.php | 2 +- .../partials/forms/edit/address.blade.php | 12 +++++----- .../forms/edit/image-upload.blade.php | 4 ++-- resources/views/statuslabels/edit.blade.php | 2 +- 10 files changed, 58 insertions(+), 39 deletions(-) diff --git a/app/Http/Transformers/ActionlogsTransformer.php b/app/Http/Transformers/ActionlogsTransformer.php index 2676d7b549..7d982f1ad8 100644 --- a/app/Http/Transformers/ActionlogsTransformer.php +++ b/app/Http/Transformers/ActionlogsTransformer.php @@ -89,7 +89,7 @@ class ActionlogsTransformer 'item' => ($actionlog->item) ? [ 'id' => (int) $actionlog->item->id, - 'name' => e($actionlog->item->getDisplayNameAttribute()), + 'name' => ($actionlog->itemType()=='user') ? $actionlog->filename : e($actionlog->item->getDisplayNameAttribute()), 'type' => e($actionlog->itemType()), ] : null, 'location' => ($actionlog->location) ? [ diff --git a/resources/views/categories/edit.blade.php b/resources/views/categories/edit.blade.php index 5d8926ae52..5495ba95b5 100755 --- a/resources/views/categories/edit.blade.php +++ b/resources/views/categories/edit.blade.php @@ -14,7 +14,7 @@
- {{ Form::select('category_type', $category_types , Input::old('category_type', $item->category_type), array('class'=>'select2', 'style'=>'min-width:350px', $item->itemCount() > 0 ? 'disabled' : '')) }} + {{ Form::select('category_type', $category_types , Input::old('category_type', $item->category_type), array('class'=>'select2', 'style'=>'min-width:350px', 'aria-label'=>'category_type', $item->itemCount() > 0 ? 'disabled' : '')) }} {!! $errors->first('category_type', ' :message') !!}
@@ -23,7 +23,7 @@
- {{ Form::textarea('eula_text', Input::old('eula_text', $item->eula_text), array('class' => 'form-control')) }} + {{ Form::textarea('eula_text', Input::old('eula_text', $item->eula_text), array('class' => 'form-control', 'aria-label'=>'eula_text')) }}

{!! trans('admin/categories/general.eula_text_help') !!}

{!! trans('admin/settings/general.eula_markdown') !!}

@@ -37,13 +37,16 @@
@if ($snipeSettings->default_eula_text!='') - {{ Form::checkbox('use_default_eula', '1', old('use_default_eula', $item->use_default_eula), ['class'=>'minimal']) }} + @else
- {{ Form::checkbox('use_default_eula', '0', old('use_default_eula'), ['class'=>'disabled minimal','disabled' => 'disabled']) }} - - {!! trans('admin/categories/general.use_default_eula_disabled') !!} +
@endif
@@ -55,8 +58,10 @@
- {{ Form::checkbox('require_acceptance', '1', old('require_acceptance', $item->require_acceptance), ['class'=>'minimal']) }} +
@@ -66,8 +71,10 @@
- {{ Form::checkbox('checkin_email', '1', old('checkin_email', $item->checkin_email), ['class'=>'minimal']) }} +
diff --git a/resources/views/companies/index.blade.php b/resources/views/companies/index.blade.php index dbe6caa5ab..7407f2a084 100644 --- a/resources/views/companies/index.blade.php +++ b/resources/views/companies/index.blade.php @@ -44,7 +44,7 @@
-

About Companies

+

About Companies

You can use companies as a simple informative field, or you can use them to restrict asset visibility and availability to users with a specific company by enabling Full Company Support in your Admin Settings.

diff --git a/resources/views/locations/edit.blade.php b/resources/views/locations/edit.blade.php index 7edfb3b6d1..6c01fb8fb1 100755 --- a/resources/views/locations/edit.blade.php +++ b/resources/views/locations/edit.blade.php @@ -22,7 +22,7 @@ {{ trans('admin/locations/table.currency') }}
- {{ Form::text('currency', Input::old('currency', $item->currency), array('class' => 'form-control','placeholder' => 'USD', 'maxlength'=>'3', 'style'=>'width: 60px;')) }} + {{ Form::text('currency', Input::old('currency', $item->currency), array('class' => 'form-control','placeholder' => 'USD', 'maxlength'=>'3', 'style'=>'width: 60px;', 'aria-label'=>'currency')) }} {!! $errors->first('currency', ':message') !!}
@@ -43,13 +43,16 @@ @endif -@if ($item->image) +@if (($item->image) && ($item->image!=''))
- {{ Form::checkbox('image_delete') }} - - {!! $errors->first('image_delete', ':message') !!} + +
+ Image for {{ $item->name }} + {!! $errors->first('image_delete', '
:message
') !!}
@endif diff --git a/resources/views/manufacturers/edit.blade.php b/resources/views/manufacturers/edit.blade.php index 10c5c35835..0ab866cd1e 100755 --- a/resources/views/manufacturers/edit.blade.php +++ b/resources/views/manufacturers/edit.blade.php @@ -50,19 +50,23 @@ - - @if ($item->image) -
- -
- {{ Form::checkbox('image_delete') }} - - {!! $errors->first('image_delete', ':message') !!} -
+ + @if (($item->image) && ($item->image!='')) +
+ +
+ +
+ Image for {{ $item->name }} + {!! $errors->first('image_delete', '
:message
') !!}
+
@endif -@include ('partials.forms.edit.image-upload') + + @include ('partials.forms.edit.image-upload') @stop diff --git a/resources/views/models/edit.blade.php b/resources/views/models/edit.blade.php index ae271c5835..cc63bc2a90 100755 --- a/resources/views/models/edit.blade.php +++ b/resources/views/models/edit.blade.php @@ -37,7 +37,7 @@
- {{ Form::select('custom_fieldset', \App\Helpers\Helper::customFieldsetList(),Input::old('custom_fieldset', $item->fieldset_id), array('class'=>'select2 js-fieldset-field', 'style'=>'width:350px')) }} + {{ Form::select('custom_fieldset', \App\Helpers\Helper::customFieldsetList(),Input::old('custom_fieldset', $item->fieldset_id), array('class'=>'select2 js-fieldset-field', 'style'=>'width:350px', 'aria-label'=>'custom_fieldset')) }} {!! $errors->first('custom_fieldset', '
:message
') !!}