You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
55 lines
1.8 KiB
55 lines
1.8 KiB
{% extends 'partials/base.html' %}
|
|
{% block content %}
|
|
<form method="post" enctype="multipart/form-data">{% csrf_token %}
|
|
|
|
<div class="col-lg-7">
|
|
<!-- The fileinput-button span is used to style the file input field as button -->
|
|
<span class="btn btn-success fileinput-button">
|
|
<i class="glyphicon glyphicon-plus"></i>
|
|
<span>Add files...</span>
|
|
<input type="file" name="files[]" multiple>
|
|
</span>
|
|
</div>
|
|
<input type="submit" value="Save12"/>
|
|
</form>
|
|
{% endblock %}
|
|
|
|
{% block js_block %}
|
|
|
|
<script type="text/javascript">
|
|
|
|
$(function(){
|
|
$.ajax({
|
|
url : '/work_sell/test/',
|
|
|
|
success:function(data){
|
|
alert(data);
|
|
console.log(data);
|
|
}
|
|
});
|
|
});
|
|
|
|
{# $(function(){#}
|
|
{# var files;#}
|
|
{# $('input[type=file]').on('change', prepareUpload);#}
|
|
{# $('form').on('submit', uploadFiles);#}
|
|
{##}
|
|
{# function uploadFiles(e){#}
|
|
{# console.log('submit');#}
|
|
{# e.stopPropagation();#}
|
|
{# e.preventDefault();#}
|
|
{# var data = new FormData();#}
|
|
{# $.each(files, function(k,v){#}
|
|
{# console.log(k);#}
|
|
{# console.log(v);#}
|
|
{# data.append(k, v);#}
|
|
{# });#}
|
|
{# console.log(data);#}
|
|
{# }#}
|
|
{# function prepareUpload(e){#}
|
|
{# files = e.target.files;#}
|
|
{# }#}
|
|
{##}
|
|
{# });#}
|
|
</script>
|
|
{% endblock %}
|
|
|