Viewing file: create.blade.php (1.95 KB) -rw-rw-r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
{{Form::open(array('url'=>'company-policy','method'=>'post', 'enctype' => "multipart/form-data"))}} <div class="modal-body"> <div class="row"> <div class="col-md-6"> <div class="form-group"> {{Form::label('branch',__('Branch'),['class'=>'form-label'])}} {{Form::select('branch',$branch,null,array('class'=>'form-control select','required'=>'required'))}} </div> </div> <div class="col-md-6"> <div class="form-group"> {{Form::label('title',__('Title'),['class'=>'form-label'])}} {{Form::text('title',null,array('class'=>'form-control','required'=>'required'))}} </div> </div> <div class="col-md-12"> <div class="form-group"> {{ Form::label('description', __('Description'),['class'=>'form-label'])}} {{ Form::textarea('description',null, array('class' => 'form-control')) }} </div> </div> <div class="col-md-12"> {{Form::label('attachment',__('Attachment'),['class'=>'form-label'])}} <div class="choose-file form-group"> <label for="attachment" class="form-label"> <input type="file" class="form-control" name="attachment" id="attachment" data-filename="attachment_create"> <img id="image" class="mt-3" style="width:25%;"/>
</label> {{-- <p class="attachment_create"></p>--}} </div> </div>
</div> </div> <div class="modal-footer"> <input type="button" value="{{__('Cancel')}}" class="btn btn-light" data-bs-dismiss="modal"> <input type="submit" value="{{__('Create')}}" class="btn btn-primary"> </div> {{Form::close()}}
<script> document.getElementById('attachment').onchange = function () { var src = URL.createObjectURL(this.files[0]) document.getElementById('image').src = src } </script>
|