do not add files that are empty and have no name
[phorkie.git] / data / templates / edit.htm
index 56e08ef1d1535080da35e57f602e2e3a6b42c449..45650b6257b03fff8000fd4720f18a1ce9613b5c 100644 (file)
@@ -2,7 +2,7 @@
 {% block title %}Edit paste{% endblock %}
 
 {% block content %}
-<form method="post" action="/">
+<form method="post" action="{{repo.getLink('edit')}}">
  <div class="control-group well pastedata">
    <label for="description">Description</label>
    <input type="text" name="description" id="description" value="{{repo.getDescription}}"/>
   {% include 'edit-file.htm' with {'file': file, 'fileid': fileid} %}
  {% endfor %}
 
- <div class="well" style="text-align: right">
-  <button class="btn btn-primary" type="submit">
-   <i class="icon-check icon-white"></i>
-   Save
-  </button>
+ <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>