do not add files that are empty and have no name
[phorkie.git] / data / templates / edit.htm
1 {% extends "base.htm" %}
2 {% block title %}Edit paste{% endblock %}
3
4 {% block content %}
5 <form method="post" action="{{repo.getLink('edit')}}">
6  <div class="control-group well pastedata">
7    <label for="description">Description</label>
8    <input type="text" name="description" id="description" value="{{repo.getDescription}}"/>
9  </div>
10
11  {% for fileid, file in repo.getFiles %}
12   {% include 'edit-file.htm' with {'file': file, 'fileid': fileid} %}
13  {% endfor %}
14
15  <div class="well">
16   <div class="row-fluid">
17    <div class="span6">
18     <a class="btn" href="{{repo.getLink('display')}}">Cancel</a>
19    </div>
20    <div class="span6" style="text-align: right">
21     <button class="btn btn-primary" type="submit">
22      <i class="icon-check icon-white"></i>
23      Save
24     </button>
25    </div>
26   </div>
27  </div>
28
29 </form>
30 {% endblock %}