aboutsummaryrefslogtreecommitdiff
path: root/data/templates/edit-file.htm
diff options
context:
space:
mode:
authorChristian Weiske <cweiske@cweiske.de>2012-04-15 22:12:44 +0200
committerChristian Weiske <cweiske@cweiske.de>2012-04-15 22:12:44 +0200
commit670d927b0cdc6cea596e35676676aef8f36080bc (patch)
tree8067cb48a3bbff4355cf538eee067b6d5ef1854a /data/templates/edit-file.htm
parent6c5e3a87419ab5f9a896403bbca2d41c7222e732 (diff)
downloadphorkie-670d927b0cdc6cea596e35676676aef8f36080bc.tar.gz
phorkie-670d927b0cdc6cea596e35676676aef8f36080bc.zip
do not show text field for binary files
Diffstat (limited to 'data/templates/edit-file.htm')
-rw-r--r--data/templates/edit-file.htm6
1 files changed, 6 insertions, 0 deletions
diff --git a/data/templates/edit-file.htm b/data/templates/edit-file.htm
index 53c2c01..a1993c5 100644
--- a/data/templates/edit-file.htm
+++ b/data/templates/edit-file.htm
@@ -14,7 +14,13 @@
<p class="muted">Type determined from filename</p>
</div>
</div>
+ {% if not file or file.isText %}
<textarea name="files[{{fileid}}][content]" id="content_{{fileid}}" cols="80" rows="15" class="content">{{file.getContent}}</textarea>
+ {% else %}
+ <p style="text-align: center">
+ Binary files cannot be edited.
+ </p>
+ {% endif %}
<div class="row-fluid">
<div class="span9">
<label for="upload_{{fileid}}" class="inline">Replace with upload:</label>