Added snippet admin and profile editing
This commit is contained in:
parent
aa79c72ae0
commit
d87cbff134
14 changed files with 228 additions and 40 deletions
22
flask_website/templates/snippets/edit_comment.html
Normal file
22
flask_website/templates/snippets/edit_comment.html
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
{% extends "snippets/layout.html" %}
|
||||
{% block title %}Edit Comment {{ comment.title }}{% endblock %}
|
||||
{% block body %}
|
||||
<h2>Edit Comment</h2>
|
||||
<script type=text/javascript>
|
||||
$(function() {
|
||||
$('input[name="delete"]').click(function() {
|
||||
if (!confirm("Do you really want to delete this comment?\n\n" +
|
||||
"THIS CANNOT BE UNDONE!"))
|
||||
return false;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<form action="" method=post>
|
||||
<p>Title: <input type=text name=title value="{{ form.title }}" size=30>
|
||||
<p><textarea name=text cols=40 rows=8>{{ form.text }}</textarea>
|
||||
<p>
|
||||
<input type=submit value="Update Comment">
|
||||
<input type=submit name=delete value="Delete">
|
||||
<input type=submit name=cancel value="Cancel">
|
||||
</form>
|
||||
{% endblock %}
|
||||
Loading…
Add table
Add a link
Reference in a new issue