mirror of
https://github.com/prurigro/hypothetical.git
synced 2024-11-23 16:34:10 -05:00
Fix the alignment of file upload inputs in dashboard edit item pages
This commit is contained in:
parent
c70b82b611
commit
5e8bc06c51
2 changed files with 19 additions and 10 deletions
|
@ -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);
|
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 {
|
&.date-picker {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.upload-wrapper {
|
||||||
|
display: flex;
|
||||||
|
height: $label-height;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
input {
|
||||||
|
overflow: hidden;
|
||||||
|
max-width: 100%;
|
||||||
|
font-size: pxrem(14);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
textarea {
|
textarea {
|
||||||
resize: none;
|
resize: none;
|
||||||
min-height: pxrem(175);
|
min-height: pxrem(175);
|
||||||
|
|
|
@ -162,7 +162,9 @@
|
||||||
$current_image = "/uploads/$model/img/$id-" . $column['name'] . '.' . $ext;
|
$current_image = "/uploads/$model/img/$id-" . $column['name'] . '.' . $ext;
|
||||||
@endphp
|
@endphp
|
||||||
|
|
||||||
|
<div class="upload-wrapper">
|
||||||
<input class="image-upload" type="file" data-column="{{ $column['name'] }}" data-model="{{ $model }}" data-id="{{ $id }}" />
|
<input class="image-upload" type="file" data-column="{{ $column['name'] }}" data-model="{{ $model }}" data-id="{{ $id }}" />
|
||||||
|
</div>
|
||||||
|
|
||||||
@if(file_exists(base_path() . '/public' . $current_image))
|
@if(file_exists(base_path() . '/public' . $current_image))
|
||||||
<div id="current-image-{{ $column['name'] }}">
|
<div id="current-image-{{ $column['name'] }}">
|
||||||
|
@ -180,7 +182,9 @@
|
||||||
$current_file = "/uploads/$model/files/$id-" . $column['name'] . '.' . $column['ext'];
|
$current_file = "/uploads/$model/files/$id-" . $column['name'] . '.' . $column['ext'];
|
||||||
@endphp
|
@endphp
|
||||||
|
|
||||||
|
<div class="upload-wrapper">
|
||||||
<input class="file-upload" type="file" data-column="{{ $column['name'] }}" data-model="{{ $model }}" data-id="{{ $id }}" />
|
<input class="file-upload" type="file" data-column="{{ $column['name'] }}" data-model="{{ $model }}" data-id="{{ $id }}" />
|
||||||
|
</div>
|
||||||
|
|
||||||
@if(file_exists(base_path() . '/public' . $current_file))
|
@if(file_exists(base_path() . '/public' . $current_file))
|
||||||
<div id="current-file-{{ $column['name'] }}">
|
<div id="current-file-{{ $column['name'] }}">
|
||||||
|
|
Loading…
Reference in a new issue