Skip to content

Commit 70e48be

Browse files
committedJan 14, 2015
jinjify; show build details if failure occurs
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
1 parent 75187a4 commit 70e48be

9 files changed

+19
-4
lines changed
 

‎comet/data/templates/jinja/comet_account.tmpl

+2-1
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,10 @@
6666

6767
{% if current_user.is_admin %}
6868
<p class="text-muted">You can edit your permissions in the <a
69-
href="/users/permissions">permissions panel</a>.
69+
href="/users/permissions">permissions panel</a>.</p>
7070
{% endif %}
7171

72+
{{ form.csrf_token }}
7273
<div style="text-align: center;">
7374
<button type="submit" class="btn btn-primary btn-lg save-btn"><i class="fa fa-save fa-fw save-icon"></i> Save</button>
7475
</div>

‎comet/data/templates/jinja/comet_index.tmpl

+3
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ Show posts of:
3636
<h2>Posts</h2>
3737
</div>
3838
<form method="POST" action="/new/post" class="input-group">
39+
{{ postform.csrf_token }}
3940
<input class="form-control" name="title" id="title" placeholder="Title">
4041
<span class="input-group-btn"><button type="submit" class="btn btn-success"><i class="fa fa-file-o"></i> Create Post</button></span>
4142
</form>
@@ -60,6 +61,7 @@ Show posts of:
6061
</div>
6162
<form method="POST" action="/new/page" class="input-group">
6263
<input class="form-control" name="title" id="title" placeholder="Title">
64+
{{ pageform.csrf_token }}
6365
<span class="input-group-btn"><button type="submit" class="btn btn-success"><i class="fa fa-file-o"></i> Create Page</button></span>
6466
</form>
6567
<div class="list-group pages">
@@ -92,6 +94,7 @@ Show posts of:
9294
<div class="modal-footer">
9395
<form method="POST" action="/delete" class="delete-button">
9496
<input type="hidden" name="path" class="sourcepath">
97+
{{ delform.csrf_token }}
9598
<button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
9699
<button type="submit" class="btn btn-danger">Delete</button>
97100
</div>

‎comet/data/templates/jinja/comet_login.tmpl

+2-1
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,10 @@
1313
<input name="password" type="password" id="inputPassword" class="form-control" placeholder="Password" required>
1414
<div class="checkbox">
1515
<label>
16-
<input type="checkbox" name="remember-me" value="remember-me"> Remember me
16+
<input type="checkbox" name="remember" value="remember"> Remember me
1717
</label>
1818
</div>
19+
{{ form.csrf_token }}
1920
<button class="btn btn-lg btn-primary btn-block" type="submit">Sign in</button>
2021
</form>
2122
{% endblock %}

‎comet/data/templates/jinja/comet_post_edit.tmpl

+1
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@
104104
</div>
105105

106106
<textarea name="content" id="content-area" class="form-control" rows="24">{{ post_content }}</textarea>
107+
{{ form.csrf_token }}
107108
</form>
108109
{% if is_html %}
109110
<script src="/bower_components/wysihtml/dist/wysihtml5x-toolbar.min.js"></script>

‎comet/data/templates/jinja/comet_rebuild.tmpl

+3
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,9 @@ $(document).ready(function() {
6767
fs.removeClass('fa-cog');
6868
fs.addClass('fa-times');
6969
fsc.addClass('text-danger');
70+
$("#collapseOutput").collapse({
71+
show: true
72+
});
7073
}
7174
});
7275
}, 500);

‎comet/data/templates/jinja/comet_users.tmpl

+3-2
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ $('#deleteModal').on('show.bs.modal', function (event) {
6666
{% endif %}
6767
</td>
6868
<td class="actions">
69-
<form action="/users/edit" method="POST">
69+
<form action="/users/edit" method="POST">{{ editform.csrf_token }}
7070
<input type="hidden" name="uid" value="{{ uid }}">
7171
<input type="hidden" name="action" value="edit">
7272
<div class="btn-group" role="group">
@@ -89,7 +89,7 @@ $('#deleteModal').on('show.bs.modal', function (event) {
8989
<td></td>
9090
<td><input name="username" placeholder="New user" class="form-control"></td>
9191
<td><input name="action" value="new" type="hidden"></td>
92-
<td></td>
92+
<td>{{ editform.csrf_token }}</td>
9393
<td></td>
9494
<td><button type="submit" class="btn btn-sm btn-primary"><i class="fa fa-plus-square fa-fw"></i> Create</button></td>
9595
</form></tr>
@@ -110,6 +110,7 @@ $('#deleteModal').on('show.bs.modal', function (event) {
110110
<input type="hidden" name="uid" class="del-uid">
111111
<input type="hidden" name="direction" class="del-direction">
112112
<button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
113+
{{ delform.csrf_token }}
113114
<button type="submit" class="btn del-verb-capital">Delete</button>
114115
</div>
115116
</div>

‎comet/data/templates/jinja/comet_users_edit.tmpl

+1
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@
123123
</div>
124124
</div>
125125

126+
{{ form.csrf_token }}
126127
<div style="text-align: center;">
127128
<button type="submit" class="btn btn-primary btn-lg save-btn"><i class="fa fa-save fa-fw save-icon"></i> Save</button>
128129
</div>

‎comet/data/templates/jinja/comet_users_permissions.tmpl

+1
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ is_active
108108
{% endfor %}
109109
</table>
110110

111+
{{ form.csrf_token }}
111112
<div style="text-align: center;"><button type="submit" class="btn btn-primary btn-lg save-btn"><i class="fa fa-save fa-fw save-icon"></i> Save</button></div>
112113

113114
</form>

‎comet/data/templates/mako/comet_rebuild.tmpl

+3
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,9 @@ $(document).ready(function() {
6767
fs.removeClass('fa-cog');
6868
fs.addClass('fa-times');
6969
fsc.addClass('text-danger');
70+
$("#collapseOutput").collapse({
71+
show: true
72+
});
7073
}
7174
});
7275
}, 500);

0 commit comments

Comments
 (0)
Please sign in to comment.