2023-04-03 23:06:09 -07:00
|
|
|
<!-- Image stuff - kept in /resources/views/partials/forms/edit/image-upload.blade.php -->
|
|
|
|
<!-- Image Delete -->
|
|
|
|
@if (isset($item) && ($item->image) && ($item->image!=''))
|
2023-04-03 22:35:55 -07:00
|
|
|
<div class="form-group{{ $errors->has('image_delete') ? ' has-error' : '' }}">
|
|
|
|
<div class="col-md-9 col-md-offset-3">
|
|
|
|
<label class="form-control">
|
|
|
|
{{ Form::checkbox('image_delete', '1', old('image_delete'), ['aria-label'=>'image_delete']) }}
|
|
|
|
{{ trans('general.image_delete') }}
|
|
|
|
{!! $errors->first('image_delete', '<span class="alert-msg">:message</span>') !!}
|
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<div class="col-md-9 col-md-offset-3">
|
|
|
|
<img src="{{ Storage::disk('public')->url($image_path.e($item->image)) }}" class="img-responsive">
|
|
|
|
{!! $errors->first('image_delete', '<span class="alert-msg">:message</span>') !!}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
@endif
|
|
|
|
|
2023-04-03 23:06:09 -07:00
|
|
|
<!-- Image Upload and preview -->
|
|
|
|
|
2020-03-05 18:00:24 -08:00
|
|
|
<div class="form-group {{ $errors->has((isset($fieldname) ? $fieldname : 'image')) ? 'has-error' : '' }}">
|
2023-01-21 18:20:02 -08:00
|
|
|
<label class="col-md-3 control-label" for="{{ (isset($fieldname) ? $fieldname : 'image') }}">{{ trans('general.image_upload') }}</label>
|
2018-07-19 10:39:12 -07:00
|
|
|
<div class="col-md-9">
|
2020-04-02 18:17:21 -07:00
|
|
|
|
2023-01-21 18:20:02 -08:00
|
|
|
<input type="file" id="{{ (isset($fieldname) ? $fieldname : 'image') }}" name="{{ (isset($fieldname) ? $fieldname : 'image') }}" aria-label="{{ (isset($fieldname) ? $fieldname : 'image') }}" class="sr-only">
|
2020-04-02 18:17:21 -07:00
|
|
|
|
|
|
|
<label class="btn btn-default" aria-hidden="true">
|
2017-12-06 14:33:52 -08:00
|
|
|
{{ trans('button.select_file') }}
|
2024-03-20 05:25:02 -07:00
|
|
|
<input type="file" name="{{ (isset($fieldname) ? $fieldname : 'image') }}" class="js-uploadFile" id="uploadFile" data-maxsize="{{ Helper::file_upload_max_size() }}" accept="image/gif,image/jpeg,image/webp,image/png,image/svg,image/svg+xml,image/avif" style="display:none; max-width: 90%" aria-label="{{ (isset($fieldname) ? $fieldname : 'image') }}" aria-hidden="true">
|
2017-12-06 14:33:52 -08:00
|
|
|
</label>
|
2019-03-01 15:25:42 -08:00
|
|
|
<span class='label label-default' id="uploadFile-info"></span>
|
2018-02-16 21:17:41 -08:00
|
|
|
|
2024-05-15 06:14:58 -07:00
|
|
|
<p class="help-block" id="uploadFile-status">{{ trans('general.image_filetypes_help', ['size' => Helper::file_upload_max_size_readable()]) }} {{ $help_text ?? '' }}</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-04-01 03:21:15 -07:00
|
|
|
{!! $errors->first('image', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
2017-12-06 14:33:52 -08:00
|
|
|
</div>
|
2020-04-02 18:17:21 -07:00
|
|
|
<div class="col-md-4 col-md-offset-3" aria-hidden="true">
|
2024-02-07 07:21:48 -08:00
|
|
|
<img id="uploadFile-imagePreview" style="max-width: 300px; display: none;" alt="{{ trans('general.alt_uploaded_image_thumbnail') }}">
|
2018-02-17 00:51:22 -08:00
|
|
|
</div>
|
2017-12-06 14:33:52 -08:00
|
|
|
</div>
|
2018-01-09 20:12:07 -08:00
|
|
|
|