Merge pull request #15125 from snipe/fixes/display_avatar_on_user_edit

Show existing images on user edit page
This commit is contained in:
snipe 2024-07-20 00:29:28 +01:00 committed by GitHub
commit 63377853b8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,6 +1,6 @@
<!-- Image stuff - kept in /resources/views/partials/forms/edit/image-upload.blade.php --> <!-- Image stuff - kept in /resources/views/partials/forms/edit/image-upload.blade.php -->
<!-- Image Delete --> <!-- Image Delete -->
@if (isset($item) && ($item->image) && ($item->image!='')) @if (isset($item) && ($item->{($fieldname ?? 'image')}))
<div class="form-group{{ $errors->has('image_delete') ? ' has-error' : '' }}"> <div class="form-group{{ $errors->has('image_delete') ? ' has-error' : '' }}">
<div class="col-md-9 col-md-offset-3"> <div class="col-md-9 col-md-offset-3">
<label class="form-control"> <label class="form-control">
@ -12,7 +12,7 @@
</div> </div>
<div class="form-group"> <div class="form-group">
<div class="col-md-9 col-md-offset-3"> <div class="col-md-9 col-md-offset-3">
<img src="{{ Storage::disk('public')->url($image_path.e($item->image)) }}" class="img-responsive"> <img src="{{ Storage::disk('public')->url($image_path.e($item->{($fieldname ?? 'image')})) }}" class="img-responsive">
{!! $errors->first('image_delete', '<span class="alert-msg">:message</span>') !!} {!! $errors->first('image_delete', '<span class="alert-msg">:message</span>') !!}
</div> </div>
</div> </div>