2019-05-04 10:48:15 -04:00
|
|
|
<div class="image-picker @if($errors->has($name)) has-error @endif"
|
|
|
|
image-picker="{{$name}}"
|
|
|
|
data-default-image="{{ $defaultImage }}">
|
2016-12-24 10:21:19 -05:00
|
|
|
|
2019-02-03 08:45:45 -05:00
|
|
|
<div class="grid half">
|
|
|
|
<div class="text-center">
|
|
|
|
<img @if($currentImage && $currentImage !== 'none') src="{{$currentImage}}" @else src="{{$defaultImage}}" @endif class="{{$imageClass}} @if($currentImage=== 'none') none @endif" alt="{{ trans('components.image_preview') }}">
|
|
|
|
</div>
|
|
|
|
<div class="text-center">
|
2019-05-04 10:48:15 -04:00
|
|
|
|
2019-08-25 10:44:51 -04:00
|
|
|
<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>
|
|
|
|
<input type="hidden" data-reset-input name="{{ $name }}_reset" value="true" disabled="disabled">
|
|
|
|
@if(isset($removeName))
|
|
|
|
<input type="hidden" data-remove-input name="{{ $removeName }}" value="{{ $removeValue }}" disabled="disabled">
|
|
|
|
@endif
|
|
|
|
|
2019-02-03 08:45:45 -05:00
|
|
|
<br>
|
2019-04-07 06:34:40 -04:00
|
|
|
<button class="text-button text-muted" data-action="reset-image" 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>
|
2019-04-07 06:34:40 -04:00
|
|
|
<button class="text-button text-muted" data-action="remove-image" 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>
|