basic file upload works
[phorkie.git] / data / templates / edit-file.htm
1  <div class="well filegroup" id="filegroup{{fileid}}">
2   <div class="row-fluid">
3    <div class="span6">
4     <input type="hidden" name="files[{{fileid}}][original_name]" value="{{file.getFilename}}"/>
5     <input type="text" name="files[{{fileid}}][name]" id="filename_{{fileid}}" value="{{file.getFilename}}" placeholder="Filename (optional)" class="filename" onchange="filenameChange(this, {{fileid}})" onkeyup="filenameChange(this, {{fileid}})"/>
6    </div>
7    <div class="span6 typeselect" style="text-align: right" id="typeselect_{{fileid}}">
8     <label for="type_{{fileid}}" class="inline">Type</label>
9     <select name="files[{{fileid}}][type]" id="type_{{fileid}}">
10      {{htmlhelper.getLanguageOptions(file)|raw}}
11     </select>
12    </div>
13    <div class="span6" style="display:none; text-align: right" id="typetext_{{fileid}}">
14     <p class="muted">Type determined from filename</p>
15    </div>
16   </div>
17   <textarea name="files[{{fileid}}][content]" id="content_{{fileid}}" cols="80" rows="15" class="content">{{file.getContent}}</textarea>
18   <div class="row-fluid">
19    <div class="span9">
20     <label for="upload_{{fileid}}" class="inline">Replace with upload:</label>
21     <input type="file" name="files[{{fileid}}][upload]" id="upload_{{fileid}}" class="btn"/>
22    </div>
23    {% if not newfile %}
24    <div class="span3" style="text-align: right">
25     <input type="checkbox" name="files[{{fileid}}][delete]" value="1" id="delete_{{fileid}}"/>
26     <label for="delete_{{fileid}}" class="inline">delete file</label>
27    </div>
28    {% endif %}
29   </div>
30  </div>
31