footer with phorkie homepage link
[phorkie.git] / data / templates / edit.htm
index 300b6cbc9a2d3481a6b1f6f72c368098136eb864..f1f4a51f05011373526654baa0af8c12450e1e8d 100644 (file)
@@ -2,22 +2,36 @@
 {% block title %}Edit paste{% endblock %}
 
 {% block content %}
-<form method="post" action="{{repo.getLink('edit')}}">
+<form method="post" action="{{repo.getLink('edit')}}" enctype="multipart/form-data">
  <div class="control-group well pastedata">
    <label for="description">Description</label>
    <input type="text" name="description" id="description" value="{{repo.getDescription}}"/>
  </div>
 
  {% for fileid, file in repo.getFiles %}
-  {% include 'edit-file.htm' with {'file': file, 'fileid': fileid} %}
+  {% include 'edit-file.htm' with {'file': file, 'fileid': fileid, 'newfile': false} %}
  {% endfor %}
 
- <div class="well" style="text-align: right">
-  <button class="btn btn-primary" type="submit">
-   <i class="icon-check icon-white"></i>
-   Save
-  </button>
+ {% include 'edit-add.htm' %}
+
+ <div class="well">
+  <div class="row-fluid">
+   <div class="span6">
+    <a class="btn" href="{{repo.getLink('display')}}">Cancel</a>
+   </div>
+   <div class="span6" style="text-align: right">
+    <button class="btn btn-primary" type="submit">
+     <i class="icon-check icon-white"></i>
+     Save
+    </button>
+   </div>
+  </div>
  </div>
 
 </form>
+<script type="application/javascript">
+$(document).ready(function() {
+    initFilenames();
+});
+</script>
 {% endblock %}