2022-11-15 11:04:46 -05:00
|
|
|
<div component="image-picker"
|
|
|
|
option:image-picker:default-image="{{ $defaultImage }}"
|
|
|
|
class="image-picker @if($errors->has($name)) has-error @endif">
|
2016-12-24 10:21:19 -05:00
|
|
|
|
2019-02-03 08:45:45 -05:00
|
|
|
<div class="grid half">
|
|
|
|
<div class="text-center">
|
2022-11-15 11:04:46 -05:00
|
|
|
<img refs="image-picker@image"
|
|
|
|
@if($currentImage && $currentImage !== 'none') src="{{$currentImage}}" @else src="{{$defaultImage}}" @endif
|
|
|
|
class="{{$imageClass}} @if($currentImage=== 'none') none @endif" alt="{{ trans('components.image_preview') }}">
|
2019-02-03 08:45:45 -05:00
|
|
|
</div>
|
|
|
|
<div class="text-center">
|
2022-11-15 11:04:46 -05:00
|
|
|
<input refs="image-picker@image-input" type="file" class="custom-file-input" accept="image/*" name="{{ $name }}" id="{{ $name }}">
|
2019-05-04 10:48:15 -04:00
|
|
|
<label for="{{ $name }}" class="button outline">{{ trans('components.image_select_image') }}</label>
|
2022-11-15 11:04:46 -05:00
|
|
|
<input refs="image-picker@reset-input" type="hidden" name="{{ $name }}_reset" value="true" disabled="disabled">
|
2019-05-04 10:48:15 -04:00
|
|
|
@if(isset($removeName))
|
2022-11-15 11:04:46 -05:00
|
|
|
<input refs="image-picker@remove-input" type="hidden" name="{{ $removeName }}" value="{{ $removeValue }}" disabled="disabled">
|
2019-05-04 10:48:15 -04:00
|
|
|
@endif
|
|
|
|
|
2019-02-03 08:45:45 -05:00
|
|
|
<br>
|
2022-11-15 11:04:46 -05:00
|
|
|
<button refs="image-picker@reset-button" class="text-button text-muted" type="button">{{ trans('common.reset') }}</button>
|
2016-12-24 10:21:19 -05:00
|
|
|
|
2019-05-04 10:48:15 -04:00
|
|
|
@if(isset($removeName))
|
2019-02-03 08:45:45 -05:00
|
|
|
<span class="sep">|</span>
|
2022-11-15 11:04:46 -05:00
|
|
|
<button refs="image-picker@remove-button" class="text-button text-muted" type="button">{{ trans('common.remove') }}</button>
|
2019-02-03 08:45:45 -05:00
|
|
|
@endif
|
|
|
|
</div>
|
|
|
|
</div>
|
2016-12-24 10:21:19 -05:00
|
|
|
|
2019-05-04 10:48:15 -04:00
|
|
|
@if($errors->has($name))
|
|
|
|
<div class="text-neg text-small">{{ $errors->first($name) }}</div>
|
|
|
|
@endif
|
|
|
|
|
2017-12-06 12:32:29 -05:00
|
|
|
</div>
|