diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md index 8da5a4ac22..11525cb702 100644 --- a/.github/ISSUE_TEMPLATE.md +++ b/.github/ISSUE_TEMPLATE.md @@ -28,7 +28,7 @@ - What specific Snipe-IT page you're on, and what specific element you're interacting with to trigger the error - If a stacktrace is provided in the error, include that too. - Any errors that appear in your browser's error console. -- Confirm whether the error is reproduceable on the demo: https://snipeitapp.com/demo. +- Confirm whether the error is reproducible on the demo: https://snipeitapp.com/demo. - Include any additional information you can find in `app/storage/logs` and your webserver's logs. - Include what you've done so far in the installation, and if you got any error messages along the way. - Indicate whether or not you've manually edited any data directly in the database diff --git a/app/Http/Controllers/DepartmentsController.php b/app/Http/Controllers/DepartmentsController.php index 31b92673e9..0ed1575721 100644 --- a/app/Http/Controllers/DepartmentsController.php +++ b/app/Http/Controllers/DepartmentsController.php @@ -144,7 +144,7 @@ class DepartmentsController extends Controller return view('departments/edit', compact('item')); } - public function update(Request $request, $id) { + public function update(ImageUploadRequest $request, $id) { $this->authorize('create', Department::class); if (is_null($department = Department::find($id))) { diff --git a/app/Http/Controllers/ManufacturersController.php b/app/Http/Controllers/ManufacturersController.php index cd23d12cd4..c936b90e5d 100755 --- a/app/Http/Controllers/ManufacturersController.php +++ b/app/Http/Controllers/ManufacturersController.php @@ -123,7 +123,7 @@ class ManufacturersController extends Controller * @return \Illuminate\Http\RedirectResponse * @since [v1.0] */ - public function update(Request $request, $manufacturerId = null) + public function update(ImageUploadRequest $request, $manufacturerId = null) { // Check if the manufacturer exists if (is_null($manufacturer = Manufacturer::find($manufacturerId))) { diff --git a/app/Http/Controllers/ProfileController.php b/app/Http/Controllers/ProfileController.php index c76c5f9cf8..72fde2fe9a 100755 --- a/app/Http/Controllers/ProfileController.php +++ b/app/Http/Controllers/ProfileController.php @@ -11,6 +11,7 @@ use App\Models\Setting; use Gate; use Illuminate\Http\Request; use Illuminate\Support\Facades\Hash; +use App\Http\Requests\ImageUploadRequest; /** * This controller handles all actions related to User Profiles for @@ -40,7 +41,7 @@ class ProfileController extends Controller * @since [v1.0] * @return \Illuminate\Http\RedirectResponse */ - public function postIndex() + public function postIndex(ImageUploadRequest $request) { $user = Auth::user(); diff --git a/app/Http/Requests/ImageUploadRequest.php b/app/Http/Requests/ImageUploadRequest.php index 2b8bad20f4..45e45ac3b2 100644 --- a/app/Http/Requests/ImageUploadRequest.php +++ b/app/Http/Requests/ImageUploadRequest.php @@ -24,7 +24,8 @@ class ImageUploadRequest extends Request public function rules() { return [ - 'image' => 'mimes:png,gif,jpg,jpeg,svg|max:2000' + 'image' => 'mimes:png,gif,jpg,jpeg,svg|max:2000', + 'avatar' => 'mimes:png,gif,jpg,jpeg,svg|max:2000', ]; } diff --git a/app/Policies/LicensePolicy.php b/app/Policies/LicensePolicy.php index 30ccf4a808..0fa4f0ca7d 100644 --- a/app/Policies/LicensePolicy.php +++ b/app/Policies/LicensePolicy.php @@ -16,8 +16,8 @@ class LicensePolicy extends CheckoutablePermissionsPolicy /** * Determine whether the user can view license keys * - * @param \App\User $user - * @param \App\License $license + * @param \App\Models\User $user + * @param \App\Models\License $license * @return mixed */ public function viewKeys(User $user, License $license = null) diff --git a/public/css/build/all.css b/public/css/build/all.css index 0d816efc57..a99d85233d 100644 Binary files a/public/css/build/all.css and b/public/css/build/all.css differ diff --git a/public/css/dist/all.css b/public/css/dist/all.css index 0d816efc57..a99d85233d 100644 Binary files a/public/css/dist/all.css and b/public/css/dist/all.css differ diff --git a/public/css/overrides.css b/public/css/overrides.css index 7ba454db7f..15a7cc60ce 100644 Binary files a/public/css/overrides.css and b/public/css/overrides.css differ diff --git a/public/mix-manifest.json b/public/mix-manifest.json index a4e607fcec..575d62b70e 100644 --- a/public/mix-manifest.json +++ b/public/mix-manifest.json @@ -2,13 +2,13 @@ "/js/build/vue.js": "/js/build/vue.js?id=e6804371942215bd1d7d", "/css/AdminLTE.css": "/css/AdminLTE.css?id=b8be19a285eaf44eec37", "/css/app.css": "/css/app.css?id=407edb63cc6b6dc62405", - "/css/overrides.css": "/css/overrides.css?id=ca0621c2a909d165534d", + "/css/overrides.css": "/css/overrides.css?id=1bdafb06a8609780f546", "/js/build/vue.js.map": "/js/build/vue.js.map?id=3b3d417664a61dcce3e9", "/css/AdminLTE.css.map": "/css/AdminLTE.css.map?id=99f5a5a03c4155cf69f6", "/css/app.css.map": "/css/app.css.map?id=bdbe05e6ecd70ccfac72", "/css/overrides.css.map": "/css/overrides.css.map?id=898c91d4a425b01b589b", - "/css/dist/all.css": "/css/dist/all.css?id=51e5995cec7ce583f5dd", + "/css/dist/all.css": "/css/dist/all.css?id=3a8aa974e7b09b52b18c", "/js/dist/all.js": "/js/dist/all.js?id=88f08e0103b14f7949b3", - "/css/build/all.css": "/css/build/all.css?id=51e5995cec7ce583f5dd", + "/css/build/all.css": "/css/build/all.css?id=3a8aa974e7b09b52b18c", "/js/build/all.js": "/js/build/all.js?id=88f08e0103b14f7949b3" } \ No newline at end of file diff --git a/resources/assets/less/overrides.less b/resources/assets/less/overrides.less index f3e816a439..710144f998 100644 --- a/resources/assets/less/overrides.less +++ b/resources/assets/less/overrides.less @@ -322,3 +322,7 @@ img.navbar-brand-img, .navbar-brand>img { .btn.bg-maroon, .btn.bg-purple{ min-width:90px; } + +[hidden] { + display: none !important; +} diff --git a/resources/lang/en/general.php b/resources/lang/en/general.php index c753a311c3..b50afe0812 100644 --- a/resources/lang/en/general.php +++ b/resources/lang/en/general.php @@ -93,6 +93,7 @@ 'image' => 'Image', 'image_delete' => 'Delete Image', 'image_upload' => 'Upload Image', + 'image_filetypes_help' => 'Accepted filetypes are jpg, png, gif, and svg.', 'import' => 'Import', 'import-history' => 'Import History', 'asset_maintenance' => 'Asset Maintenance', diff --git a/resources/views/accessories/edit.blade.php b/resources/views/accessories/edit.blade.php index 40d0468fc7..66966a3d52 100755 --- a/resources/views/accessories/edit.blade.php +++ b/resources/views/accessories/edit.blade.php @@ -24,15 +24,15 @@ -
{{ trans('general.lock_passwords') }}
- @else - {{ Form::file('image') }} - {!! $errors->first('image', ':message') !!} - @endif +Accepted filetypes are jpg, png, gif and svg
+ {!! $errors->first('image', ':message') !!}{{ trans('general.image_filetypes_help') }}
{!! $errors->first('avatar', ':message') !!}{{ trans('general.image_filetypes_help') }}
+ {!! $errors->first('image', ':message') !!} +{{ trans('general.lock_passwords') }}
@else - {{ Form::file('image') }} - {!! $errors->first('image', ':message') !!} - {{ Form::checkbox('clear_logo', '1', Input::old('clear_logo'),array('class' => 'minimal')) }} Remove - @endif + +{{ trans('general.image_filetypes_help') }}
+ + {!! $errors->first('image', ':message') !!} + {{ Form::checkbox('clear_logo', '1', Input::old('clear_logo'),array('class' => 'minimal')) }} Remove + @endifAccepted filetypes are jpg, png, gif and svg
{!! $errors->first('image', ':message') !!}