summaryrefslogtreecommitdiff
path: root/templates/upload.tmpl
blob: 87f50eadea286b23fc86d77acd506ee241455e68 (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="${settings.virtual_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