summaryrefslogtreecommitdiff
path: root/data/templates/edit.htm
blob: 912a073419941e7a50f6c95e5bcc0b464525a1b1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
{% extends "base.htm" %}
{% block title %}Edit paste{% endblock %}

{% block meta %}
<meta name="robots" content="noindex"/>
{% endblock %}

{% block content %}
<div class="content-padding-fix"></div>
<form method="post" action="{{formaction}}" enctype="multipart/form-data" class="form-horizontal">
 <div class="control-group">
  <label class="control-label" for="description">Description</label>
  <div class="controls">
   <input type="text" name="description" id="description" value="{{repo.getDescription}}"/>
  </div>
 </div>

 {% for fileid, file in repo.getFiles %}
  {% if not singlefile or file == singlefile %}
    {% include 'edit-file.htm' with {'file': file, 'fileid': fileid, 'newfile': false} %}
  {% endif %}
 {% endfor %}

 {% if singlefile == "newfile" %}
   {% include 'edit-file.htm' with {'file': null, 'fileid': 'newfile', 'newfile': true} %}
 {% endif %}

 {% include 'edit-add.htm' %}

  <div class="row-fluid formbuttons">
   <div class="span4">
    <a class="btn" href="{{repo.getLink('display')}}">Cancel</a>
   </div>
   <div class="span4" style="text-align: center">
    {% include 'edit-add-button.htm' %}
   </div>
   <div class="span4" style="text-align: right">
    <button class="btn btn-primary" type="submit">
     <i class="icon-check icon-white"></i>
     Save
    </button>
   </div>
  </div>

</form>
<script type="application/javascript">
$(document).ready(function() {
    initEdit();
});
</script>
{% endblock %}

{% block sidebar %}
 {% include 'display-sidebar-history.htm' %}
{% endblock %}