From 5e8bc06c5160133310cf60c1bdc55bbf0ae52ce4 Mon Sep 17 00:00:00 2001 From: Kevin MacMartin Date: Wed, 10 Apr 2024 18:25:20 -0400 Subject: [PATCH] Fix the alignment of file upload inputs in dashboard edit item pages --- resources/sass/dashboard.scss | 21 ++++++++++++------- .../views/dashboard/pages/edit-item.blade.php | 8 +++++-- 2 files changed, 19 insertions(+), 10 deletions(-) diff --git a/resources/sass/dashboard.scss b/resources/sass/dashboard.scss index 975ab18..0ff6433 100644 --- a/resources/sass/dashboard.scss +++ b/resources/sass/dashboard.scss @@ -1141,7 +1141,7 @@ form { } } - .text-display, .mkd-editor-container, input, textarea, select { + .text-display, .mkd-editor-container, input:not([type="file"]), textarea, select, .upload-wrapper { margin-bottom: pxrem(15); } @@ -1160,18 +1160,23 @@ form { } } - &[type="file"] { - overflow: hidden; - max-width: 100%; - height: $label-height; - font-size: pxrem(14); - } - &.date-picker { cursor: pointer; } } + .upload-wrapper { + display: flex; + height: $label-height; + align-items: center; + + input { + overflow: hidden; + max-width: 100%; + font-size: pxrem(14); + } + } + textarea { resize: none; min-height: pxrem(175); diff --git a/resources/views/dashboard/pages/edit-item.blade.php b/resources/views/dashboard/pages/edit-item.blade.php index bac93bd..71bf786 100644 --- a/resources/views/dashboard/pages/edit-item.blade.php +++ b/resources/views/dashboard/pages/edit-item.blade.php @@ -162,7 +162,9 @@ $current_image = "/uploads/$model/img/$id-" . $column['name'] . '.' . $ext; @endphp - +
+ +
@if(file_exists(base_path() . '/public' . $current_image))
@@ -180,7 +182,9 @@ $current_file = "/uploads/$model/files/$id-" . $column['name'] . '.' . $column['ext']; @endphp - +
+ +
@if(file_exists(base_path() . '/public' . $current_file))