Use image upload partial in asset edit/create

This commit is contained in:
snipe 2018-02-16 22:08:49 -08:00
parent b3d673b0aa
commit 502e4d672a

View file

@ -92,13 +92,7 @@
</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">
<input type="file" id="file-upload" accept="image/*" name="image">
{!! $errors->first('image', '<span class="alert-msg">:message</span>') !!}
</div>
</div>
@include ('partials.forms.edit.image-upload')
@stop
@ -199,7 +193,7 @@
//First check to see if there is a file before doing anything else
var imageData = "";
var $fileInput = $('#file-upload');
var $fileInput = $('#uploadFile');
$fileInput.on('change', function (e) {
if ($fileInput != '') {
if (window.File && window.FileReader && window.FormData) {