snipe-it/resources/views/partials/forms/edit/image-upload.blade.php

21 lines
1.2 KiB
PHP
Raw Normal View History

<div class="form-group {{ $errors->has((isset($fieldname) ? $fieldname : 'image')) ? 'has-error' : '' }}">
<label class="col-md-3 control-label" for="image">{{ trans('general.image_upload') }}</label>
2018-07-19 10:39:12 -07:00
<div class="col-md-9">
<input type="file" id="image" name="image" aria-label="image" class="sr-only">
<label class="btn btn-default" aria-hidden="true">
{{ trans('button.select_file') }}
<input type="file" name="image" id="uploadFile" data-maxsize="{{ \App\Helpers\Helper::file_upload_max_size() }}" accept="image/gif,image/jpeg,image/png,image/svg" style="display:none" aria-label="image" aria-hidden="true">
</label>
<span class='label label-default' id="uploadFile-info"></span>
<p class="help-block" id="upload-file-status">{{ trans('general.image_filetypes_help', ['size' => \App\Helpers\Helper::file_upload_max_size_readable()]) }}</p>
2020-04-01 03:21:15 -07:00
{!! $errors->first('image', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
</div>
<div class="col-md-4 col-md-offset-3" aria-hidden="true">
2020-04-01 02:22:24 -07:00
<img id="imagePreview" style="max-width: 200px; display: none;" alt="Uploaded image thumbnail">
2018-02-17 00:51:22 -08:00
</div>
</div>