-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheditpost.html
62 lines (50 loc) · 2.06 KB
/
editpost.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
<!DOCTYPE html>
{% autoescape true %}
<html>
<head>
<link type="text/css" rel="stylesheet" href="/stylesheets/main.css" />
</head>
<body>
<div class="small">
<a href="/">Charlie's Blogging Service</a> |
{% if user %}<a href="/">{{ user.nickname() }}</a> |{% endif %}
<a href="{{ login_url|safe }}">{{ login_text }}</a>
</div>
<table>
<tr>
<td>
<h1>{{ blog.name }}</h1>
<hr>
<h2>Welcome, {{ user.nickname() }}!</h2>
<p>Please use this form to edit the post you selected:</p>
<form action="/editpost/{{ blog.key.id() }}/{{ post.key.id() }}"
method="post">
<input type=hidden name="post_url_key" value="{{ post.key.urlsafe() }}">
<input type=hidden name="create_date" value="{{ post.create_date }}">
<input type=hidden name="author" value="{{ user }}">
<p>Post Title:<br>
<textarea name="new_title" rows="2">{{ post.title }}</textarea></p>
<p>Post Body:<br>
<textarea name="new_body" rows="10">{{ post.body|safe }}</textarea>
<span class="small">
Image URLs (starting with http:// or https:// and ending
with .jpg, .png, or .gif) are converted to inline images
with a width of 200px when the blog post is displayed.
Other URLs (starting with http:// or https://) are converted
to clickable links when the blog post is displayed. To use
an image you uploaded, please copy and paste the image's
permalink URL into the body of the post.
</span></p>
<p>Tags (separated by commas):<br>
<textarea name="tags" rows="2">{% for tag in post.tags -%}
{{ tag }}{%- if not loop.last -%}
, {% endif %}{% endfor %}</textarea></p>
<p><input type="submit" value="Edit Post"></p>
</form>
<p><a href="/blog/{{ blog.key.id() }}">cancel (return to blog view)</a></p>
</td>
</tr>
</table>
</body>
</html>
{% endautoescape %}