#590 Photo upload in profile needs to simpler

This commit is contained in:
Diatrex 2020-03-24 10:37:24 +03:00
parent 2500489c93
commit 09211d9641
7 changed files with 12 additions and 50 deletions

View File

@ -2,9 +2,4 @@
background-color: #343a40 !important;
border-color: #343a40 #343a40 #343a40;
color: white!important;
}
/* Hide profile upload table */
.selected.file-rows-table table td:first-child ~ td {
display: none;
}

View File

@ -26,6 +26,8 @@ class ProfileFormHandler
if ($builder->getPostValue('file') != null) {
$parameters['file_id'] = $builder->getPostValue('file');
} elseif (empty($builder->getPostValue('file'))) {
$parameters['file_id'] = null;
}
$userModel->newQuery()->where('id', Auth::id())->update($parameters);

View File

@ -5,6 +5,10 @@
table {
tr {
td {
a, a:hover {
color: #fff;
}
padding: 9px 0;
border-top: none;
border-bottom: none;

View File

@ -33,6 +33,7 @@
progress {
margin-bottom: 0.25em;
width: 100%;
}
.progress-upload {
@ -48,3 +49,7 @@
}
}
}
.btn-success {
color: #fff !important;
}

View File

@ -17,7 +17,7 @@
{% include "visiosoft.field_type.singlefile::upload/partials/body" %}
{% include "visiosoft.field_type.singlefile::upload/partials/template" %}
<div class="uploaded">
<div class="uploaded px-3">
{{ table.content|raw }}
</div>

View File

@ -51,28 +51,6 @@ class UploadTableBuilder extends TableBuilder
'entry.preview' => [
'heading' => 'anomaly.module.files::field.preview.name',
],
'name' => [
'sort_column' => 'name',
'wrapper' => '
<strong>{value.file}</strong>
<br>
<small class="text-muted">{value.disk}://{value.folder}/{value.file}</small>
<br>
<span>{value.size} {value.keywords}</span>',
'value' => [
'file' => 'entry.name',
'folder' => 'entry.folder.slug',
'keywords' => 'entry.keywords.labels|join',
'disk' => 'entry.folder.disk.slug',
'size' => 'entry.size_label',
],
],
'size' => [
'sort_column' => 'size',
'value' => 'entry.readable_size',
],
'mime_type',
'folder',
];
/**

View File

@ -37,28 +37,6 @@ class ValueTableBuilder extends TableBuilder
'entry.preview' => [
'heading' => 'anomaly.module.files::field.preview.name',
],
'name' => [
'sort_column' => 'name',
'wrapper' => '
<strong>{value.file}</strong>
<br>
<small class="text-muted">{value.disk}://{value.folder}/{value.file}</small>
<br>
<span>{value.size} {value.keywords}</span>',
'value' => [
'file' => 'entry.name',
'folder' => 'entry.folder.slug',
'keywords' => 'entry.keywords.labels|join',
'disk' => 'entry.folder.disk.slug',
'size' => 'entry.size_label',
],
],
'size' => [
'sort_column' => 'size',
'value' => 'entry.readable_size',
],
'mime_type',
'folder',
];
/**