mivita/resources/views/user/components/user_shop_image.blade.php
Kevin Adametz bfa3bb1df4 08 2024
2024-08-05 12:05:24 +02:00

61 lines
No EOL
2.9 KiB
PHP
Executable file

<h5 class="card-header">{{ __('shop.shop_image') }}<br><small>{{ __('shop.shop_image_copy') }}</small>
</h5>
<div class="card-body p-3">
<style>
.dz-message {
margin: 2rem 0;
}
.default-style .dz-message {
font-size: 1.1em;
}
</style>
<div class="row">
@if($user->shop->isImage())
<div class="col-12 text-center">
<div class="text-center">
<img class="img-fluid" style="margin: 0 auto;" alt="" src="{{ url($user->shop->getImage()) }}">
<br><br>
<a href="{{ route('user_shop_delete_image') }}" class="btn btn-danger" onclick="return confirm('{{ __('actions.really_delete_picture') }}');"><i class="fa fa-trash"></i></a>
</div>
</div>
@else
<div class="col-md-12">
<div class="card">
<div class="card-body">
<form method="POST" action="{{ route('user_shop_upload_image') }}" accept-charset="UTF-8" class="avatar" enctype="multipart/form-data">
@csrf
<div class="slim_holder text-center">
<div class="slim" style="margin:20px auto;"
data-label='<span class="text-green">{{ __('actions.upload_photo') }}</span><br>({{ __('actions.search_file_or_drag_drop') }})'
data-fetcher="fetch.php"
data-size="600,800"
data-min-size="200,200"
data-max-file-size="10"
data-status-image-too-small="{{ __('actions.image_too_small') }}"
data-status-file-type="{{ __('actions.invalid_file') }}"
data-status-file-size="{{ __('actions.file_is_too_big') }}"
data-button-confirm-label="{{ __('actions.confirm') }}"
data-button-cancel-label="{{ __('actions.cancel') }}"
data-button-confirm-title="{{ __('actions.confirm') }}"
data-button-cancel-title="{{ __('actions.cancel') }}"
data-button-rotate-title="{{ __('actions.rotate') }}"
data-ratio="3:4">
<input type="file" name="images[]" required />
</div>
<br>
<button class="btn btn-primary" type="submit">{{ __('actions.save_image') }}</button>
</div>
</form>
</div>
</div>
</div>
@endif
</div>
</div>