-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdj_createpost.html
46 lines (43 loc) · 1.47 KB
/
dj_createpost.html
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
{% extends "base.html" %}
{% if errors %}
{% block top_row %}
<div class='error'>{{ errors }}</div>
{% endblock %}
{% endif %}
{% block left_column %}
<div id='edit-post'>
<h4>{% if editing %}Edit{% else %}Create{% endif %} Post</h4>
<form {% if editing %}{% else %}action='/dj/newpost/'{% endif %} method='post'>
{% if editing %}
<input type='hidden' value='{{ post.key }}' name='post_key' />
{% endif %}
<table>
<tr>
<td><label for='title'>Title:</label></td>
<td><input type='text' name='title' id='title' value='{{ post.title }}'></td>
</tr>
<tr>
<td><label for='slug'>Slug:</label></td>
<td><input type='text' name='slug' id='slug' value='{{ post.slug }}'></td>
</tr>
<tr>
<td colspan='2'><label for='text'>Page HTML</label></td>
</tr>
<tr>
<td colspan='2'>
<textarea class='tinymce' name='text' id='text'>{{ post.text|escape }}</textarea>
</td>
</tr>
</table>
<input type='submit'
class="btn btn-primary"
{% if editing %}value='Edit Post'{% else %}value='Create Post'{% endif %} />
{% if editing %}<input name='submit' type='submit'
class="btn btn-danger"
value='Delete Post' />{% endif %}
</form>
</div>
{% endblock %}
{% block right_column %}
{% include "last_n_posts.html" %}
{% endblock %}