Browse Source

Move file upload options above drop zone

This moves the 'randomize filename' checkbox and 'file expiry' menu
above the drop zone, so that the user is encouraged to tweak those
options before choosing the file to upload. Fixes
andreimarcu/linx-server#187.
pull/188/head
James Tai 6 years ago
parent
commit
c1bb144982
  1. 2
      static/css/linx.css
  2. 19
      templates/index.html

2
static/css/linx.css

@ -251,7 +251,7 @@ body {
flex-wrap: wrap; flex-wrap: wrap;
justify-content: space-between; justify-content: space-between;
width: 100%; width: 100%;
margin-top: 5px;
margin-bottom: 5px;
font-size: 13px; font-size: 13px;
} }

19
templates/index.html

@ -7,15 +7,6 @@
{% block content %} {% block content %}
<div id="fileupload"> <div id="fileupload">
<form action="{{ sitepath }}upload" class="dropzone" id="dropzone" method="POST" enctype="multipart/form-data" data-maxsize="{{ maxsize }}"> <form action="{{ sitepath }}upload" class="dropzone" id="dropzone" method="POST" enctype="multipart/form-data" data-maxsize="{{ maxsize }}">
<div class="fallback">
<input id="fileinput" name="file" type="file" /><br />
<input id="submitbtn" type="submit" value="Upload">
</div>
<div id="dzone" class="dz-default dz-message">
<span>Click or Drop file(s) or Paste image</span>
</div>
<div id="choices"> <div id="choices">
<label>{% if not forcerandom %}<input name="randomize" id="randomize" type="checkbox" checked /> Randomize filename{% endif %}</label> <label>{% if not forcerandom %}<input name="randomize" id="randomize" type="checkbox" checked /> Randomize filename{% endif %}</label>
<div id="expiry"> <div id="expiry">
@ -28,6 +19,16 @@
</label> </label>
</div> </div>
</div> </div>
<div class="fallback">
<input id="fileinput" name="file" type="file" /><br />
<input id="submitbtn" type="submit" value="Upload">
</div>
<div id="dzone" class="dz-default dz-message">
<span>Click or Drop file(s) or Paste image</span>
</div>
<div class="clear"></div> <div class="clear"></div>
</form> </form>
<div id="uploads"></div> <div id="uploads"></div>

Loading…
Cancel
Save