1 {% extends "base.htm" %}
2 {% block title %}Edit paste{% endblock %}
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}}"/>
11 {% for fileid, file in repo.getFiles %}
12 {% include 'edit-file.htm' with {'file': file, 'fileid': fileid} %}
16 <div class="well" style="text-align: center; display:none" id="add-button">
17 <a class="btn" href="#">
18 <i class="icon-plus"></i>
23 {% include 'edit-file.htm' with {'file': '', 'fileid': 'new'} %}
27 <div class="row-fluid">
29 <a class="btn" href="{{repo.getLink('display')}}">Cancel</a>
31 <div class="span6" style="text-align: right">
32 <button class="btn btn-primary" type="submit">
33 <i class="icon-check icon-white"></i>
41 <script type="application/javascript">
42 $(document).ready(function() {
43 $('#add-button').show();
44 $('#filegroupnew').hide();
45 $('#add-button a').bind('click', function() {
46 $('#add-button').before("{% filter escape('js') %}
47 {% include 'edit-file.htm' with {'file': '', 'fileid': '###'} %}
49 .replace(/###/g, $('.filegroup').length)