diff options
Diffstat (limited to 'fbin/templates/upload.html')
-rw-r--r-- | fbin/templates/upload.html | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/fbin/templates/upload.html b/fbin/templates/upload.html new file mode 100644 index 0000000..643e09d --- /dev/null +++ b/fbin/templates/upload.html @@ -0,0 +1,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 %} |