summaryrefslogtreecommitdiff
path: root/fbin/templates/upload.html
blob: 643e09d92560dc055bae7a942d4a4b202246768d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
{% extends "base.html" %}
{% block content %}
{% if current_user.is_authenticated or config.ALLOW_ANONYMOUS_UPLOADS %}
<form method="post" enctype="multipart/form-data" class="form-horizontal">
	<div class="form-group">
		<input type="file" name="file" style="display: none" onchange="$('#file-filename').text($('#file').val())">
	</div>
	<div class="form-group">
		<button type="submit" value="Upload" class="btn btn-primary btn">
			<span class="glyphicon glyphicon-cloud-upload" aria-hidden="true"></span>
			Upload
		</button>
	</div>
</form>
{% else %}
<div class="alert alert-warning">You must be <a href="{{ url_for('.login') }}">logged in</a> to upload files.</div>
{% endif %}
{% endblock %}
{% block scripts %}
<script>
$(document).ready(function() {
	$(':file').filestyle('placeholder', 'No file');
});
</script>
{% endblock %}