mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-25 05:34:06 -08:00
Use image upload partial in asset edit/create
This commit is contained in:
parent
b3d673b0aa
commit
502e4d672a
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue