mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-09 23:24:06 -08:00
Fixed suppliers upload
This commit is contained in:
parent
e5dd6035b9
commit
a90d2ba077
|
@ -44,28 +44,21 @@
|
|||
@include ('partials.forms.edit.notes')
|
||||
|
||||
<!-- Image -->
|
||||
@if ($item->image)
|
||||
|
||||
<div class="form-group {{ $errors->has('image_delete') ? 'has-error' : '' }}">
|
||||
<label class="col-md-3 control-label" for="image_delete">{{ trans('general.image_delete') }}</label>
|
||||
<div class="col-md-5">
|
||||
{{ Form::checkbox('image_delete') }}
|
||||
<img src="{{ url('/') }}/uploads/suppliers/{{ $item->image }}" />
|
||||
{!! $errors->first('image_delete', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
||||
@if (($item->image) && ($item->image!=''))
|
||||
<div class="form-group {{ $errors->has('image_delete') ? 'has-error' : '' }}">
|
||||
<label class="col-md-3 control-label" for="image_delete">{{ trans('general.image_delete') }}</label>
|
||||
<div class="col-md-5">
|
||||
<label for="image_delete">
|
||||
{{ Form::checkbox('image_delete', '1', old('image_delete'), array('class' => 'minimal', 'aria-label'=>'required')) }}
|
||||
</label>
|
||||
<br>
|
||||
<img src="{{ url('/') }}/uploads/models/{{ $item->image }}" alt="Image for {{ $item->name }}">
|
||||
{!! $errors->first('image_delete', '<span class="alert-msg" aria-hidden="true"><br>:message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@endif
|
||||
|
||||
<div class="form-group {{ $errors->has('image') ? 'has-error' : '' }}">
|
||||
<label class="col-md-3 control-label" for="image">{{ trans('general.image_upload') }}</label>
|
||||
<div class="col-md-5">
|
||||
<label class="btn btn-default">
|
||||
{{ trans('button.select_file') }}
|
||||
<input type="file" name="image" accept="image/gif,image/jpeg,image/png,image/svg" hidden>
|
||||
</label>
|
||||
<p class="help-block">Accepted filetypes are jpg, png, gif and svg</p>
|
||||
{!! $errors->first('image', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@include ('partials.forms.edit.image-upload')
|
||||
@stop
|
||||
|
|
Loading…
Reference in a new issue