summaryrefslogtreecommitdiff
path: root/templates/upload.tmpl
blob: ab0bddb3af4ac9e06c9417aaa0ff0ba725a3498c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#def title: upload
#def header: upload
#extends templates.base
#def head
		<script type="text/javascript">
			function file_changed() {
				s = document.getElementById('file').value;
				i = s.lastIndexOf('/');
				if(i < 0)
					i = s.lastIndexOf('\\');
				if(i >= 0)
					s = s.substr(i+1);
				document.getElementById('filename').value = s;
			}
		</script>
#end def
#def content
		<form method="post" action="${root}u" enctype="multipart/form-data">
			<input type="hidden" id="filename" name="filename" />
			<p><input type="file" id="file" name="file" onchange="file_changed()" /></p>
			<p><input type="submit" value="Upload" /></p>
		</form>
#end def