Scan Upload working nicely

This commit is contained in:
Philip Sargent
2021-04-30 03:44:53 +01:00
parent 03a5f5989e
commit bdf535fcbf
6 changed files with 86 additions and 32 deletions

View File

@@ -32,6 +32,7 @@
<a href="/survexfile/">Survex</a> |
<a href="{% url "survexcaveslist" %}">All Survex</a> |
<a href="{% url "allwallets" %}">Scans</a> |
<a href="{% url "scanupload" '2021:01' %}">Upload Scans</a> |
<a href="{% url "dwgdata" %}">Drawings</a> |
<a href="/1623/290/290.html">290 (FGH)</a> |
<a href="/1623/291/291">291 (GSH)</a> |

View File

@@ -4,15 +4,27 @@
{% block content %}
<h2>Survey Scan upload into Wallet</h2>
<h2>Scanned notes or survey upload into wallet </h2>
<p style="font-family: monospace; font-weight: bold; font-size: 130%; text-align: center">
<a style="font-weight: normal;" href="/scanupload/{{prevy}}:01">{{prevy}}</a>
&nbsp;...&nbsp;
<a href="/scanupload/{{year}}:{{prev}}">{{year}}:{{prev}}</a>
&larr; {{wallet}} &rarr;
<a href="/scanupload/{{year}}:{{next}}">{{year}}:{{next}}</a>
&nbsp;...&nbsp;
<a style="font-weight: normal;" href="/scanupload/{{nexty}}:01">{{nexty}}</a>
</p>
<div style="column-count: 2;">
<div style = "max-width:40%px; " >
<div style = "max-width:40%;">
{% if filesaved %}
<p style="margin-left:20%;">
<b>The file was saved as <em>'{{actual_saved}}'</em> <br><br>Upload another?</b>
<b>File(s) saved as
{% for f in actual_saved %}
<em>'{{f}}'</em>
{% endfor %}
<br><br>Upload more?</b>
</p>
<br>
{% endif %}
@@ -21,22 +33,24 @@
<form method ='post' enctype ="multipart/form-data">
{% csrf_token %}
<br>
<input type = "file" style = "margin-left:20%;"
placeholder = "Simplefile" name = "simplefile" id="files"><label for="files">Scan file(s)</label>
<input type = "file" multiple="multiple" style = "margin-left:20%;"
placeholder = "Simplefile" name = "simplefile" id="files">
<br> <br>
<input type = "text" style = "margin-left:20%;"
placeholder = "Wallet id e.g. 2021#23" name = "title" value='2050#99'id="wallet"><label for="wallet"> Wallet id</label>
<input type = "text" size = "8" style = "margin-left:20%;"
placeholder = "Wallet id e.g. 2021#23" name = "title" value='{{wallet}}'id="wallet"><label for="wallet"> Wallet id</label>
</div>
<div style = "max-width:30%;">
<center>
<button style = "color: #fff; border:1px; background-color:#999; margin-top:8%;
height:35px; width:80%; margin-left:19%;" type = "submit" value = "Upload" >
<strong>Upload</strong>
</button>
</center>
</div>
</form>
</div>
</div>
<p style="margin-left:20%;">
{% for f in files %}
<a href="/expofiles/surveyscans/{{year}}/{{wallet|urlencode}}/{{f}}">{{ f}}</a><br />
{% endfor %}
</p>
{% endblock %}