mirror of
https://github.com/snipe/snipe-it.git
synced 2025-01-13 06:47:46 -08:00
Use image upload partial in asset edit/create
This commit is contained in:
parent
b3d673b0aa
commit
502e4d672a
|
@ -92,13 +92,7 @@
|
||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
<div class="form-group {{ $errors->has('image') ? 'has-error' : '' }}">
|
@include ('partials.forms.edit.image-upload')
|
||||||
<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>
|
|
||||||
|
|
||||||
@stop
|
@stop
|
||||||
|
|
||||||
|
@ -199,7 +193,7 @@
|
||||||
//First check to see if there is a file before doing anything else
|
//First check to see if there is a file before doing anything else
|
||||||
|
|
||||||
var imageData = "";
|
var imageData = "";
|
||||||
var $fileInput = $('#file-upload');
|
var $fileInput = $('#uploadFile');
|
||||||
$fileInput.on('change', function (e) {
|
$fileInput.on('change', function (e) {
|
||||||
if ($fileInput != '') {
|
if ($fileInput != '') {
|
||||||
if (window.File && window.FileReader && window.FormData) {
|
if (window.File && window.FileReader && window.FormData) {
|
||||||
|
|
Loading…
Reference in a new issue