diff options
author | Jon Bergli Heier <snakebite@jvnv.net> | 2017-04-09 09:02:09 +0200 |
---|---|---|
committer | Jon Bergli Heier <snakebite@jvnv.net> | 2017-04-09 09:02:09 +0200 |
commit | b36f9c05071ea549ed59e703270fcf223b60df03 (patch) | |
tree | 8992c6bcaa5b0d64cbd589588b2539523125548c /fbin/templates/upload.html | |
parent | af750a6598d53b8a5cb58092dd5b523ea7e967ca (diff) |
Major rewrite to use jab/oauth.
Highlights:
- Uses the oauth branch of jab.
- Changed design to use bootstrap.
- Some minor changes to functionality in file uploading and listing.
- API is currently disabled and incomplete.
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 %} |