tooltip for button
[phorkie.git] / data / templates / edit-file.htm
1  <div class="well filegroup" id="filegroup{{fileid}}">
2   {% if not file or file.isText %}
3   <textarea name="files[{{fileid}}][content]" id="content_{{fileid}}" cols="80" rows="15" class="content">{{file.getContent}}</textarea>
4   {% else %}
5   <p style="text-align: center">
6    Binary files cannot be edited.
7   </p>
8   {% endif %}
9   <div class="row-fluid">
10    <div class="span1">
11     <a class="btn additional-btn" href="#" onclick="toggleAdditional(this); return false;" style="display:none" title="Show additional options">
12      <i class="icon-chevron-up"></i>
13     </a>
14    </div>
15    <div class="span11 additional">
16     <div class="row-fluid">
17      <div class="span6">
18       <input type="hidden" name="files[{{fileid}}][original_name]" value="{{file.getFilename}}"/>
19       <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}})"/>
20      </div>
21      <div class="span6 typeselect" style="text-align: right" id="typeselect_{{fileid}}">
22       <label for="type_{{fileid}}" class="inline">Type</label>
23       <select name="files[{{fileid}}][type]" id="type_{{fileid}}">
24        {{htmlhelper.getLanguageOptions(file)|raw}}
25       </select>
26      </div>
27      <div class="span6" style="display:none; text-align: right" id="typetext_{{fileid}}">
28       <p class="muted">Type determined from filename</p>
29      </div>
30     </div>
31     <div class="row-fluid">
32      <div class="span9">
33       <label for="upload_{{fileid}}" class="inline">Replace with upload:</label>
34       <input type="file" name="files[{{fileid}}][upload]" id="upload_{{fileid}}" class="btn"/>
35      </div>
36      {% if not newfile %}
37      <div class="span3" style="text-align: right">
38       <input type="checkbox" name="files[{{fileid}}][delete]" value="1" id="delete_{{fileid}}"/>
39       <label for="delete_{{fileid}}" class="inline">delete file</label>
40      </div>
41      {% endif %}
42     </div>
43    </div><!-- /span12 -->
44   </div><!-- /row-fluid -->
45  </div>
46