Add flash messages to receive template, and begin implementing upload POST

This commit is contained in:
Micah Lee 2018-03-13 05:50:26 -07:00
parent 8e82c07039
commit 000d9620c1
No known key found for this signature in database
GPG key ID: 403C2657CD994F73
3 changed files with 44 additions and 4 deletions

View file

@ -115,3 +115,15 @@ table.file-list td:last-child {
color: #666666;
margin: 0 0 20px 0;
}
ul.flashes {
list-style: none;
margin: 0;
padding: 0;
color: #cc0000;
}
ul.flashes li {
margin: 0;
padding: 10px;
}

View file

@ -12,12 +12,22 @@
<h1>OnionShare</h1>
</header>
{% with messages = get_flashed_messages() %}
{% if messages %}
<ul class=flashes>
{% for message in messages %}
<li>{{ message }}</li>
{% endfor %}
</ul>
{% endif %}
{% endwith %}
<div class="upload-wrapper">
<div class="upload">
<p><img class="logo" src="/static/img/logo_large.png" title="OnionShare"></p>
<p class="upload-header">Send Files</p>
<p class="upload-description">Select the files you want to send, then click "Send Files"...</p>
<form method="post" enctype="multipart/form-data" action="/{{ slug }}/">
<form method="post" enctype="multipart/form-data" action="/{{ slug }}/upload">
<p><input type="file" multiple /></p>
<p><input type="submit" class="button" value="Upload Files" /></p>
</form>